SQL Server database Tutorial connection Error Resolution method
Error provides
"An error occurred while retrieving the user's local application data path, resulting in the inability to generate a user instance of SQL Server. Make sure that the user has a local user profile on this computer. The connection will be closed. ”
String problem
Data source= ". sqlexpress;attachdbfilename=|datadirectory|test.mdf;integrated security=true;user Instance=false"
NET project The default database is SQLExpress, and if you are using a different version of the database you need to set up the connection strings at the beginning of the project, or the local machine is installed SQLExpress
Register the database as another database
<add name= "ConnectionString" connectionstring= "Data source= (local); initial catalog=master;user id=;p wd=sa"/>
Your express version of SQL Server is not running because it is running in IIS. Start, program, SQL tools perimeter configuration to open server