G
Guest
Hello all,
My ASP.NET application seems to have intermittent problems when
connecting to Active Directory server. Most of the time
the Active Directory app works fine then suddenly fails and will repeatedly
occur for a period of time then start working fine again. ASP.NET
application uses windows authentication. I am attaching the code for
reference:
-----------------------------
Dim dSearcher As DirectorySearcher
Dim SrchRslt As SearchResult
sLDAPLocation = "servername:1004"
dSearcher = New DirectorySearcher(New DirectoryEntry("LDAP://" &
sLDAPLocation & "/o=Extranet;ou=members"))
dSearcher.Filter = "(cn=" & Request.ServerVariables("LOGON_USER") & ")"
dSearcher.PropertiesToLoad.Add("AppAuthRating")
dSearcher.PropertiesToLoad.Add("AppAuthGrammer")
dSearcher.PropertiesToLoad.Add("AppAuthInternational")
dSearcher.ClientTimeout = New System.TimeSpan(0, 0, 15)
dSearcher.ServerTimeLimit = New System.TimeSpan(0, 0, 30)
SrchRslt = dSearcher.FindOne()
Here is the error what I am getting intermittently:
-----------------------
System.Runtime.InteropServices.COMException (0x8007203A): The server is not
operational
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.DirectorySearcher.FindAll(Boolean
findMoreThanOne)
at System.DirectoryServices.DirectorySearcher.FindOne()
------------------------
I am really struck and helpless. Can anybody suggest me how to solve this? I
appreciate your help.
Thanks,
Susan
My ASP.NET application seems to have intermittent problems when
connecting to Active Directory server. Most of the time
the Active Directory app works fine then suddenly fails and will repeatedly
occur for a period of time then start working fine again. ASP.NET
application uses windows authentication. I am attaching the code for
reference:
-----------------------------
Dim dSearcher As DirectorySearcher
Dim SrchRslt As SearchResult
sLDAPLocation = "servername:1004"
dSearcher = New DirectorySearcher(New DirectoryEntry("LDAP://" &
sLDAPLocation & "/o=Extranet;ou=members"))
dSearcher.Filter = "(cn=" & Request.ServerVariables("LOGON_USER") & ")"
dSearcher.PropertiesToLoad.Add("AppAuthRating")
dSearcher.PropertiesToLoad.Add("AppAuthGrammer")
dSearcher.PropertiesToLoad.Add("AppAuthInternational")
dSearcher.ClientTimeout = New System.TimeSpan(0, 0, 15)
dSearcher.ServerTimeLimit = New System.TimeSpan(0, 0, 30)
SrchRslt = dSearcher.FindOne()
Here is the error what I am getting intermittently:
-----------------------
System.Runtime.InteropServices.COMException (0x8007203A): The server is not
operational
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.DirectorySearcher.FindAll(Boolean
findMoreThanOne)
at System.DirectoryServices.DirectorySearcher.FindOne()
------------------------
I am really struck and helpless. Can anybody suggest me how to solve this? I
appreciate your help.
Thanks,
Susan