Problem deploying web application (SQL Server issue?)

I am trying to deploy an ASP.NET web application locally, for testing purposes. I can view the site through a web browser; however, when I try to use the user login, I get the following errors:

  1. 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 gotten this error before, but for a different reason. I got it when initially trying to deploy the application, and used this,

…to solve my problem, which worked. It does not work in this case, and I’m not sure why. My first thought was that I was targeting the wrong database, but I don’t think that was the issue.

  1. The other error that I’m getting has something to do with “NETWORK SERVICE” permissions, although I can’t replicate that at the moment. I have modified permissions for both the “App_Data” folder and its parent under the application directory in wwwroot.

I believe this to be a SQL Server issue. I am using:

  • SQL Server 2008 Express
  • IIS7
  • Visual Studio 2010 Professional

I may be deploying to earlier version of IIS upon project completion.

The application from wwwroot:

Any suggestions would be appreciated. Thank you!

  • Ryan Jackson

P.S. I am also creating a web application setup project, to make it easy for the end-user to set up the application on her PC. I am having some problems with that also. If anyone has any suggestions on that, or deploying a web application in general, please message me or post links to helpful articles.

2nd error text:
Cannot open user default database. Login failed.
Login failed for user ‘NT AUTHORITY\NETWORK SERVICE’

did you configure properly your SQL Server 2008? because you know when you install SQL Server 2008 it has a lot of issues and its difficult to a new user to install.

What configurations are you referring to?

This thread has some months under it’s belt. Are you still having the issue?

Also, based on that 2nd error - is your code trying to connect to the database using the “Network Service” account?

I’m not working on that project anymore, so I’m not sure. However, the code did not specify the Network Service account.

Cool deal. The 2nd error you pointed out gives me the impression that a username and password weren’t passed in the database connection string ASP.NET was using so it defaulted to use the “NETWORK SERVICE” account.

But since you’re all done with the project, we will allow this thread to gracefully fade away :cool:

That might be true. I just checked the Web.config, and the username and password were contained dummy values.

Thank you for following up on this. :slight_smile:

My pleasure! :smiley: