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

人盡茶涼 提交于 2019-11-27 14:59:58

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.

I had this exact same problem with a C# Console App that was utilizing an .mdf file.

The issue disappeared once I granted NETWORK SERVICE full access to my root-level Visual Studio project directory (and sub directories).

Solution Details: Problems with SQL Server Express user instancing and ASP.net Web Application Projects

VoodooChild

See this answer, which might work for you.

Based on your connection string, you might need to add "User Instance" attribute to it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!