Using SQL trusted connections with ASP.NET

From: Adam Getchell (AdamGetchell_at_discussions.microsoft.com)
Date: 03/02/05


Date: Tue, 1 Mar 2005 17:05:01 -0800

Hello all,

I've read over:

http://idunno.org/dotNet/trustedConnections.aspx

I would like to use a trusted connection vice using encrypted database
strings:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT11.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT11.asp

So, I've created a local account on both the IIS Server and the SQL server.
On IIS 6.0, I've created an Application Pool specific to my application, and
then configured it to run under the local account. On SQL Server 2000 server,
I created a local account with matching username and strong password, then
added the account in SQL EM, granted access to my application database.

Finally, I've changed my web.config file to have a connection string of the
form:

<add key="DatabaseConnection" value="server=myserver;Persist Security
Info=False;database=mydatabase;Integrated Security=SSPI;"/>

If the application runs in the new application pool configured with the
local account, I get the error message:

Service Unavailable

Of course, if I put my ASP.NET application back in the default connection
pool, the application is reachable, but fails upon the first database
connection due to a login failure which uses the machine's credentials.

Suggestions for how to implement this?

Thanks,



Relevant Pages

  • Re: ADO Connection Timeout
    ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Complicated Connection Problems bewteen ADP and SQL Server
    ... This database ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... might be in my ADO connection string. ...
    (microsoft.public.access.adp.sqlserver)
  • Complicated Connection Problem between ADP and SQL Server
    ... This database ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... might be in my ADO connection string. ...
    (microsoft.public.sqlserver.connect)
  • Re: ADO Connection Timeout
    ... so what happens when a connection failure forces one station to revert ... to a local database? ... Further, you *will* have contention issues, Jet does not support record ... to the central server, but you are willing to live with periods where it ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... When the first test is run, the results are stored in the central database. ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)