I have been using the VWD guided tour to learn how to use VWD and ASP.NET. I have placed all the controls on the pages as specified but when I try and log in I get the following message.
Your login attempt was not successful. Please try again.
I have set up the accounts several times and made sure all settings are as shown in the guided tour. What is causing my login not to work? I am running Server 2003 with IIS and hosting my website locally. If I try to login through
localhost or remotely I get the same messsage.
1) Are you using the final release of Visual Web Developer and ASP.NET 2.0 or Beta2.
2) Can you open your Windows event viewer and look under the "Application" event log. Everytime a failure occurs an audit event is added there by default. For example:
Scott, what is it I, and quite a few other people judging from the posts I have read today, are doing wrong to cause the ApplicationName issue that I describe?
The default SQLMembershipProvider registered in machine.config has an applicationName value of "/" -- which means that the users created within it are not tied to a specific application.
What I suspect is happening in your case (and these others) is that the membership provider is being re-added at the application level within the web.config file, and that the applicationName attribute isn't being specified -- in which case it is defaulting
to using the current application name (instead of root).
Can you check your web.config file to see whether this is the case, and whether a new membership provider is being specified?
As you can see below that is exactly what has happened in my case. I took this line from a 'tutorial' found somewhere on the web with the intention of altering the default settings but the all important applicationName attribute
is missing as you rightly pointed out.
dbehrens2
Member
10 Points
2 Posts
Not logging in the secure part of web site
Feb 12, 2006 09:13 PM|LINK
I have been using the VWD guided tour to learn how to use VWD and ASP.NET. I have placed all the controls on the pages as specified but when I try and log in I get the following message.
Your login attempt was not successful. Please try again.
I have set up the accounts several times and made sure all settings are as shown in the guided tour. What is causing my login not to work? I am running Server 2003 with IIS and hosting my website locally. If I try to login through localhost or remotely I get the same messsage.
Please help.
ScottGu
All-Star
18285 Points
2008 Posts
Microsoft
Moderator
Re: Not logging in the secure part of web site
Feb 13, 2006 06:32 PM|LINK
A couple of questions:
1) Are you using the final release of Visual Web Developer and ASP.NET 2.0 or Beta2.
2) Can you open your Windows event viewer and look under the "Application" event log. Everytime a failure occurs an audit event is added there by default. For example:
Event code: 4006
Event message: Membership credential verification failed.
Event time: 2/13/2006 11:30:41 AM
Event time (UTC): 2/13/2006 7:30:41 PM
Event ID: d048ad0365f24cf398d985985269aba3
Event sequence: 4
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: 648db734-5-127843326127843001
Trust level: Full
Application Virtual Path: /simpledata
Application Path: E:\simpledata\
Machine name: SCOTTGU101
Process information:
Process ID: 3620
Process name: WebDev.WebServer.EXE
Account name: REDMOND\scottgu
Request information:
Request URL: http://localhost:34360/simpledata/Default6.aspx
Request path: /simpledata/Default6.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: REDMOND\scottgu
Name to authenticate: ds
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Can you check what this value is when your login fails and what the reasons are?
Thanks,
Scott
gmpeng
Member
50 Points
10 Posts
Re: Not logging in the secure part of web site
Feb 13, 2006 07:51 PM|LINK
Hi
I have just posted a possible explanation for why this might happen in another thread at:
http://forums.asp.net/1154939/ShowPost.aspx
Scott, what is it I, and quite a few other people judging from the posts I have read today, are doing wrong to cause the ApplicationName issue that I describe?
Thanks in advance...
Graham
Architecture, Visualisation, Design, 3d, Application, Web, Windows, Development, Liverpool, UK
ScottGu
All-Star
18285 Points
2008 Posts
Microsoft
Moderator
Re: Not logging in the secure part of web site
Feb 14, 2006 04:53 AM|LINK
Hi Graham,
The default SQLMembershipProvider registered in machine.config has an applicationName value of "/" -- which means that the users created within it are not tied to a specific application.
What I suspect is happening in your case (and these others) is that the membership provider is being re-added at the application level within the web.config file, and that the applicationName attribute isn't being specified -- in which case it is defaulting to using the current application name (instead of root).
Can you check your web.config file to see whether this is the case, and whether a new membership provider is being specified?
Thanks,
Scott
gmpeng
Member
50 Points
10 Posts
Re: Not logging in the secure part of web site
Feb 14, 2006 08:51 AM|LINK
Hi Scott
As you can see below that is exactly what has happened in my case. I took this line from a 'tutorial' found somewhere on the web with the intention of altering the default settings but the all important applicationName attribute is missing as you rightly pointed out.
<membership defaultProvider="AspNetSqlMembershipProvider">
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="MembershipDB" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" passwordFormat="Hashed" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="6"/>
</providers>
</membership>
Thanks for your help...
Graham