0

I have VS 2008 + SQL server 2005 express. I created one web application and later on i installed VS 2010 + SQL server 2008 for other purpose. When i went back to VS 2008 and tried to access my database it was not accessible as it was upgraded to 2008 automatically. SO I uninstalled both SQL server 2005 +2008 and reinstalled SQL server 2005 express. Then Deleted a folder in the position C:/users/[ur name]/AppData/Local/Microsoft/Microsoft SQL Server Data/SQLEXPRESS and run my application in VS 2008.Everything works fine. I hosted it on IIS server and tried to access but getting the "Failed to generate SQL instance..." error. I dont know what else do i need to do. Why I'm getting this error on IIS when it is working fine in VS 2008?

slm
  • 11
  • 5
  • 1
    It's hard to understand your question. Please format it properly and provide the complete error information (maybe look at Event Viewer / Application log?) – surfen Mar 22 '12 at 20:43
  • I think you need to check if port is closed when using IIS – user123_456 Mar 22 '12 at 20:43
  • @denonth, how will will check that the port is closed when using IIS? Before installing VS 2010, when I hosted my application on IIS, it used to work fine. It started when I uninstalled both and reinstalled 2005. Is there any registration to IIS or something like when we install SQL server – slm Mar 22 '12 at 20:49
  • http://stackoverflow.com/questions/11747389/sql-server-express-failed-to-generate-user-instance/15267677#15267677 This answer may also help!! – Shachi Mar 19 '13 at 08:44

1 Answers1

0

I got the solution. Go to IIS Manager/[Computer name]/Application Pools click on defaultAppPool and then Advance settings on the right hand side. Under Process model/Identity, check Built-in Account radio button and select LocalSystem from the dropdown list. Then the application started working on the server.

slm
  • 11
  • 5
  • Yep, and now your application, if compromised, gives the cracker full control over the hosting server - the LocalSystem account has lots of privileges. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms684190(v=vs.85).aspx – tomfanning Mar 23 '12 at 20:56