I\'m trying to connect to an MDF. I\'ve even gone to the lengths of re-installing sql server express entirely (it is now the only flavor of SQL installed on my box, where p
I started getting this error this morning in a test deployment environment. I was using SQL Server Express 2008 and the error I was getting was
"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."
Unsure about what caused it, I followed the instructions in this post and in other post about deleting the "C:\Users\UserName\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS" directory, but to no avail.
What did the trick for me was to change the connection string from
"Data Source=.\SQLExpress;Initial Catalog=DBFilePath;Integrated Security=SSPI;MultipleActiveResultSets=true"
to
"Data Source=.\SQLExpress;Initial Catalog=DBName;Integrated Security=SSPI;MultipleActiveResultSets=true"