Server Error in '/MyWebsite' Application.
The user instance login flag is not supported on this version of SQL Server. The connection will be closed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: The user instance login flag is not supported on this version of SQL Server. The connection will be closed.
Source Error:
|
Source File: c:\Documents and Settings\Vamsi\My Documents\Downloads\WebSite10\login.aspx.cs Line: 17
Solution:-
Check The SqlConnection Object's String Is Given Correct Or Not.
I Had Given SqlConnection con = new SqlConnection(@"Data Source=.\;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True;"); Where I Did Not Mentioned DataSource Name As .\SQLExpress . So The Error Occured.
It Should Be As Below:
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True;");
I Had Given SqlConnection con = new SqlConnection(@"Data Source=.\;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True;"); Where I Did Not Mentioned DataSource Name As .\SQLExpress . So The Error Occured.
It Should Be As Below:
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True;");
No comments:
Post a Comment
Note: only a member of this blog may post a comment.