Friday 4 April 2008

The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

I got this error this morning when moving from a SQL Express database to SQL Server 2005. The fix was simple: I just needed to remove the "User Instance=True;" in the LocalSqlServer connection string, from:

<add name="LocalSqlServer"
connectionString="Data Source=(local);
Integrated Security=True;User Instance=True;
Initial Catalog=dbname"
providerName="System.Data.SqlClient"/>

to

<add name="LocalSqlServer"
connectionString="Data Source=(local);
Integrated Security=True;Initial Catalog=dbname"
providerName="System.Data.SqlClient"/>

3 comments:

GrandalfTheWise said...

Thank you so much for this immensely needed help!!

SweetNinjaMaster said...

Indeed. You are the man. Thanks.

Anonymous said...

This is absolutely an amazing post!. i have been searching for the answer for the entire day!. Thankyou so much!
Cheers
Sherry