Library tutorials & articles
SQL Trusted Connections with ASP.NET
- Introduction
- Impersonation
- Editing the default context
- IIS6 in Native mode
IIS6 in Native mode
Finally, and probably most optimally, we have IIS6 which runs asp.net applications in native mode (you know you wanted to update to Windows 2003, here is your excuse). IIS6 allows you to create Application Pools, a context in which you can run one or more applications under. A pool controls performance, recycling of processes and most importantly for trusted connections the security context an application runs under. Again you must create a mirrored username and password on both the IIS server and the SQL server. To create a new pool start the IIS administration tool, right click on Application Pools and choose New Application Pool. Name your pool and click OK. Right click on your new pool name and choose Properties, then select the identity tab. You can now set the pool to run as your mirrored user. You must then change your application setting to use the new pool. Expand out the Web Sites tree, navigate to your application directory, or the web site containing your application, right click, choose Properties and choose the Home Directory tab. You can then change the Application Pool setting to your new pool and your application will run in the context you specified.
Side effects
There are side effects to using trusted connections. If each connection is opened under a different user account then these connections are not pooled between users. This then increases load on both the IIS server and the SQL server. Trusted connections also take more processing power when authenicating the connection than SQL style logins as the login tokens are now validated outside SQL by the NT authenication process. If you are validating against a domain you may see increased load on your domain controllers as well as the SQL server. Performance testing is pretty much mandatory before you role your web site out.
Summary
There is no real "you do it this way" answer to using trusted connections with asp.net, Microsoft's flexibility gives you multiple choices on how to solve your problem. It is up to you to decide the best way for your application.
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.