Trusted Connection, SQL Server, and ASP.NET
Posted on 2004-10-21
We have our IIS server and SQL server on separate boxes. Up until now, we have configured a separate login on the SQL server, call it db_user, given it access to the databases the (intranet, no external access) web site needs, and used a connection string in our ASP.NET pages like:
"workstation id=\iisserver\;packet size=4096;user id=db_user;data source=sqlserver;persist security info=True;initial catalog=ACASCRM;password=mypassword"
which has worked fine. Now however, we have gone to a new sqlserver and are not permitted to create db_user. Instead, we are required to use windows authentication and so a new sql server login is created which is one of our active directory groups. Users who are members of this group should have access to the database via the asp.net pages.
I understand that in this case we must use this connection string:
"Data Source=sqlserver;Initial Catalog=acascrm;Integrated Security=SSPI;"
we already have the IIS configured so that the user must log in to have access to the web page (Integrated WIndows authentication, anonymous access off). What else do we have to do to pass the windows credentials to the SQL server database?