Library tutorials & articles

SQL Trusted Connections with ASP.NET

Editing the default context

If you are running IIS5 and all that seems like too much effort, or you have multiple web applications and do not wish to edit every single system.web and IIS virtual directory you can edit the default context for asp.net. As I have already said asp.net runs under the ASPNET user. This account already has the correct permissions but the password was set on installation of the framework and we don't know what it is. What we can do is reset the password for this user, (remembering to setup an ASPNET user on the SQL server with the same strong password) then edit machine.config to tell the .net framework to use this new password. Unfortunately you must enter the password in machine.config in plain text, but as this file lives in

c:\windows\microsoft.net\framework\versionNumber\config

the risk of exposure via a hacked FTP account, or a leaking web service is minimal.

To reconfigure the asp.Net process model to use the new password search web.config for the processmodel tag and enter or change the identity parameters to contain your new password

<processmodel
...
userName
="ASPNET" password="ASPNETpassword"
...
/>

Don't forget to restart IIS.

Comments

  1. 01 Jan 1999 at 00:00

    This thread is for discussions of SQL Trusted Connections with ASP.NET.

Leave a comment

Sign in or Join us (it's free).

Barry Dorrans
AddThis

Related podcasts

  • CodeCast Episode 9: 2008 Year in Review

    CodeCast Episode 9: 2008 Year in ReviewOur special 2008 year in review episode with hosts Ken Levy and Markus Egger, joined by special guest co-host Rick Strahl of West Wind Technologies. Topics · Visual Studio (@ 2:37) · Languages (@ 6:28) · SQL Server (@ 10:15) · ...

Events coming up

  • Nov 18

    15 Minutes of Fame

    Dresher, United States

    This is a yearly tradition. We select 10 of the favorite speakers from monthly meetings, code camps, and hands on labs. Each one does a 15 minute talk on their favorite .NET technology. This is our 10th anniversary so we plan a gala event with special prizes and refreshments.

We'd love to hear what you think! Submit ideas or give us feedback