Library tutorials & articles
SQL Trusted Connections with ASP.NET
- Introduction
- Impersonation
- Editing the default context
- IIS6 in Native mode
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.
Related articles
Related discussion
-
High-Performance .NET Application Development & Architecture
by Manjot Bawa (0 replies)
-
User does not have permission to perform this action error
by James Crowley (6 replies)
-
Incorrect syntax near 'Calculation'.
by ramdhavepreetam (3 replies)
-
Not able to launch the web application
by NaseemAhmed (0 replies)
-
Research topic in software
by reachsangeethamathew (0 replies)
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.
This thread is for discussions of SQL Trusted Connections with ASP.NET.