AD authentication error handling

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dan King (danking65_at_earthlink.net)
Date: 10/04/04


Date: Mon, 4 Oct 2004 11:55:07 -0700

I've created a login page to connect to Active Directory and retrieve a list
of groups.
If someone enters the wrong username/password, the web browser returns this
error:

Provider error '80040e09'

Permission denied.

/ct/useradd.asp, line 45

I would like to be able to retrieve this error and present a "You have
entered invalid information.." page.
If I enter an "On Error Resume Next" line the server CPU just jumps to 100%
utilization and the page never returns anything.
Anyone know how to handle this error so I can push out a login arror page?

Here is my code for the AD connection and request.

'''''''''''''''''''''''''''''''''''

Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADSDSOObject"
objConnection.Open "ADs Provider", uName, uPass

Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = "<LDAP://" & dcIP & "/" & adOU &
">;(objectCategory=group)" & ";distinguishedName,name;subtree"

Set objRecordSet = objCommand.Execute '<=THIS IS THE LINE THE SERVER HANGS
ON WITH BAD USERNAME/PASSWORD

'''''''''''''''''''''''''''''''''''

Thanks,
Dan

-- 
   __o
 _-\<,
(_)/(_)____


Relevant Pages

  • Re: set field in web page
    ... So the first step would be to retrieve the login page ... >of the vendor, ... >fields on the page with username/password, then post this and retrieve the ... >resulting response containing the page appearing after login. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Get data from another website.
    ... > I need to go to another website, login with a username/password and ... > I've done this in VB using the MS WebBrowser, Navigating to the login ... > Then I just have to retrieve the data from the WebBrowser. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Get data from another website.
    ... I need to go to another website, login with a username/password and ... I've done this in VB using the MS WebBrowser, Navigating to the login ... Then I just have to retrieve the data from the WebBrowser. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP security (anonymouse vs integrated) problem...
    ... displays a login page and requests a username/password combination. ... they have already logged-on to windows. ... redirect to the standard login page for the username/password combination. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Login application
    ... | retrieve the current login or the password file ... The first two characters of the encrypted password ... Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org ...
    (comp.os.linux.development.apps)