Error: "Failed to generate a user instance ...." SQL Server 2005 Express

Hi folks

I have a web site that I am developing using VWDE 2008 that includes a SQL Server 2005 Express (SSE) on my HDD.

My PC is a 64 bit Vista Ultimate.

When I look at the Database Explorer pane, there is a red x next to the DB icon.  If I click on the expand symbol (+) a dialog box pops up with the message sqlserver.exe has stopped working.  When I close the window another error message pops up saying:

"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."

The connection string is as follows:

"Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Users\harvey norman\Documents\Programming\Projects\CCF\CCFAjaxWebSite\App_Data\CCFWebSiteDB.mdf";Integrated Security=True;User Instance=True" 

I have done a google and tried various suggestions, but all to no avail.  The only way I can get it to work is to start VWDE as Administrator (Run as Administrator).

The same thing happens when I try to open a page that depends on the DB.

I hpe somebody can help me.

Kind regards

Ross

0
RossPetersen
9/24/2008 7:46:19 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

6 Replies
621 Views

Similar Articles

[PageSpeed] 58

Please change the SQL Server 2008 Express Edition service account from “Network service" to “Local system".

Go to All Programs -> Microsoft SQL Server 2005 -> Configuration Tools-> SQL Server Configuration Manager -> SQL Server 2005 Services, double-click the SQL Server instance name and change it.

For more information, please refer to the following document:

Working with User Instances
http://msdn2.microsoft.com/en-us/library/ms254504.aspx

 


Jian Kang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Jian
9/29/2008 2:09:48 AM

Hi Jian

Thanks for your help, unfortunately it didn't work - I already had made that change in response to the googling.

Kind regards

Ross Smile

0
RossPetersen
9/29/2008 10:16:08 AM
People pleaseeeeeeeeeeee i've been stuck in this for 10 dayssssss.. im going maaaaaaaad

 

erorr: 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

steps i've takes to solve this issue:

  1. change from network service to local system. 
  2. delete directory C:\Documents and Settings\myusername\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\ somthing (dunno the name coz i deleted it)
  3. grant full access to all asp memebr and sql related users .
  4. changed the  "User Instance=True"  to "User Instance=False" in the connection string which looks like this at the moment
     
    <connectionStrings>
    <add name="ASPNETDBConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="|DataDirectory|\ASPNETDB.MDF";Integrated Security=True;Connect Timeout=30;User Instance=False" providerName="System.Data.SqlClient"/>
    </connectionStrings>
     
  5. after all that didnt work.. i uninstalled the sqlexpress and reintsalled .
  6. uninstalled VS05 and installed VS08.
  7. everything is working fine locally but on the web server (which i log in to using remoteadmin and i have an administrator account on it) it doesnt work.
  8. im sure i've tried out all the solutions on every forum and search result by google. still nothing................. and im way passed my dead line.


    PLEASE HELP ME.

 


Life is so much like a road trip. you may run out of gas, but that wont stop you unless your a looser. ( FYI: i've never been on a road trip , but if i ever go on one and run out of gas, i know i wont quit. )

------------------------------------------------
Please mark as Answer if it answers your question
0
osamat
9/29/2008 11:00:23 AM

Hi osamat,

Please modify the parameter "connection timeout" with a value of 120, to the connection string and set the parameter "User Instance" to True.

 


Jian Kang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Jian
9/30/2008 2:15:13 AM
Jian Kang - MSFT:

Hi osamat,

Please modify the parameter "connection timeout" with a value of 120, to the connection string and set the parameter "User Instance" to True.

 

 This didnt work .... what is going on!!!! why isnt this problem goin away?!!!


Life is so much like a road trip. you may run out of gas, but that wont stop you unless your a looser. ( FYI: i've never been on a road trip , but if i ever go on one and run out of gas, i know i wont quit. )

------------------------------------------------
Please mark as Answer if it answers your question
0
osamat
10/4/2008 6:59:48 AM

 I am still getting the same 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.

 

i have compared my local invironment to the one on the remote server.. they match 

 

locally i have VWD 2008 Express + SQL Express 2005 ( that comes with the VWD ) and on the remote server i have the same. 

 

both config files are the same. 

both IIS settings and ASP.NET settings are the same.

Both inetpup\mydatafolder access rights are the same for the same users.

Both SQL servers use Local system and not Network Service. 

 

you see i have a development environment on the remote server.. i have full access over it . i access it using windows remote desktop connection . and i am a memeber of the local administrators group on the server. 

 

i have tried all your suggestions .. and nothing happened.. i keep trying day and day ( my job is on the line here ) .. keep modifying things and getting from one error to another to finally come back to this one " 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."

i am willing to uninstall everything from the server and then re-install ... but i doubt it will work because i tried it before and it didnt. 

 

any other ideas? any one ?!!


Life is so much like a road trip. you may run out of gas, but that wont stop you unless your a looser. ( FYI: i've never been on a road trip , but if i ever go on one and run out of gas, i know i wont quit. )

------------------------------------------------
Please mark as Answer if it answers your question
0
osamat
10/4/2008 11:52:32 AM
Reply:

Similar Artilces:

"Failed to generate a user instance of SQL Server" using sql server express and vwde. why?
I've set up a website on another computer using sql server express and visual web developer express, and it works as expected. However halfway through the development i've had to move to another computer. I installed visual web developer express + sql server express, and copied the project files across, but now when I attempt to run it I get 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. I've tried reinstalling the software and it doesn't help. Any idea why this is happening, and...

Error:"Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance"
Firstly, Im using VWD2008 express and SQL Server 208 express. I added the database file to SQLServer and managed to create a connection in VWD but when I try to view a page I get the above error. Probably some dumb neewby thing Im doing wrong but if anyone can help Id appreciate it.   Thanks Adam. If you are using the classifieds starter kit, make sure the .zip file you used reads "final" not "beta" And you do not need sql server to run the kit. All you need is vwd and the framework installed on your computer.Undo what ever you did and just run the prog...

"Failed to generate a user instance of SQL Server"
I have SQL Server 2005 SP1 Dev Edition installed on my laptop along with Visual Web Developer 2005.  I installed SQL Server Express 2005 SP1.  I then created a new web site using the Club Web Site template. I did the recommended initial build to get the Membership database installed and got an error page (http://localhost:1667/WebSitesVB2/): SQLExpress database file auto-creation 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. There were 4 recomme4ndations from the error page....

VB.NET login (SQL Server 2005) error: "Communication with the underlying transaction manager has failed"
Hi all,I am trying to setup a VB.Net development environment on my desktop for one of the application which was already in the production for couple of years (some unknown contractor(s) developed and maintained it so far). The application works fine on the web.Visual Studio 2005, .Net 2.0, SQL 2000, SQL Server 2005 were installed on my desktop. When I try to build the entire application/solution in the debug mode (i.e., with http://localhost/), build succeeds and I could get to the login.aspx. When I try to login, I am getting an error in the Visual Studio at the following code;connection = ...

sql express 2008
Hi  I've having nightmares since upgrading to SQL Express 2008.  I keep getting 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.I've scoured the web and done the below but still no luck. Deleted C:\Users\my and all users\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESSRun exec sp_configure 'user instances enabled', 1. ReconfigureAdded firewall exceptions and disabled the firewall although it should make no difference in this cas...

Getting error "Login failed for user ''. The user is not associated with a trusted SQL Server connection" on trying to authenticate a user
Hi, I created aspnetdb on Sql Server 2005 and modified my web.config LocalSqlServer connection string to connect to the Sql Server instead of mdf file on Sql Server. When i click Log In button on my login control i am getting the error "Login failed for user ''. The user is not associated with a trusted SQL Server connection" But when i bind a radio button list or any control to select from aspnet_users or roles table data is displayed fine without any login errors (i am using aspnetdbConnectionString given below for binding data). Why is it happening only when i authenticate but...

SQL Server 2005 error: "Incorrect syntax near "-" "
Hello, I have an application written in visual basic which connects to a SQL Server 2005In DB of SQL Server I have many tables. Table names can contain chars like: "-",  "\",  ".", etc. When I execute the instruction in visual basic sTableName= "Table-3" ' or ""Table-3"" or "Table_1" or sTableName= """" + "Table_1" + """"   -> """" = 4 quates (2 for string identify and two for writing in string a quate chr(34)->" strQu...

If I upgrade sql server 2005 express to sql server 2008 express, will my user instances in the 2005 database be transfered automaticly?
If I upgrade sql server 2005 express to sql server 2008 express, will my user instances in the 2005 database be transfered automaticly? Thanks! Hi asdpai, I am not sure if I catch your meaning.But if you want to upgrade the SQL Server 2005 Express to SQL Server 2008 Express, you may refer to the following link: Version and Edition Upgradeshttp://msdn.microsoft.com/en-us/library/ms143393.aspxHow to: Upgrade to SQL Server 2008 (Setup)http://msdn.microsoft.com/en-us/library/ms144267.aspxJian KangMicrosoft Online Community SupportPlease remember to mark the replies as answers if t...

error "Login failed for user ''. The user is not associated with a trusted SQL Server connection. "
All the research I found dealing with this problem is that the solution is to set SQLserver to mix mode.  I have SQL server already set to mix mode. I am not sure what else to do. Has anybody run into this problem? my connection string: <connectionStrings> <add name="ConnectionString" connectionString="Data Source= server name ; Initial Catalog=FILESHAREDB.MDF; Integrated Security=false;"providerName="System.Data.SqlClient"/> </connectionStrings>   Server Error in '/SendItNow' Application.  ...

Error message: Failed to generate a user instance of SQL Server. Only an integrated connection can generate a user instance
 Hello everybody,I was configuring a SqlDataSource control using SQL Authentication mode.I first added a database file (testdb.mdf) through Solution Explorer-Add New Items. Then through Database Explorer I created a table named "info"Then while configuring  the SqlDataSource control I used the SQL Authentication mode and attached the "testdb.mdf" database file.Test Connection showed success. But when I hit the Ok button of the wizard it displayed the following error message:Failed to generate a user instance of SQL Server. Only an integrated connection can gener...

"Failure to create a user instance"
 On Windows Server 2008 - I installed Visual Web Developer 2008 Express and SQL Server Express 2008 with Advanced.I ported over several Websites from a Windows 2003 Web Server.When I go into the V.W.D. Solution Explorer for a given website, I see the MDF files ported from 2003, but when I go into Database Explorer to work with the data,  I get a Package Load Failure and the database will not connect.  Instead it says, "Failure to create a user instance of SQL Server, due to a failure in starting the process for the use instance. The connection will be closed."And whe...

Error msg: Login failed for a user ". for VS 2005 websites with SQL Server 2005
Just installed SQL Server 2005 and tested my old VS 2005 ASPnet websites, which were connected toSQL Server 2000 databases before.  All my websites were created for local HTTP applications, coded with a connection string with User ID and Password.   The SQL Server 2000 was configured as mixed authentication (i.e. with User ID and Password).  These websites worked very well with SQL Server 2000 database server.Testing my old VS 2005 websites with SQL Server 2005 database, showed a 'Login failed for a User ''.' error msgalthough the 'Test Connection' on V...

Getting "When connecting to SQL Server 2005 Error" using MS SQL 2000?
I'm new to using VS2005 and this is my first project connecting to our MS SQL 2000. App worked fine on my dev PC, connection to the same MS SQL Server. Published the web site to the web server (same server running MS SQL Server) and getting the below error. Is this a permission setup problem on SQL Server or does it really think it's connecting with a MS SQL 2005 database? An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remot...

SQL Server 2005 error: "Invalid object name" / "Incorrect syntax near"
Hi All,This problem isent strictly to do with ASP.NET but I am creating an ASP.NET web application.Just a quick overview, I have recently had to reinstall windows on my machine becuase of an unrelated matter so before I did so i created an SQL script using the SQL Server Database Publishing Wizard so that the SQL Database could be recreated exaclty as it was.I have just reistalled SQL Server 2005 and the Managment Studio and have attempted to run the script.Once the script is run there are literally thousands of the following two errors:Invalid object nameandIncorrect syntax near ...It is ...

Web resources about - Error: "Failed to generate a user instance ...." SQL Server 2005 Express - asp.net.sql-datasource

Resources last updated: 1/21/2016 9:44:14 AM