I’m in the middle of teaching my Programming ASP.NET class out here in snowy Portland, Maine. As part of my experience in running under an account with non-administrative privileges, I have had to figure out how to debug ASP.NET applications while running under a non-administrative account.
I found a lot of very useful information in this excellent article by Lars Bergstrom that describes how to run Visual Studio .NET with non-administrative privileges. This should be required reading for all Visual Studio .NET devs.
The problem that you run into right away is that, by default, the aspnet_wp.exe worker process runs under the ASPNET account. Since this is a different account on your computer, you need to have the SeDebugPrivilege enabled on your account before you can debug code running in a different security context.
I’m not entirely happy with enabling the SeDebugPrivilege on my domain account, since this potentially opens up a glaring security hole on my computer. Besides, I can’t enable this privilege while teaching this class since I can’t directly see my domain controller at home.
My compromise solution is to force the aspnet_wp.exe process to run under my domain account. Unfortunately, this solution requires that I store my domain password in plain text in the machine.config file. I can adjust the ACL’s on this file so that only admins on my machine can read it, but I’m still not all that comfortable with storing my credentials in plain text on my computer.
I hope that MS will use the Windows DPAPI to store the aspnet_wp.exe process credentials in a future version of ASP.NET.
3 archived reader comments
Rick Childress (2002-11-19)
John, you read my mind....
Dave Lee (2002-11-19)
You ready more than few minds I guess. A friend was wondering about this same problem.
Lars Bergstrom (2003-02-20)
I’ll see what I can dig up on this. Right now, I personally cheat and use internal builds of Windows Server 2003, which makes this really easy to do (since IIS lets you run individual pieces with different credentials, stored off in the crypto-store). But I’ll see if there’s something better to do here. Thanks for the great feedback!