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)
-
VS.NET/sql server installation problem
by daspeac (4 replies)
-
Not able to launch the web application
by NaseemAhmed (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
-
Mar
15
DevWeek 2010
London, United Kingdom
DevWeek is Europe’s leading independent conference for software developers, database professionals and IT architects, and features expert speakers on a wide range of topics, including .NET 4.0, Silverlight 3, WCF 4, Visual Studio 2010, REST, Windows Workflow 4, Thread Synchronization, ASP.NET 4.0, SQL Server 2008 R2, LINQ, Unit Testing, CLR & C# 4.0, .NET Patterns, WPF 4, F#, Windows Azure, ADO.NET, Entity Framework, Debugging, T-SQL Tips & Tricks, and more.
This thread is for discussions of SQL Trusted Connections with ASP.NET.