· Show all categories
· Front Page
· Web Site
· Domain Name
· MS Access
· Buy Hosting Account
· MS SQL
· Virtual Private Server
Question: MS SQL: 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.
There are several reasons that this error can occur and all of them will generate the same error message. This is why we can not tell which one is your case.
In general you need to follow this potential problems:
1. The database is not fully uploaded or it does not exist on the server side in the App_DATA folder.
2. It is a good idea to assign Write permissions to App_Data folder by using your Control Panel -> Web Site manager -> manage -> Write permissions.
3. You may need to add to your web.config file the following line just before your connection string:
This is because it may inherit the same Connection String name from the Machine configuration and by explicitly removing it you make sure the names will not duplicate.
3. By Microsoft design the provider will attempt to automatically create the application services database because the provider determined that the database does not exist.
The above will fail --> you need to create the database on your local computer first and them make sure to publish the web site fully including the local copy of the aspnet.mdb.
4. Your connection string should NOT include -> User Instance=True
The correct settings is User Instance=false.
Hers is example on how to construct the connection string:
data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=false;
If you have other connection strings in you program - make sure all of them have
Last update: 2011-04-30 12:07
You cannot comment on this entry | Content Overview: MS SQL