Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 14, 2006 01:17 PM by ali_khankan
Feb 08, 2006 05:12 PM|LINK
I get the following error message when I click on "login" from the login control:
I have created one user, using the web administration tool. I have checked that the user exists within the ASPNETDB.MDF database, in the aspnet_Users table. I have tested the AspNetSqlProvider connection successfully.
Feb 09, 2006 02:25 AM|LINK
You can either try rebooting the machine (this forces SQL Server Express to startup again when the machine boots).
Or, you can open up Task Manager and look for a process called sqlservr.exe that is running with your credentials. Once you find it, just right-click on the process and kill it. Then try running your app again. Killing off the SQL Server instance running
as you should force SQL Server Express to re-attempt spinning up the process for your web application.
Feb 09, 2006 04:05 AM|LINK
I will try..
Feb 09, 2006 04:38 AM|LINK
I tried that and now I get an error that SQL does not allow remote conncections. This problem disapears after a reboot.
My problem only occurs when I am attempting to validate user credentials in the ASPNETDB.MDF, by using the login control . I can access the sqlexpress.master.dbo without problems
Feb 09, 2006 05:51 PM|LINK
Does Membership.ValidateUser ever work for you? Or is this intermittent? Also, I assume this is with the default LocalSqlServer connection string (i.e. nothing has changed).
Feb 09, 2006 07:16 PM|LINK
I get the same original error message when I try Membership.ValidateUser. I have not changed the connection string or set up info for the
SqlMembershipProvider . The default string in the machine.config file is as follows:
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
Feb 10, 2006 12:08 AM|LINK
Feb 10, 2006 09:36 AM|LINK
Actually, it is only the ASPNETDB.MDF database that holds the membership details (roles, users,etc\) that wont come up. I am using sqlexpress.master.dbo very successfully. The connection string for the sqlexpress I use is simply:
Feb 10, 2006 10:42 AM|LINK
Thanks for all your help. However, I think I will be fine. I have just created a web site from scratch and both ASPNETDB and sqlexpress.master are working ok. Membership.Validate user is successful. I think my problem is because I am upgrading from VS 2003
to 2005. I already coded a user access and security in VS 2003, and was trying out the VS 2005 new login control, etc. Somehow, something has got confused, so all I need to do now is compare....
Feb 10, 2006 02:22 PM|LINK
This is what I have discovered, maybe its a clue:
I created two identical, basic apps, following the "WalkThrough: Creating a Web Site with membership and user login (Visual Studio)" article found on MSDN
On creation of the second web site, instead of choosing "HTTP" and the location
http://localhost/, I chose "File System" and location "D:\Inetpub\wwwroot".
I get the error only for the website created with "HTTP", etc . Access to the sqlexpress.master database is fine for both websites, only the ASPNETDB database bombs out when I run the website located in the local web server