Showing posts with label included. Show all posts
Showing posts with label included. Show all posts

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

Tuesday, February 14, 2012

Deny Anything to sa Account in SQL Express?

No.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"JohnJohn" <JohnJohn@.discussions.microsoft.com> wrote in message
news:88E5AC42-E241-4365-9D82-5D000664A2F3@.microsoft.com...
> Hello. My client is distributing an application that uses SQL Server 2005
> Express and mixed mode authentication. Most, if not all, of our users
> will
> be installing SQL Server 2005 Express only for our application.
> We want to be able to prevent ANY users (including sa) from being able to
> select, insert, create tables, views, etc. except through the application.
> Is this even possible?
> Thanks,
> JohnHello. My client is distributing an application that uses SQL Server 2005
Express and mixed mode authentication. Most, if not all, of our users will
be installing SQL Server 2005 Express only for our application.
We want to be able to prevent ANY users (including sa) from being able to
select, insert, create tables, views, etc. except through the application.
Is this even possible?
Thanks,
John|||No.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"JohnJohn" <JohnJohn@.discussions.microsoft.com> wrote in message
news:88E5AC42-E241-4365-9D82-5D000664A2F3@.microsoft.com...
> Hello. My client is distributing an application that uses SQL Server 2005
> Express and mixed mode authentication. Most, if not all, of our users
> will
> be installing SQL Server 2005 Express only for our application.
> We want to be able to prevent ANY users (including sa) from being able to
> select, insert, create tables, views, etc. except through the application.
> Is this even possible?
> Thanks,
> John