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:

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

    08-22-2005, 5:47 PM
    • Member
      225 point Member
    • nnnnnpatel
    • Member since 10-12-2004, 2:32 PM
    • california
    • Posts 53

    I installed my timetracker.mdf on SQL 2005 Server while following one of the suggestion on this forum (DBinstall posting: http://forums.asp.net/943216/ShowPost.aspx).  However, I can't seem to configure my membership profile schema.  There is no aspnet_regqsl command.  I am getting the following errors:

    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:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [SqlException (0x80131904): The user instance login flag is not supported on this version of SQL Server. The connection will be closed.]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +684883
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1751
       System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +32
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +601
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +159
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +108
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +445
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +304
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
       System.Data.SqlClient.SqlConnection.Open() +111
       System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +173
       System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +225
       System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved) +777
       System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +152
       System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +68
       System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +100
       System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +99
       System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +113
       System.Web.UI.WebControls.Login.AttemptLogin() +165
       System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +134
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
       System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +107
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +164
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3870
    


    Version Information: Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44


    Can some tell me what I did wrong?



    thanks
    Nick

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

    09-10-2005, 11:00 PM
    • Member
      5 point Member
    • slickb
    • Member since 09-11-2005, 2:58 AM
    • Posts 1

    Hey nick, I'm not sure if you figured this out already, but I ran into the same problem by adding the correct permissions to my sql aspnetdb.mdf database.  What it appears is happening is that the web app cannot

    log into the database to check and see if you are authenticated. 

     

    Hope that helps..

     

    Brian

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

    10-19-2005, 11:02 AM
    • Participant
      1,758 point Participant
    • OWScott
    • Member since 08-12-2002, 5:25 PM
    • North Carolina
    • Posts 350
    • ASPInsiders
      TrustedFriends-MVPs
    The issue is that User Instancing, which allows the automatic creation of databases from code, isn't support on the full version of SQL 2005.  That is a function of SQL Express only.  The solution is to manually create the database in SQL Server 2005 and set a connection string to point to it.  You will also need to run aspnet_regsql.exe manually against the database if you will be using any of the new built-in database features of ASP.NET v2.0.

    Scott Forsyth

    http://www.orcsweb.com
    Managed Complex Hosting
    #1 in Service and Support

    Scott Forsyth
    Director of IT
    ORCS Web, Inc
    www.orcsweb.com
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    10-19-2005, 2:35 PM
    • Member
      225 point Member
    • nnnnnpatel
    • Member since 10-12-2004, 2:32 PM
    • california
    • Posts 53
    Thanks Scott, I will try that.

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

    11-18-2005, 8:17 AM
    • Member
      105 point Member
    • JimRieck
    • Member since 06-29-2005, 6:16 PM
    • Posts 21
    Scott, 

       I am having that same problem on this thread.  My question is, what is the structure of the database that we need to create to correct this issue?

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

    11-18-2005, 12:06 PM
    • Participant
      1,758 point Participant
    • OWScott
    • Member since 08-12-2002, 5:25 PM
    • North Carolina
    • Posts 350
    • ASPInsiders
      TrustedFriends-MVPs
    Two of the current 3 starter kits have the .sql files available for download separately but the Time Tracker doesn't.  My guess is that if you download it, extract it and search for files called *.sql you'll find the manual install files.  Run that using Query Analyzer, or whatever you prefer, and it will build the database structure for you.

    http://asp.net/default.aspx?tabindex=5&tabid=41#Reports

    Scott
    Scott Forsyth
    Director of IT
    ORCS Web, Inc
    www.orcsweb.com
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    11-18-2005, 12:40 PM
    • Member
      105 point Member
    • JimRieck
    • Member since 06-29-2005, 6:16 PM
    • Posts 21
    Thanks so much for your help.  OK, another question.  I ran the aspnet_regsql.exe program and it the tables in one of my existing databases on SQL Server Standard edition.  Where do I tell the new login controls to connect to that database?  What would the connection string look like?

    Jim



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

    11-18-2005, 3:57 PM
    • Participant
      1,758 point Participant
    • OWScott
    • Member since 08-12-2002, 5:25 PM
    • North Carolina
    • Posts 350
    • ASPInsiders
      TrustedFriends-MVPs
    Jim,

    By default you should set a connection string in your web.config file called LocalSqlServer which will handle all of the ASP.NET database driven features.  You can override this by setting your providers manually in web.config, or adjusting the global .config files, but the default is LocalSqlServer.

    I don't know the Time Tracker Starter Kit but you should notice after you create a new one that the web.config has some connection strings already set in web.config.  Just point them to your sql 2000 database.

    www.connectionstrings.com has a good list of connection strings that you can use to connect to your database.

    Note that to use LocalSqlServer in web.config, you must 'remove' it from web.config because it has already been defined in your global. config files.  Something like this:
        <connectionStrings>
            <remove name="LocalSqlServer" />
            <add name="LocalSqlServer" connectionString="{connection string goes here}" providerName="System.Data.SqlClient"/>
        </connectionStrings>

    Scott
    Scott Forsyth
    Director of IT
    ORCS Web, Inc
    www.orcsweb.com
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    11-20-2005, 2:40 PM
    • Member
      105 point Member
    • JimRieck
    • Member since 06-29-2005, 6:16 PM
    • Posts 21

    Hi Scott,

        It took some doing, but I got it.  Thanks for your help.  Good solution!

     

    Jim

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

    11-20-2005, 8:42 PM
    • Participant
      1,758 point Participant
    • OWScott
    • Member since 08-12-2002, 5:25 PM
    • North Carolina
    • Posts 350
    • ASPInsiders
      TrustedFriends-MVPs
    Great, glad that worked out in the end.  Thanks for the confirmation.

    Scott


    Scott Forsyth
    Director of IT
    ORCS Web, Inc
    www.orcsweb.com
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    12-07-2005, 2:22 AM
    • Member
      420 point Member
    • BugInfested
    • Member since 12-04-2005, 4:31 AM
    • Posts 107

    Scott,

    I'm getting the same error message (The user instance login flag is not supported on this version of SQL Server. The connection will be closed), except it's from trying to run/access the Club web site starter kit from my localhost & local SQL Server 2005.

    I have the LocalSqlServer connection string.  I have the <remove name="LocalSqlServer" />.  I have manually created my Club database.  I've ran the aspnet_regsql.exe against my database.

    However, I'm still getting that error message.

    Any suggestions?

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

    12-29-2005, 6:19 AM
    • Participant
      1,377 point Participant
    • fmardani
    • Member since 05-19-2003, 8:38 AM
    • Posts 303

    Hi,
    I had the same problem and now it seems that I can connect (Had to change the webconfig.)

    The error now is:
    Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

    This SP can not be found in .sql that came with the download.

    Any thoughts please?
    Thanks

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

    12-29-2005, 10:51 AM
    • Participant
      1,758 point Participant
    • OWScott
    • Member since 08-12-2002, 5:25 PM
    • North Carolina
    • Posts 350
    • ASPInsiders
      TrustedFriends-MVPs
    That stored procedure is part of the ASP.NET v2.0 framework.  To install that, run aspnet_regsql which is in your framework folder.  It has a GUI so just double click and follow the prompts.  That will install the .NET schema in your database which will solve this particular issue.

    Scott


    Scott Forsyth
    Director of IT
    ORCS Web, Inc
    www.orcsweb.com
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    12-29-2005, 12:29 PM
    • Participant
      1,377 point Participant
    • fmardani
    • Member since 05-19-2003, 8:38 AM
    • Posts 303
    Where do I find this folder please?
    Thanks
  • Re: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

    12-29-2005, 1:17 PM
    • Participant
      1,758 point Participant
    • OWScott
    • Member since 08-12-2002, 5:25 PM
    • North Carolina
    • Posts 350
    • ASPInsiders
      TrustedFriends-MVPs
    It's %windir%/microsoft.net/framework/v2.something.  Should be v2.0.50727 if you are running the released version of the framework.  For example:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

    Scott


    Scott Forsyth
    Director of IT
    ORCS Web, Inc
    www.orcsweb.com
Page 1 of 3 (43 items) 1 2 3 Next >