0

I have written a new ASP.NET program that I intend to sell so I thought the logical choice was SQL Express, I plan on allowing users to use their own SQL server if they prefer. My program requires the Application Pool to use the Network Service account to operate. The Network Service account has mmodify permission to the database file.

For testing I have sent my program to several colleagues and friends and each receive the error below when installing on a new server with SQL Express 2008 R2 installed. I can also recreate the error on new servers but debugging in VS it works fine.

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 am using the following connection string which I believe to be correct.

"Data Source=.\SQLExpress;AttachDbFilename=|DataDirectory|\Database.mdf;
    Integrated Security=True;User Instance=True"

What have I done wrong? What other way could I send the database along with an installer and make it work first time?

Thanks David

1
  • Try this. Or this. Commented Apr 21, 2011 at 22:40

1 Answer 1

0

Start here:

http://dotnetslackers.com/Community/blogs/bmains/archive/2008/03/01/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.aspx

While at it, make sure the sql express instance is set to execute under the "local" or "system" accounts.

Sign up to request clarification or add additional context in comments.

1 Comment

How would I check this? Is this the SQL service? Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.