Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > How to authenticate against the Active Directory using forms authentication with password expiration check?

Reply
Thread Tools

How to authenticate against the Active Directory using forms authentication with password expiration check?

 
 
Ruggiero, Vince
Guest
Posts: n/a
 
      12-14-2009
Hello everyone. Please help!

I am new to the .NET web application development. I have used the code from
the link below to create a basic login page in front of the Microsoft Live
Single Sing On.

http://support.microsoft.com/default.aspx/kb/326340

I managed to combine the two together (LiveSSO w/ Forms Authentication)
turning off the Integrated Authentication in IIS from the SSO setup. All
works as expected if the user successfully authenticates with AD.

THE PROBLEM that I am having is that when the user failes to authenticate it
only returns: "Error authenticating user. Logon failure: unknown user name
or bad password". This message appears also when the user is set to change
the password at next logon. What I want it to do is to read the error code
of exactly why it failed so I can setup a redirect to a password reset page
(i.e. if error is "User flag is set to change pswd" etc.etc.)

From the page linked above you can see the VB code of LdapAuthentication.vb
which does the trick of authenticating the accounts or returning the error
message if the login fails.

The part that returns the "Error authenticating user. Logon failure: unknown
user name or bad password." Is handled by this subroutine:

1.Catch ex As Exception
2.Throw New Exception("Error authenticating user. " & ex.Message)
3.End Try
That's what I have been trying to customize to see how it can return a
specific code based on the user account AD flags, instead of the generic
message.

Does anyone have any clue or idea how I can accomplish that? Any help would
be greatly appreciated. Thanks in advance!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to authenticate against the Active Directory using forms authentication with password expiration check? Ruggiero, Vince ASP .Net Web Controls 0 12-14-2009 09:30 PM
Authenticate against Active Directory Jon ASP .Net 4 05-13-2008 04:54 PM
forms auth, authenticate against already encrypted password? Tim Mackey ASP .Net Security 7 01-04-2007 12:04 PM
Authenticate against Active Directory Bud ASP General 4 11-11-2005 02:05 AM
Problems when authenticating against the Active Directory using Forms Authentication and Visual Basic .NET Paul East ASP .Net Security 3 03-02-2004 12:08 AM



Advertisments