Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

SQLExpress w/Windows 7 x64

Avatar of coecho
coecho asked on
.NET ProgrammingMicrosoft SQL Server 2005Windows 7
8 Comments1 Solution1240 ViewsLast Modified:
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)
   at System.Data.SqlClient.SqlConnection.Open()
   at Flatiron.Forecasting.BusinessServices.GetCurrentJob()
   at Flatiron.Forecasting.ForecastingForm.LoadJob()

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.

Avatar of graye
grayeFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers