View Complete Post
I am creating a asp.net 3.5 app using VS2008 on a Vista Ultimate machine. I wanted to add the login features using the login controls. I was able to create users and roles without any problem using the web admin tool that comes with VS. But when I try to login using the same credentials I am always getting "Your login attempt was not successful. Please try again." error message. I am using MS Sqlserver 2008 as the backend. I am not using any .mdf or sqlexpress databases. I even deletd the App_Data folder. In sqlprofiler, I see the web admin tool is connecting, but when I try to login using the login control, it doesn't even show up on the sql profiler. I tried to launch VS 2008 as an admin, still no success. I tried to browse with IE or FireFox. The dev site is not hosted on IIS yet, and it is running on the dev server that comes with VS 2008. I have squandered nearly one week on this issue. Ironically I was able to to create a website last year with these same controls on VS2005 and Windows XP professional, and the site is running like a charm!
The following is the entry in my web.config file:
I am working on implementing a custom membership provider that works against
an existing schema in my database and have a few thoughts/question.
The login control will automatically call the ValidateUser method of the
membership provider, so no matter how I implement the provider the only thing
the login control cares about the bool value returned by this method.
What I am confused about is there could be numerous reasons why a login attempt
failed; user is locked out, too many tries in a period of time, etc.
There is no way that I see to convey that to the control so it could display
the proper message. Other properties of the membership provider such as
PasswordStrengthRegularExpression have absolutely no effect on the login
control as well (out of the box), I would have hoped that it would
automatically somehow translate into regular expression validators, but that
doesn't seem to be the case. So it seems that I need to initialize the
login control properties with these settings out of the provider configuration
if I want them to take on the control itself.
If the only thing that the Login control does out of the box (without
manually handling events and doing the initialization as described above) is
call the ValidateUser method on the membership provider, I see no way to convey
back to the Login control why the validation
I have the standard .net login control that is working. (Still learning .net after 15yrs of classic)
Thanks ahead of time