Re: Intermittent Active Directory Error

Tech-Archive recommends: Speed Up your PC by fixing your registry



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


"Patrick.O.Ige" wrote:

Susan,
This samples here shoud get you started.
http://www.upyourasp.net/articles/article.aspx?aid=13
Patrick

"Susan" <Susan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9BFAF4B4-BD1A-4921-BF2B-9670CB52B488@xxxxxxxxxxxxxxxx
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




.



Relevant Pages

  • Re: Intermittent Active Directory Error
    ... Do you want me to provide username and password to the LDAP? ... the Active Directory app works fine then suddenly fails and will ... Dim dSearcher As DirectorySearcher ... Dim SrchRslt As SearchResult ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: LDAP + Active Directory
    ... Subject: LDAP + Active Directory ... LDAP uses an anonymous access for reading the tree, ... This list is provided by the SecurityFocus Security Intelligence Alert ... For more information on SecurityFocus' SIA service which ...
    (Pen-Test)
  • RE: LDAP + Active Directory
    ... Subject: LDAP + Active Directory ... LDAP server on it's rootdse. ... This list is provided by the SecurityFocus Security Intelligence Alert ...
    (Pen-Test)
  • Re: domain name/LDAP redundancy
    ... The app currently contacts one of the DC's for the LDAP search however, ... uses ADO to retrieve the Distinguished Names of all users in the domain. ... adoConnection.Open "Active Directory Provider" ...
    (microsoft.public.windows.server.active_directory)
  • RE: LDAP + Active Directory
    ... Subject: LDAP + Active Directory ... current article series on Sfocus (An Audit of Active Directory Security)... ... that security in AD can get ... For more information on SecurityFocus' SIA service which ...
    (Pen-Test)