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

Last post 09-16-2009 11:00 PM by chetan.sarode. 42 replies.

Sort Posts:

  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    12-11-2008, 8:43 PM
    if you have sql server2008 developer edition : 1)create "aspnetdb" database with "aspnet_regsql" in vs command prompt. 2)find location of " aspnetdb.mdf" and " aspnetdb_log.ldf " files with right click on database name in mss management studio. 3)stop sqlserver service. 4)copy two files .mdf and .ldf in App_Data folder of your site. 5)start sqlserver service. 6)attach aspnetdb database from files to sqlserver. 6)chang in machine.config file instance to false:instance=false. 7)press asp.net configuration in your project. 8)define your users and roles. make sure to create ur website project in "C:\Documents and Settings\username\My Documents\Visual Studio 2008" roozbeh noroozy GIS Developer in IRAN -Tehran: roozbeh.n@live.com with thanks from: sanjitpatel : http://forums.asp.net/p/1090491/2802641.aspx#2802641 and thomassamson : http://forums.asp.net/t/913172.aspx?PageIndex=2
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    12-11-2008, 8:46 PM
    f
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    12-11-2008, 10:27 PM

    The full version of SQL Server doesn't support creating [user instance] 'attached' databases like sql express does (it looks like the connection string is intended for sql express).

    create and use the database on your sql server.

    then use a connection string something like: "server=localhost;database=TimeTracker;uid=sa;pwd=.."  (or use integrated security) 

    Change in connectionString User Instance = false

    <connectionStrings>
      <add name="aspnet_staterKits_TimeTracker" connectionString="Data Source=RELSEC_FE\SQLServer2005;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=false"/>
      <remove name="LocalSqlServer"/>
      <add name="LocalSqlServer" connectionString="Data Source=RELSEC_FE\SQLServer2005;Integrated Security=True;AttachDBFilename=|DataDirectory|TimeTracker.mdf;User Instance=false"/>
     </connectionStrings>

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    04-28-2009, 8:52 AM
    • Member
      2 point Member
    • maybetommorow
    • Member since 04-28-2009, 12:36 PM
    • Posts 1

    I had some Visual Web Designer created <add name=> tag that was messing things up, I changed it as you directed (to 'LocalSqlServer', removing/creating) and it finally worked.  Days if effort would have been saved had I happened across your article.  I have no idea why VWD creates useless code like this in web.config, should have written it myself really and not relied on it in all honesty.  Many thanks for post Scott.

  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    05-04-2009, 11:26 PM

    Thats great

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    06-02-2009, 11:23 PM
    • Member
      7 point Member
    • milan.s
    • Member since 05-20-2009, 3:53 AM
    • Posts 13

    Hi,

    I am having a similar problem on sqlserver, but i get it only on login page after submit, other wise its working fine.

    do you have any suggestions?

    Thanks in advance.

    >>>>>>>>>>>>>

    System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured

    SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

    [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
    System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4860189
    System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90
    System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
    System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
    System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
    System.Data.SqlClient.SqlConnection.Open() +122
    System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +87
    System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +221
    System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +815
    System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
    System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
    System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +78
    System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +60
    System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +119
    System.Web.UI.WebControls.Login.AttemptLogin() +115
    System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101
    System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
    System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

    Milan S
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    06-03-2009, 7:02 AM
    • Member
      13 point Member
    • fmorris0
    • Member since 05-16-2008, 1:54 PM
    • Posts 9

    It doesn't appear your specific error has anything to do with the subject of this thread (user instance flag in connection string), so my advice is to start a whole new thread to help increase the chances of getting an answer.

  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    06-07-2009, 11:02 PM

    Can you please start new thread, as this is the different one from original post

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    09-10-2009, 2:08 PM
    • Member
      5 point Member
    • JillG
    • Member since 10-22-2008, 3:54 PM
    • Posts 14

     I have gotten this error also. I am using VS 2008 TFS, and am trying to install the Northwind db so that I can demo the following tutorial http://www.asp.net/learn/data-access/tutorial-49-vb.aspx.

    I am running SQL Server 2005, and had already had the northwind db on it, but for somereason when I built the site's code, it didn't recognize it.... so whatever, I attached their version of the northwind db.

    After reading others' posts on this problem (http://social.msdn.microsoft.com/forums/en-US/sqlexpress/thread/0d94d542-6366-48df-9d6b-2771261944e3/ and (http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/0738cb01-106f-4376-b92d-a977a022ece8), I have modified the connection string in my project to ="Data Source=(local)\;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated Security=True".

    I'm not sure I understand what follows this- should I detach and then reattach the db?

    Please help.

    Thanks~ Jg

    Newbie here... please be gentle, and explain to the nth degree

    ASP.NET 3.5
    VS 2008
    Filed under: , , ,
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    09-15-2009, 1:09 AM

     Are also getting same error

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    09-16-2009, 9:38 AM
    • Member
      5 point Member
    • JillG
    • Member since 10-22-2008, 3:54 PM
    • Posts 14

     Honestly cannot tell you idea what I did to get this working that I hadn't already tried before... but I wanted to post my connection string incase anyone has this problem in the future.

    connectionString

    ="Data Source=(local)\;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated Security=True;User Instance=False"

     

    Newbie here... please be gentle, and explain to the nth degree

    ASP.NET 3.5
    VS 2008
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    09-16-2009, 7:29 PM
    • Member
      13 point Member
    • fmorris0
    • Member since 05-16-2008, 1:54 PM
    • Posts 9

    When you are using SQL Server (the one you pay for) instead of SQL Server Express (the free one), you must either (1) do as you have done and specify User Instance=False or (2) leave it out completely.


    One way I know you are using "regular" SQL Server instead of SQL Server Express is that the Data Source value in your connection string is "(local)\" instead of ".\sqlexpress" or "(local)\sqlexpress".

  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    09-16-2009, 11:00 PM

     I already post this in my previous reply

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
Page 3 of 3 (43 items) < Previous 1 2 3