Our Recommendation

Monday, December 13, 2010

SQL Server Express and VS2010 Web Application .mdf errors (Weblogs @ ASP.NET) file

I have installed SQL Server 2008 and SQL Server 2008 Express on my new Windows 7 development environment with Visual Studio 2010. I could obtain SQL Server 2008 to work correctly, but I could not express .mdf database for the sample web application projects without receiving the error below:


Unable to generate an instance of SQL Server user due to a failure in starting the process for the user instance. The connection will be closed.


For example, I was creating an ASP.NET Web application. When I ran the application and attempt to register a new user, I received an error:


 


I muddled by many daunting trials I wore it while I tried to determine if the problem was due to the "patch incompatibility" necessary with SQL Server 2008 and Windows 7, or if it was due to SQL Server Express is installed correctly, or VS2010 arrrgggh! Needless to say that many of reinstalls many products made prior to the conclusion of the forum post below (and the fix was simple!):


http://forums.ASP.NET/t/1377174.aspx

Unable to generate an instance of SQL Server user due to a failure in starting the process for the user instance. The connection will be closed.

The highest position proposed delete directory SQLEXPRESS and rebooting, I did. It should be noted, my path was quite different from that recommended in the above post. I used the file manager to find "SQLEXPRESS".


C:\Users\Nannette\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

After reboot, I received another error: the specific instance or network error has occurred in establishing a connection to SQL Server. The server is not found or was not available. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Shared Memory provider, error: 40 - could not open a connection to SQL Server) One of the above post readers suggested patch below:

Go to: Control Panel--> > Services administrative tools


right-click the service SQL Server (SQLEXPRESS) then Properties-> Then GoTo Logon tab-> select the local system account option-> apply-> OK

Note in my Windows 7 install administration tools displayed in the Control Panel, so I had to find "Admin" from the Panel to the Administrative Tools icon. When I arrived, my local system account was already setup, what was not my problem.

However, by taking these steps I found the SQL Server Express has been set to automatic but has not started. This is why I started it.

I then returned to my web application and I was able to open the file ASPNETDB.MDF in my VS2010 environment, and I was able to run the application and register a new user! No more errors! Can be of your dreams in ASP.NET! Nannette Thacker

No comments:

Post a Comment