I am trying to deploy my application, but it gives me the following error on login,.. plz help!
Server Error in '/' Application.
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.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: 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. Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
What does your connection string look like in the deployed site -- did you leave User Instance=True in it? You generally don't use SQL Express in a production site, and User Instance applies only to Express.
Are you publishing to a hosting provider that runs SQL Server Express in production? Typically you need to set up a regular SQL Server database in production and deploy to that, then change the connection string when you deploy.
AngelRose
Member
26 Points
47 Posts
Failed to generate a user instance of SQL Server due to a failure in starting the process for the...
Jul 19, 2012 12:25 PM|LINK
I am trying to deploy my application, but it gives me the following error on login,.. plz help!
Server Error in '/' Application.
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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: 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.
Source Error:
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
tdykstra
Contributor
4432 Points
620 Posts
Microsoft
Moderator
Re: Failed to generate a user instance of SQL Server due to a failure in starting the process for...
Jul 19, 2012 02:43 PM|LINK
What does your connection string look like in the deployed site -- did you leave User Instance=True in it? You generally don't use SQL Express in a production site, and User Instance applies only to Express.
AngelRose
Member
26 Points
47 Posts
Re: Failed to generate a user instance of SQL Server due to a failure in starting the process for...
Jul 19, 2012 02:48 PM|LINK
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
This is the connection string, my database seems to be connected in VS but after deployment , when i try to login to my application, this error occurs
tdykstra
Contributor
4432 Points
620 Posts
Microsoft
Moderator
Re: Failed to generate a user instance of SQL Server due to a failure in starting the process for...
Jul 19, 2012 02:53 PM|LINK
Are you publishing to a hosting provider that runs SQL Server Express in production? Typically you need to set up a regular SQL Server database in production and deploy to that, then change the connection string when you deploy.
AngelRose
Member
26 Points
47 Posts
Re: Failed to generate a user instance of SQL Server due to a failure in starting the process for...
Jul 19, 2012 03:01 PM|LINK
no i am trying to deploy it on IIS 7.5 but it doesnt work
Ruchira
All-Star
42887 Points
7020 Posts
MVP
Re: Failed to generate a user instance of SQL Server due to a failure in starting the process for...
Jul 20, 2012 01:36 PM|LINK
Hello,
Have you tried by Google/Bing your error? If not, please check the below links
Specially check the below thread if it only happens in IIS.
http://blogs.iis.net/webdevelopertips/archive/2010/05/06/tip-106-did-you-know-how-to-solve-the-errors-when-aspnetdb-mdf-is-created-dynamically-with-iis.aspx
Check below too.
http://forums.asp.net/t/1377174.aspx/3/10
http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/527bf46a-b3fe-4ae6-8b41-eb40024399c8/
http://stackoverflow.com/questions/4770596/failed-to-generate-a-user-instance-of-sql-server-due-to-failure-in-retrieving-th
http://p2p.wrox.com/book-beginning-asp-net-3-5-c-vb-book-isbn-978-0-470-18759-3/76945-chapter-18-getting-failed-generate-user-instance-sql-server-error.html
http://mywsat.codeplex.com/discussions/211246/
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.TitoM
Member
2 Points
1 Post
Re: Failed to generate a user instance of SQL Server due to a failure in starting the process for...
Aug 02, 2012 09:32 AM|LINK
Hi, I'm actually having the same problem, if you find the solution please post it