Solved

Getting "login attempt was unsuccessful" using Login control with Membership in ASP 4.0

Posted on 2012-03-30
1
813 Views
Last Modified: 2012-05-11
Greetings!

I have an ASP.NET 4.0 app and am trying to implement the Login control using the Membership framework and a SQL server database.  I've done the following:

1. Configured SQL with the aspnet_regsql
2. Confirmed that the tables are being populated with user data using the CreateUserWizard control.
3. Confirmed that users "IsApproved" flag gets set when the authentication email is answered.
4. Created a "Admin" role and confirmed that the user is in this role.
5. Changed the applicationName attribute from the default "/" in web.config

Testing:

1. Tried to login with this confirmed user and keep getting the "Your login attempt was not successful. Please try again." error.
2. Tried without adding any code behind to the Login control.  Same result.
3. Added custom code to the Login.Authenticate event for debugging purposes
    Results:
       Membership.ValidateUser yields e.Authenticated = false
       The Membership object has all the correct connection information
       The User.Identity information : Name "", IsAuthenticated false, AuthenticationType ""
                     ProviderName matches what is in web.config

So, I know my database connection works as I can create users through the app.  I've also tested all providers with the Web Site Administration tool.

What am I missing?  It's got to be something simple.  I was under the assumption that you do not need any custom code (like writing queries to the aspnet_User tables, etc.) for this to work.

This is really holding up production, so any assistance is greatly appreciated!
0
Comment
Question by:ITMikeK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
Codecaesar earned 500 total points
ID: 37792827
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question