Monday, March 19, 2012

Deploying SQL Express with ASP.Net Application

I have a small ASP.Net application developed in VS 2005 that I would like to deploy with SQL Express.

I have included the MDF file in the Application and added SQL Express as a pre-requisite for the Setup and Deployment project.

It installs SQL Express but when it tries to connect I receive:
"This is not a valid login Cannot open user default database. Login failed. Login failed for user 'NT AUTHORITY\SYSTEM'."

I don't seem to have any options using the "prerequisite options in VS 2005 in terms of command line deployment parameters.

Likewise I would prefer to attach the database to the instance (because I need to write a connection string from a PDA using RDA and I have zero clue how to do RDA directly back to the file).

Thanks for any help!
If you do not impersinate the user within your Asp application, the service account which the ASP Service is running with is used to connect to the SQL Server. If this account is not priviledged to access the server, you will get the mentioned error message. I don′t know how your application design is, but if you want to leave it as it is, you will have to grant access for the SYSTEM account to the server.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment