Trusted connections between XP and a SQL instance on a different machine.

Often in production ASP.NET environments the web server is not part of a domain (per security guidelines) and yet would benefit from a trusted connection to the SQL server. Using trusted connections is well explained in this article:

Using trusted connections with asp.net.

In my development environment I maintain SQL on a different machine than I develop on as well. Although the best solution to trust is using proper application pools, Windows XP (from which I write code on and run my IIS tests) does not support them. In this case, the "editing the default context" solution works well.

The idea is simply to set the ASPNET account of both machines to the same password. This has the benefit of limiting access for compromised ASPNET accounts to only those rights the ASPNET account normally has (which is quite limited compared to a standard account). Once this is done, the tag needs to have the user name and password updated.

Note that while it is true that .NET's config files are to be found at %systemroot%\microsoft.net\framework\\config, the version 2.0 config file usually will have a processmodel tag that reads: and nothing more.

To get a more useful process model tag, open "machine.config.comments" and copy the processmodel tag over and then edit with the appropriate user name and password. This will need to be done on each machine with a modify ASPNET account. The earlier versions simply require editing the tag.

Category: