Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 12th, 2008, 08: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

Reply With Quote
  #2 (permalink)  
Old November 12th, 2008, 09: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
Reply With Quote
  #3 (permalink)  
Old November 13th, 2008, 02: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

Reply With Quote
  #4 (permalink)  
Old November 13th, 2008, 12: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
Reply With Quote
  #5 (permalink)  
Old November 17th, 2008, 03: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

Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 08:30 PM
AD Credentials gygaxx Visual Basic 2005 Basics 4 January 10th, 2007 07: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 11:34 AM



All times are GMT -4. The time now is 12:29 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.