I cannot get SQLExpress 2005 SP3 to run correctly on Windows 7 x64. I'm able to install and it runs fine (I installed the 64 bit version) and I'm able to attach my local .mdf file via the command line - but when my client application tries to call the first Stored Procedure in the local SQLExpress 2005 .mdf file - I'm receiving the following error:
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.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
I have this Client Code and the same .mdf and versions of SQLExpress installed on XP SP3 and Windows 2003 - and do not have any issues. And, I did test the "attach" function via the command line and was able to "attach" my .mdf file to the SQLExpress instance.
I also changed the ownership of the User file where the Application was installed to ensure that everyone has access to the folder.
The specifics of what I'm trying to do:
VS 2008 Project using ClickOnce to Install Client Application via a File Share
As a part of the ClickOnce install, SQLExpress 2005 SP3 as well as a SQLExpress .mdf are installed on the Client's machine to allow users to work and save their data offline.
Any ideas as to what may be going on here? I've spent several days on this already and I know this is a very common SQLExpress error - but none of the online posts are relevant to what I'm tyring to do and I'm not using Terminal Services to try and run the Client Application and the SQLExpress .mdf files are correctly installed in the User Instance on the Client Machine and it's working correctly on Windows 2003 and XP.
Any help on this would be greatly appreciated.