Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 27, 2010 09:11 PM by Rype69
Feb 13, 2006 02:32 PM|LINK
Have you got your ASPNETDB.mdf file under source control? I have found that the log in control doesn't work while this file is checked in. My current problem is that I can't get it to work at all once I deploy it to a remote
server... Hope this helps../
Feb 13, 2006 03:01 PM|LINK
Feb 13, 2006 03:06 PM|LINK
Feb 13, 2006 07:44 PM|LINK
I think the problems described here and unsolved in quite a few other posts on this forum, including
one from me, is that when you add a user using the Membership API it also stores the name of the application that was used to add it in the aspnet_Applications table. When a user is added from
a page running on the Visual Studio web server it is linked to a record in this table containing the name of the web site shown in solution explorer in VS.
When you run the site in IIS the application name seems to come from the IIS settings (on the Home or Virtual Directory tab in site properties).
If the application names do not match then the a user added on the VS server won't authenticate when the site and membership db are run in IIS.
To fix this I have updated the ApplicationName and LoweredApplicationName on my deployed database to match the IIS application name and all works well. I suppose ensuring that they are both
the same before adding any users or deploying the database would be an easier way to do things...
Hope this helps with your issues...
Architecture, Visualisation, Design, 3d, Application, Web, Windows, Development, Liverpool, UK
Feb 14, 2006 08:57 AM|LINK
The cause of the issue I describe above is described by Scott Guthrie here:
Feb 14, 2006 01:26 PM|LINK
Feb 14, 2006 03:38 PM|LINK
Feb 15, 2006 05:28 AM|LINK
I am not sure what could be causing your problem but maybe you could try a couple of things:
Also, this is a bit of a shot in the dark, are you using roles in your application and if so is that why the user isn't logging in?
Hope this helps...
Feb 22, 2006 02:43 PM|LINK
I have been struggling with this issue for a while myself.
I had the applicationName="/" attrubiute in my web.config, and only had one entry in the applications table in ASPNETDB.
I tried to change that value to "ECMA" (the name of my application) and also change the values in the database. I only have one application record and one user record in my database, but I still can't log in when the app is deployed to IIS.
Is there anything else that needs to be done?
I am pasting the complete web.config file here:
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
Feb 23, 2006 06:45 AM|LINK
I tried to create a new website directly on the IIS instead of a file system web site. Using the default memebership settings, with nothing added to web.config, login worked.
Looking into the aspnetdb database, the application table contained one record with the applicationName set to "/", so it seems that the application works on IIS even when the application name in IIS is different from the application name in the database.
So now I need to see what happens to a web site that was created directly under IIS, when it is transferred to a different machine. If this works, then at least I know that I can continue developing and hope to find a solution to this problem later on.