Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

I've attempted to add a "service based data base" (.mdf) to a project in an asp .net application. From there I've proceeded attempted to create an entity framework model file (.edmx).

When doing so I get the error:

An error occurred while connecting to the database. The database might be unavailable. An exception of type 'System.Data.SqlClient.SqlException' occurred. The error message is: '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've got SQL Server 2008 R2 Express edition installed on my machine.

Any ideas would be most appreciated.

like image 783
eran otzap Avatar asked Sep 11 '11 02:09

eran otzap


1 Answers

I have got the same error, it's fixed after the following change.

Deleting the folder C:\Users\User\AppData\Local\Microsoft\Microsoft SQL Server Data worked for me in Windows 7. Have to restart VS after deleting the folder.

like image 74
Rajagopal 웃 Avatar answered Sep 19 '22 11:09

Rajagopal 웃