Strange behaviour with System.DirectoryService.dll ?

B

Buster Baxter

Hello all,

I wrote two simple applications which get some information about a user
in Active Directory. The one application is written as a windows
application with C# and .NET2.0 and the other is written in ASP.NET
with C# and .NET2.0

Both work fine and the code in both applications is nearly exact the
same, but I get a different behaviour with a
System.DirectoryServices.SearchResult object variable which I named
MySearchResult.

In this case I try to get the information of the "Department" property
of the Active Directory object with
MySearchResult.Properties["Department"] , and in the windows
application this object is "null" but in the ASP.NET application the
object is a valid object of the type
System.DirectoryServices.ResultPropertyValueCollection with the
property ".count == 0".

Any ideas why MySearchResult is "null" in the windows application and
"System.DirectoryServices.ResultPropertyValueCollection" in the ASP.NET
application?

Thanks in advance!

Best regards,
Gunnar Möller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top