Re: System.DirectoryServices - The server is not operational
From: George Durzi (gdurzi_at_hotmail.com)
Date: 12/15/04
- Next message: Avi: "XP user authentication"
- Previous message: John: "Authorization Manager, ASP.NET, possible memory Leak"
- In reply to: George Durzi: "System.DirectoryServices - The server is not operational"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: System.DirectoryServices - The server is not operational"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 15 Dec 2004 11:57:17 -0700
I can successfuly bind to Active Directory using the ldp.exe tool.
I can also successfuly locate my entry, this is the result shown in ldp.exe
window
***Searching...
ldap_search_s(ld, "CN=USERS,DC=CORP,DC=CompanyName,DC=COM", 1, "CN=GDURZI",
attrList, 0, &msg)
Result <0>: (null)
Matched DNs:
Getting 1 entries:
>> Dn: CN=gdurzi,CN=Users,DC=corp,DC=CompanyName,DC=com
4> objectClass: top; person; organizationalPerson; user;
1> cn: gdurzi;
1> distinguishedName: CN=gdurzi,CN=Users,DC=corp,DC=CompanyName,DC=com;
1> name: gdurzi;
1> canonicalName: corp.CompanyName.com/Users/gdurzi;
Does this yield any clues?
"George Durzi" <gdurzi@hotmail.com> wrote in message
news:eS0Bp3s4EHA.2180@TK2MSFTNGP10.phx.gbl...
>I have an asp.net web application written in c# that uses Forms
>Authentication to authenticate against our Active Directory. I based the
>authentication code on the How To found on MSDN
>(http://support.microsoft.com/default.aspx?scid=kb;en-us;326340)
>
> The applications works just fine on our production servers. However, I'm
> installing it at one of our sister companies on a fresh W2K3 server box.
> They have just upgraded to Active Directory.
>
> I'm getting an Exception when I try to create a new DirectoryEntry to try
> and authenticate against AD.
> Exception Message: "The server is not operational"
> Source: "System.DirectoryServices"
>
> Before I go back to their admin and ask them to check into their install,
> I wanted to check on this board.
>
> Their domain is called: CORP.CompanyName.COM
> My LDAP connection string is
> LDAP://CORP.CompanyName.COM/DC=CORP,DC=CompanyName,DC=COM
>
> Here's my "IsAuthenticated" function
>
> string DomainUserName = Domain + @"\" + UserName;
> try
> {
> DirectoryEntry oDE = new DirectoryEntry(LDAPConnectString,
> DomainUserName, Password, AuthenticationTypes.Secure);
> Object oNativeObject = oDE.NativeObject;
> DirectorySearcher oDS = new DirectorySearcher(oDE);
> oDS.Filter = "(SAMAccountName=" + UserName + ")";
> oDS.PropertiesToLoad.Add("cn");
> SearchResult oSR = oDS.FindOne();
> if (null == oSR) return false;
> _path = oSR.Path;
> _filterattribute = (string)oSR.Properties["cn"][0];
> }
> catch (Exception oException)
> {
> return false;
> }
> return true;
>
> The exception happens right after the DirectoryEntry constructor. I don't
> think it's related to the oDE.NativeObject line, because if I try to
> enumerate the Children in my oDE object, I get the same error.
>
> So, it doesn't seem that the DirectoryEntry object is being created
> properly, although no exception is raised at that line.
>
> Thanks!
>
- Next message: Avi: "XP user authentication"
- Previous message: John: "Authorization Manager, ASP.NET, possible memory Leak"
- In reply to: George Durzi: "System.DirectoryServices - The server is not operational"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: System.DirectoryServices - The server is not operational"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|