VWD Express - In Website - Failed to generate a user instance of SQL Server

Hello,

I am having a terrible problem trying to create a f#$%!n simple sql server .mdf data directory under the website and do not know what the issue is and it is driving me crazy.

It is a very basic setup. I have Visual Web Developer Express and SQL Server Express Installed. I can access SQL Server Express with no problem from SQL Server Management Studio Express and can create databases there.

My system is a dev box, Windows XP SP2 and SQL Server Express is running under a user account with administrator priveleges.

However, when I am in the website and try to create a .wdf file in the data directory I get the hated "Failed to generate a user instance of SQL Server " error.

What to check for, as I am not using IIS in this case, just a supposedly pretty vanilla setup inside of VWD.

Thanks... I really need the help.

Drew

[938 byte] By [Drewid] at [2007-12-19]
# 1

Hi there, I've seen a similar problem before myself.

If it's the same problem as I had, then deleting the user instance copies of the system databases will do the trick. I am guessing that it will be the ASPNET user that is running these files, so go to

C:\Documents and Settings\<ComputerName>\ASPNET\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data

and delete the SQLExpress folder (or whatever instance name you're using).

This will force SQL Express to create a new set of system databases next time you run your web application.

ScottJBaldwin at 2007-9-9 > top of Msdn Tech,SQL Server,SQL Server Database Engine...

SQL Server

Site Classified