Intermittent Active Directory Error

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
 
G

Guest

Patrick,

Thanks for your help.

The difference between my code and the article code is username and
password. Do you want me to provide username and password to the LDAP ?

I really do not understand what is the problem here. It works most of the
times and fails atleast once or twice a day. I feel some background process
is causing the problem and not sure.

When I get this problem all .NET applications will not work except the one
which is classic ASP applicaiton. In ASP application I use
obj=Server.CreateObject("Membership.UserObjects") to read from LDAP.

My application is on Windows 2000.

Thanks,
Susan
 
G

Guest

Please anybody help on this.

Thanks,
Anitha

Susan said:
Patrick,

Thanks for your help.

The difference between my code and the article code is username and
password. Do you want me to provide username and password to the LDAP ?

I really do not understand what is the problem here. It works most of the
times and fails atleast once or twice a day. I feel some background process
is causing the problem and not sure.

When I get this problem all .NET applications will not work except the one
which is classic ASP applicaiton. In ASP application I use
obj=Server.CreateObject("Membership.UserObjects") to read from LDAP.

My application is on Windows 2000.

Thanks,
Susan
 

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

Top