Secure SqlConnection in Web apps

G

Guest

I have an ASP.NET application on IIS6 that will access a SQL2000 database. I would like to use integrated security, ie a connect string similiar to

ConnectionString = "workstation id=WEBSERVER;packet size=4096;integrated security=SSPI;data source=\"SQLSERVER\\INSTANCE\";persist security info=False;initial catalog=Northwind"

Naturally this fails running as-is

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection

I've tried setting the Default Web Application pool to run under a domain service account, and then granting permissions to the database for that account. However, that results in a "Service Unavailable

Any quick pointers to doing this the right way? I am currently reading through "Building Secure Microsoft ASP.NET Applications"

Thanks

--Adam
 
G

Guest

hi

just try to use like thi

"Data Source=SQlServerName;Initial Catalog=pubs;Integrated Security=SSPI;"
- or
"Server=SQlServerName;Database=pubs;Trusted_Connection=True;

Hope this will help u somewhat !

Thank
Piyush
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top