locked
newbee - sql connection RRS feed

  • Question

  • User102458291 posted

    I'm not sure how the club site starter kit is setup for the databases.  The project compiled and ran fine, but I couldn't figure out how to add events to the tables.  so then I installed SQl  server management studio expresds 2005 now I'm getting the following compile error.  I'm really not sure what I'm doing, just winging it right now.   When I open SQL and try to attach to club.mdf I get error 'unable to open the physical file "...blah"   operating system error 5: (Access is denied.). (Microsoft SQL Server, Error: 5420)

    Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. 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: Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

    Source Error:

    Line 4:  
    Line 5:  	void Application_Start(object sender, EventArgs e) {
    Line 6:  		if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators");
    Line 7:  	}
    Line 8:  	

    Source File: c:\GCR\Global.asax    Line: 6

    Stack Trace:

    [SqlException (0x80131904): Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
       System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
       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) +4861315
       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.SqlRoleProvider.RoleExists(String roleName) +478
       System.Web.Security.Roles.RoleExists(String roleName) +73
       ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\GCR\Global.asax:6
    

    Monday, October 18, 2010 8:03 PM

All replies

  • User1949625403 posted

    hi klhart1

    try these links may be it helps you

    http://blog.krisvandermast.com/FailedToGenerateAUserInstanceOfSQLServerDueToAFailureInStartingTheProcessForTheUserInstanceTheConnectionWillBeClosed.aspx

    http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/9d895464-f5f2-44fe-aeec-0b2882c25263/

    http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/f5eb164d-9774-4864-ae05-cac99740949b

    http://www.aspdotnetfaq.com/Faq/fix-error-Failed-to-generate-a-user-instance-of-SQL-Server-due-to-a-failure-in-starting-the-process-for-the-user-instance.aspx

    Monday, October 18, 2010 11:22 PM
  • User102458291 posted

    I read the links and nothing recommended worked for me.  Please note that I'm using Vista.  I've un-installed SQl express 2005 .  Then tried to install sql 2008.  Now I show both of them in my startup menu, but nothing no sql server can be found.  From my asp.net application, no data connection can be made.

    What SQL install do I need?  I notice the clubsite starter kit is ~ 2006 timeframe, is it still valid for use with the new SQL and visual studio tools?

    Is there another way to get me up and running to create a website with a functioning calendar?  I really like the clubsite, but I'm going crazy trying to get the database connections. 

    Thanks for any help to point me in the right direction, Karey

     

     

    Tuesday, October 19, 2010 7:26 PM
  • User1275632693 posted

    I have been away from this Kit and ASP.NET for ages now, just looking here reminds of the nightmars gone by.

     

    But for the sake of trying to help you out,

    Usually from what I rememeber you must also run the ASP.NET configuration by using the CTL F5 from inside VISUAL STUDIO and I do remember something

    about aspregnet for the sql.

     

    Hope that helps you get off on  the right foot.

     

     

    EDIT:

     

    AS a side note, I looked for other instances of people solving this:

    I had to uninstall and reinstall SQL server 2005 and Express on my development machine. After the un-installation, I reinstalled SQL 2005 standard then SQL Express. When I tried to open a SQL express database in VS2k5 I got the error “Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.” After much searching, I found out the solution.

    1. Open SQL Server Configuration Manager. Navigation to Start > Microsoft SQL Server 2005 > Configuration Tools > SQL Server Configuration Manager

       

    2. Double-click SQL Server (SQLEXPRESS) and change it to use LocalSystem

    3. Delete the folder
      Windows Vista: C:\Users\[user]\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS
      Windows XP: c:\Documents and Settings\[user]\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS
      more info at: http://forums.microsoft.com/msdn/showpost.aspx?postid=98346&siteid=1

    That’s it.

    Does that fix your problem?

    This page is here:

    http://www.emadibrahim.com/2007/06/08/failed-to-generate-a-user-instance-of-sql-server-due-to-a-failure-in-starting-the-process-for-the-user-instance-the-connection-will-be-closed/

     

     

    Thursday, December 9, 2010 11:10 AM
  • User-1713963239 posted

    For the SQL settings could we not go to our cpanel, php settings>DB name>settings>and edit thereon or at least ensure they will match our confile php file? I had problem using a subdomain and this helped tweak the configuration settings for me. 

    Saturday, January 8, 2011 6:15 PM