Login control error message : Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
RSS
I get the following error message when I click on "login" from the login control:
Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
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.
Amanda
Amanda Adams
Private Developer
Cape Town
South Africa
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.
-Stefan
----------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
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
Amanda Adams
Private Developer
Cape Town
South Africa
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).
-Stefan
----------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
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:
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:
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....
Thanks
Amanda
Amanda Adams
Private Developer
Cape Town
South Africa
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
http://localhost...
Amanda Adams
Private Developer
Cape Town
South Africa
amandaadams
Member
95 Points
19 Posts
Login control error message : Failed to generate a user instance of SQL Server due to a failure i...
Feb 08, 2006 05:12 PM|LINK
Hi
I get the following error message when I click on "login" from the login control:
Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
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.
Amanda
Private Developer
Cape Town
South Africa
sschack
Contributor
3085 Points
617 Posts
Microsoft
Re: Login control error message : Failed to generate a user instance of SQL Server due to a failu...
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.
----------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
amandaadams
Member
95 Points
19 Posts
Re: Login control error message : Failed to generate a user instance of SQL Server due to a failu...
Feb 09, 2006 04:05 AM|LINK
Thanks Stefan
I will try..
Private Developer
Cape Town
South Africa
amandaadams
Member
95 Points
19 Posts
Re: Login control error message : Failed to generate a user instance of SQL Server due to a failu...
Feb 09, 2006 04:38 AM|LINK
Hi Stefan
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
Private Developer
Cape Town
South Africa
sschack
Contributor
3085 Points
617 Posts
Microsoft
Re: Login control error message : Failed to generate a user instance of SQL Server due to a failu...
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).
----------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
amandaadams
Member
95 Points
19 Posts
Re: Login control error message : Failed to generate a user instance of SQL Server due to a failu...
Feb 09, 2006 07:16 PM|LINK
Hi Stefan
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:
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
Regards
Private Developer
Cape Town
South Africa
sschack
Contributor
3085 Points
617 Posts
Microsoft
Re: Login control error message : Failed to generate a user instance of SQL Server due to a failu...
Feb 10, 2006 12:08 AM|LINK
----------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
amandaadams
Member
95 Points
19 Posts
Re: Login control error message : Failed to generate a user instance of SQL Server due to a failu...
Feb 10, 2006 09:36 AM|LINK
Stefan
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:
Me.con.ConnectionString = "Data Source=.\SQLExpress;Initial Catalog=master;Integrated Security=True"Private Developer
Cape Town
South Africa
amandaadams
Member
95 Points
19 Posts
Re: Login control error message : Failed to generate a user instance of SQL Server due to a failu...
Feb 10, 2006 10:42 AM|LINK
Hi Stefan
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....
Thanks
Amanda
Private Developer
Cape Town
South Africa
amandaadams
Member
95 Points
19 Posts
Re: Login control error message : Failed to generate a user instance of SQL Server due to a failu...
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 http://localhost...
Private Developer
Cape Town
South Africa