Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closedhttp://forums.asp.net/t/913172.aspx/1?Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedSun, 16 Oct 2011 05:44:28 -04009131721028706http://forums.asp.net/p/913172/1028706.aspx/1?Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedError Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed <p><font face="Arial">I&nbsp;installed my timetracker.mdf on SQL 2005 Server while following one of the suggestion on this forum (DBinstall posting: <a href="/943216/ShowPost.aspx">http://forums.asp.net/943216/ShowPost.aspx</a>).&nbsp; However, I can't seem to configure my membership profile schema.&nbsp; There is no aspnet_regqsl command.&nbsp; I am getting the following errors:<br> <br> <em>The user instance login flag is not supported on this version of SQL Server. The connection will be closed<br> </em><br> <strong>Description: </strong>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. <br> <br> <b>Exception Details: </b>System.Data.SqlClient.SqlException: The user instance login flag is not supported on this version of SQL Server. The connection will be closed.<br> <br> <b>Source Error:</b> <br> <br> <table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td><pre class="prettyprint">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.</pre> </TD></TR></TBODY></TABLE><BR><B><FONT face=Verdana>Stack Trace:</FONT></B> <BR><BR> <TABLE width="100%" bgColor=#ffffcc> <TBODY> <TR> <TD><pre class="prettyprint"><PRE>[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&amp; status, String&amp; password, Int32&amp; passwordFormat, String&amp; passwordSalt, Int32&amp; failedPasswordAttemptCount, Int32&amp; failedPasswordAnswerAttemptCount, Boolean&amp; isApproved) +777 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String&amp; salt, Int32&amp; 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 </PRE></pre></td> </tr> </tbody> </table> <br> </p> <hr width="100%" color="silver" size="1"> <p><b><font face="Verdana">Version Information:</font></b>&nbsp;Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44 <br> <br> <br> Can some tell me what I did wrong?<br> <br> <br> <br> thanks<br> Nick</font></p> 2005-08-22T21:47:12-04:001048318http://forums.asp.net/p/913172/1048318.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed <p>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.&nbsp; What it appears is happening is that the web app cannot</p> <p>log into the database to check and see if you are authenticated.&nbsp; </p> <p>&nbsp;</p> <p>Hope that helps..</p> <p>&nbsp;</p> <p>Brian</p> 2005-09-11T03:00:17-04:001087762http://forums.asp.net/p/913172/1087762.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed 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.&nbsp; That is a function of SQL Express only.&nbsp; The solution is to manually create the database in SQL Server 2005 and set a connection string to point to it.&nbsp; 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.<br> <br> <p></p> <p>Scott Forsyth<br> <br> <a href="http://www.orcsweb.com">http://www.orcsweb.com</a><br> Managed Complex Hosting<br> #1 in Service and Support<br> <font size="2"></p> </font> 2005-10-19T15:02:31-04:001088079http://forums.asp.net/p/913172/1088079.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed Thanks Scott, I will try that.<br> <br> Nick 2005-10-19T18:35:25-04:001117072http://forums.asp.net/p/913172/1117072.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed Scott,&nbsp;<br> <br> &nbsp;&nbsp;&nbsp;I am having that same problem on this thread.&nbsp; My question is, what is the structure of the database that we need to create to correct this issue?<br> <br> Jim 2005-11-18T12:17:48-05:001117343http://forums.asp.net/p/913172/1117343.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed Two of the current 3 starter kits have the .sql files available for download separately but the Time Tracker doesn't.&nbsp; My guess is that if you download it,&nbsp;extract it and search for files called *.sql you'll find the manual install files.&nbsp; Run that using Query Analyzer, or whatever you prefer, and it will build the database structure for you.<br> <br> <a href="http://asp.net/default.aspx?tabindex=5&amp;tabid=41#Reports">http://asp.net/default.aspx?tabindex=5&amp;tabid=41#Reports</a><br> <br> Scott 2005-11-18T16:06:13-05:001117386http://forums.asp.net/p/913172/1117386.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed Thanks so much for your help.&nbsp; OK, another question.&nbsp; I ran the aspnet_regsql.exe program and it the tables in one of my existing databases on SQL Server Standard edition.&nbsp; Where do I tell the new login controls to connect to that database?&nbsp; What would the connection string look like?<br> <br> Jim<br> <br> <br> <br> 2005-11-18T16:40:36-05:001117632http://forums.asp.net/p/913172/1117632.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed Jim,<br> <br> 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.&nbsp; You can override this by setting your providers manually in web.config, or adjusting the global .config files, but the default is LocalSqlServer.<br> <br> 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.&nbsp; Just point them to your sql 2000 database.<br> <br> <a href="http://www.connectionstrings.com">www.connectionstrings.com</a> has a good list of connection strings that you can use to connect to your database.<br> <br> 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.&nbsp; Something like this:<br> &nbsp;&nbsp;&nbsp; &lt;connectionStrings&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;remove name=&quot;LocalSqlServer&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name=&quot;LocalSqlServer&quot; connectionString=&quot;{connection string goes here}&quot; providerName=&quot;System.Data.SqlClient&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &lt;/connectionStrings&gt;<br> <br> Scott 2005-11-18T19:57:35-05:001118651http://forums.asp.net/p/913172/1118651.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed <p>Hi Scott,</p> <p>&nbsp;&nbsp;&nbsp; It took some doing, but I got it.&nbsp; Thanks for your help.&nbsp; Good solution!</p> <p>&nbsp;</p> <p>Jim</p> 2005-11-20T18:40:38-05:001118805http://forums.asp.net/p/913172/1118805.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed Great, glad that worked out in the end.&nbsp; Thanks for the confirmation.<br> <br> Scott<br> <br> <br> 2005-11-21T00:42:15-05:001134625http://forums.asp.net/p/913172/1134625.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed <p>Scott,</p> <p>I'm getting the same error message (<u>The user instance login flag is not supported on this version of SQL Server. The connection will be closed)</u>, except it's from trying to run/access the Club web site starter kit&nbsp;from my localhost &amp; local SQL Server 2005.</p> <p>I have the LocalSqlServer connection string.&nbsp; I have the &lt;remove name=&quot;LocalSqlServer&quot; /&gt;.&nbsp; I have manually created my Club database.&nbsp; I've ran the aspnet_regsql.exe against my database.</p> <p>However, I'm still getting that error message.</p> <p>Any suggestions?</p> 2005-12-07T06:22:07-05:001154180http://forums.asp.net/p/913172/1154180.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed <p>Hi,<br> I had the same problem and now it seems that I can connect (Had to change the webconfig.)</p> <p>The error now is:<br> <em>Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.</em></p> <p><em>This SP can not be found in .sql that came with the download.</em></p> <p><em>Any thoughts please?<br> Thanks</em></p> 2005-12-29T10:19:07-05:001154383http://forums.asp.net/p/913172/1154383.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed That stored procedure is part of the ASP.NET v2.0 framework.&nbsp; To install that, run aspnet_regsql which is in your framework folder.&nbsp; It has a GUI so just double click and follow the prompts.&nbsp; That will install the .NET schema in your database which will solve this particular issue.<br> <br> Scott<br> <br> <br> 2005-12-29T14:51:02-05:001154507http://forums.asp.net/p/913172/1154507.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed Where do I find this folder please?<br> Thanks 2005-12-29T16:29:01-05:001154582http://forums.asp.net/p/913172/1154582.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed It's %windir%/microsoft.net/framework/v2.something.&nbsp; Should be v2.0.50727 if you are running the released version of the framework.&nbsp; For example:<br> <br> C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727<br> <br> Scott<br> <br> <br> 2005-12-29T17:17:42-05:001154759http://forums.asp.net/p/913172/1154759.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed <p>Hi,<br> Ran the .exe<br> Now there is a new Db in sql 2005 called aspnetdb. I can see the missing SP now.<br> In the web.config of the timetracker I am pointing it to TimeTracker database. Is this ok? <br> And I am still getting the same error as before (i.e. dbo.aspnet_checksumversion sp is missing).<br> May be I should change the connectionstring of <font color="#ff0000" size="2">name</font><font color="#0000ff" size="2">=</font><font size="2">&quot;</font><font color="#0000ff" size="2">LocalSqlServer</font><font size="2">&quot;</font><font color="#0000ff" size="2">&nbsp;</font></p> <p><font color="#000000" size="2">&nbsp;to be pointing to this new DB (i.e <font size="3"> aspnetdb</font>)</font></p> <p><font size="2">And the connectionstring of&nbsp; <font color="#ff0000" size="2">name</font><font color="#0000ff" size="2">=</font><font size="2">&quot;</font><font color="#0000ff" size="2">aspnet_staterKits_TimeTracker</font><font size="2">&quot; to be pointing to TimeTracker database </font></p> <p><font size="2">?</font></p> <p><font size="2">Thanks</p> </font></font> 2005-12-29T20:11:56-05:001154934http://forums.asp.net/p/913172/1154934.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed Yep, looks like you're on the right track.&nbsp; I assume that the timetracker was developed so that the ASP.NET schema is controlled by the LocalSqlServerconnection string (by default).&nbsp; This allows you to have them both in the same database or have them separated.<br> <br> Scott<br> <br> <br> 2005-12-30T00:14:18-05:001976633http://forums.asp.net/p/913172/1976633.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed <font color="#0000ff" size="2"> <p>only need this one. you have to change as&nbsp;follow your&nbsp; connection string in Web.config please:&nbsp;</p> <p>&lt;</font><font color="#a31515" size="2">add</font><font color="#0000ff" size="2"> </font><font color="#ff0000" size="2">name</font><font color="#0000ff" size="2">=</font><font size="2">&quot;</font><font color="#0000ff" size="2">NORTHWNDConnectionString</font><font size="2">&quot;</font><font color="#0000ff" size="2"> </font><font color="#ff0000" size="2">connectionString</font><font color="#0000ff" size="2">=</font><font size="2">&quot;</font><font color="#0000ff" size="2">Data Source=here is your servername; Database=Northwind;Integrated Security=True;</font><font size="2">&quot;</font><font color="#0000ff" size="2"> /&gt;</p> </font> 2007-10-26T19:01:09-04:001980249http://forums.asp.net/p/913172/1980249.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed <p>Check in web.config for connectionString, configure it according to your server name, password etc.</p> <p>In Time Tracking System, it uses inbuild Membership classes for user creation, updation etc..</p> <p>You have to register your DB with ASP.NET Membership classes by executing the command line utility in VS prompt</p> <p>aspnet_regsql, it will open one window, where you&nbsp; have to configure DB.</p> <p>Hope it will help you, let me know.</p> 2007-10-30T03:31:19-04:002079501http://forums.asp.net/p/913172/2079501.aspx/1?Re+Error+Message+The+user+instance+login+flag+is+not+supported+on+this+version+of+SQL+Server+The+connection+will+be+closedRe: Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed <p>Hi,<br> I have SQL Server 2005 Developer Edition installed as an instance (computername\SQLServer2005) as the default one is SQL Server 2000.&nbsp; Now i changed the web.config as follows:&nbsp;<span style="font-size:10pt; color:black; font-family:Arial"> connectionString=&quot;Data Source=.\SQLServer2005;</span></p> <span style="font-size:10pt; color:black; font-family:Arial">This solved an error<br> <br> <strong>An error has occurred while establishing a connection to the server.&nbsp; When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) .</strong></span><span style="font-size:10pt; color:black; font-family:Arial"> <p style="margin:auto 0in">Then when i start the Time Tracker project I get error:</p> <p style="margin:auto 0in"><strong>Exception Details: </strong>System.Data.SqlClient.SqlException: The user instance login flag is not supported on this version of SQL Server. The connection will be closed.</p> <p style="margin:auto 0in">On one of the forum posting it mentioned to run C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe (Not sure why, something about allowing SQL Server 2005 to create database from an ASP.net app which it doesn't support unlike SQL Express).&nbsp; Anyway after runnign it a new DB was created in my SQL Server 2005 instance - aspnetdb.&nbsp; As part of the creation i choose Windows integration since i have mixed mode support in my DB (so Windows Authentication works when i use SQL Management STudio) and i figured it should work here.&nbsp; But when i start the Time Tracker app in Visual Web Developer 2005 Express Edition it still causes the error<br> <br> <strong>Exception Details: </strong>System.Data.SqlClient.SqlException: The user instance login flag is not supported on this version of SQL Server. The connection will be closed.<br> <br> I don't even see the timetracker database as being created in SQL 2005.&nbsp; When i had tested this app with SQL Express on another machine it created this DB in SQL Express.&nbsp; But i cannot get it to do the same for this SQL Server 2005 Developer Edition instance.&nbsp; Any suggestions would be appreciated.&nbsp;<br> P.S.: As you notice I'm a complete novice in programming and&nbsp;maybe intermediate&nbsp;in SQL Server so please give detailed steps if possible</p> <p style="margin:auto 0in">Thank you.</p> </span> 2007-12-27T17:18:30-05:00