Forum Search:
Forum.Brain-Cluster.com: Brain Cluster Technical Forum
Ultimate forum for Technical Discussions

Home » Microsoft » Windows Server » Active Directory » Urgent Please: Returnung Incorrect Attributes Value
Urgent Please: Returnung Incorrect Attributes Value [message #158939] Tue, 21 July 2009 14:10 Go to next message
Avi  is currently offline Avi
Messages: 20
Registered: July 2009
Junior Member
In a custom attribute(PasswordAnswe) I having following items
1Text
2Value
3None
4Ok

I am using following code to read values from
DirectoryEntry root = new DirectoryEntry(strPath);
DirectorySearcher search = new DirectorySearcher(root);
search.PropertiesToLoad.Add("PasswordAnswer");
SearchResult result = search.FindOne();

Response.Write(result.Properties["PasswordAnswer"][1].ToString());

It should return "1Text", but it is returning different values i.e. "4Ok".

Is there anything I am missing here
Re: Urgent Please: Returnung Incorrect Attributes Value [message #158942 is a reply to message #158939] Tue, 21 July 2009 14:27 Go to previous message
florian  is currently offline florian  Germany
Messages: 484
Registered: July 2009
Senior Member
Howdie!

Avi schrieb:
> I am using following code to read values from
> DirectoryEntry root = new DirectoryEntry(strPath);
> DirectorySearcher search = new DirectorySearcher(root);
> search.PropertiesToLoad.Add("PasswordAnswer");
> SearchResult result = search.FindOne();
>
> Response.Write(result.Properties["PasswordAnswer"][1].ToString());
>
> It should return "1Text", but it is returning different values i.e. "4Ok".

Is that a multi-valued attribute? What kind of search filters have you
applied to the code? Can you output the search filter's search result
(the object's name) and check with LDP or ADSIEdit whether the value
found is incorrect?

Cheers,
Florian
--
Microsoft MVP - Group Policy
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.
Maillist (german): http://frickelsoft.net/cms/index.php?page=mailingliste
Previous Topic:how do you do through group policy?
Next Topic:Re: Multiple Secuirty group
Goto Forum:
  


Current Time: Fri Oct 20 10:13:13 EDT 2017

Total time taken to generate the page: 0.03307 seconds
.:: Contact :: Home ::Sitemap::.

Powered by: FUDforum 3.0.0RC2.
Copyright ©2001-2009 FUDforum Bulletin Board Software