Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 2.0 Security, Membership, and Role Management ISBN: 978-0-7645-9698-8
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Security, Membership, and Role Management by Stefan Schackow; ISBN: 9780764596988
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 Security, Membership, and Role Management ISBN: 978-0-7645-9698-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 12th, 2008, 09:06 AM
Registered User
 
Join Date: Nov 2008
Location: Lagos, Lagos, Nigeria.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ad Login

Hi People,

I am trying to use the authentication with Ad but getting this error?

"Logon failure: unknown user name or bad password.
 (C:\Book_Code\Chapter 12\wwwroot\ADProvider\web.config line 57)"

Can somebody kindly assist me.

Thank you,
Yinka Onisarotu

 
Old November 12th, 2008, 10:00 PM
Wrox Author
 
Join Date: Feb 2006
Location: Redmond, Washington, USA.
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The sample website has dummy values for username and password in the provider configuration sections. Those need to be changed based on however you setup your own test AD environment.

-Stefan
 
Old November 13th, 2008, 03:09 AM
Registered User
 
Join Date: Nov 2008
Location: Lagos, Lagos, Nigeria.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Stefan,

Thank you for your quick response. I have changed the user id and password to an account on my domain, and the account is an administrator on the domain.

this is the web.config settings:

 <add name="DirectoryConnection" connectionString="LDAP://HQDC06.Sterlingbank.com"/>

<membership defaultProvider="adminprovider">
    <providers>
        <clear/>


<add name="adminprovider"
        type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        enableSearchMethods="true"
        connectionUsername="Test03@sterlingbank.com"
        connectionPassword="1234568"
        attributeMapPasswordQuestion="ampPasswordQuestion"
        attributeMapPasswordAnswer="ampPasswordAnswer"
        attributeMapFailedPasswordAnswerCount="ampFailedPa sswordAnswerCount"
        attributeMapFailedPasswordAnswerTime="ampFailedPas swordAnswerTime"
        attributeMapFailedPasswordAnswerLockoutTime="ampFa iledPasswordAnswerLockoutTime"
        enablePasswordReset="true"
        requiresQuestionAndAnswer="true"
        connectionStringName="DirectoryConnection" />
<add name="readonlyprovider"
        type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        enableSearchMethods="true"
        connectionUsername="test03@sterlingbankng.com"
        connectionPassword="1234568"
        attributeMapPasswordQuestion="ampPasswordQuestion"
        attributeMapPasswordAnswer="ampPasswordAnswer"
        attributeMapFailedPasswordAnswerCount="ampFailedPa sswordAnswerCount"
        attributeMapFailedPasswordAnswerTime="ampFailedPas swordAnswerTime"
        attributeMapFailedPasswordAnswerLockoutTime="ampFa iledPasswordAnswerLockoutTime"
        enablePasswordReset="true"
        requiresQuestionAndAnswer="true"
        connectionStringName="DirectoryConnection" />
</providers>
</membership>

Regards,
Yinka Onisarotu

 
Old November 13th, 2008, 01:49 PM
Wrox Author
 
Join Date: Feb 2006
Location: Redmond, Washington, USA.
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just looking at the configuration below, I see a few potential issues:
   -different values for the connection username
   -the word "banking" mis-spelled in one case
   -is it "banking" or "bank"
   -Is the AD that you are using really allowing passwords like "1234568"? I know on a default AD installation that kind of password would fail the default password strength rules

Overall I'm still guessing that the problem has to do with the username/password combo that has been configured for the provider.

-Stefan
 
Old November 17th, 2008, 04:01 AM
Registered User
 
Join Date: Nov 2008
Location: Lagos, Lagos, Nigeria.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Stefan,

Thank you for prompt response. All the information is correct please help me look for solution.

Thank you





Similar Threads
Thread Thread Starter Forum Replies Last Post
Add existing AD user to AD group via ADSI? thiazi Classic ASP Basics 0 August 24th, 2007 09:27 PM
Getting a Handle on Windows Login with AD dparsons C# 0 February 28th, 2007 09:30 PM
AD Credentials gygaxx Visual Basic 2005 Basics 4 January 10th, 2007 08:32 AM
AD Usernames ldoodle Classic ASP Basics 1 June 29th, 2005 02:36 PM
Ad ImpressionCount? developerz BOOK: ASP.NET Website Programming Problem-Design-Solution 0 November 17th, 2003 12:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.