Error: Failed to generate a user instance of SQL Server
Hello,
How to over come the error:
"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."
Attaching an .MDF file in your App_Data folder to the server in run time normally does not work as it requires the user to be added a “Administrator Role” which is normally not supported on Shared server. If you are hosted on a shared server and attach DB method is not working then here is a work around:
-- Create a blank MSSQL DB from {Plesk} control panel and assign a user name and password to it.
-- Take a backup of your local machine's DB in .BAK format.
-- Restore the .BAK file into the DB that is created on the server.
(If you want you can upload the .BAK file on the server and ask us to restore it for you)
Once the DB is restored, you will have to change your string to the one below to access the DB.
<add name="conection_string_name" connectionString="Data Source=server_instance;Initial Catalog=DB_name;User ID=DB_User_name;Password=DB_User_Password" providerName="System.Data.SqlClient" />
** Please replace the entire variable with "_" as per your details.
|