Error message:
Note:An error occurred while executing the current Web request. Check the stack trace information to learn about this error and CodeDetailed information about the cause of the error.
Exception details:System. Data. sqlclient. sqlexception: This version of SQL server does not support the user instance logon flag. The connection is closed.
Cause:
<Connectionstrings>
<Add name = "exporttoexcel" connectionstring = "Data Source = 2005090297878a \ sql08; attachdbfilename = | datadirectory | \ exporting. MDF; Integrated Security = true; user instance = true"/>
</Connectionstrings>
In the red section, user instance = true; Microsoft SQL Server Enterprise Evaluation Edition does not support only SQL Server Express.
Solution:
Method 1: In the settings of the connection property, click Advanced to set the user instance to false. The default value is true (no corresponding options are found in the database, the second method is used)
Method 2: Change the user instance in the connection string in Web. config to false.