On a web server with IIS, you can specify a domain account for the identity of an application pool. How do you accomplish the same thing with the Visual Studio 2010 debugger?
In the web application’s web.config file you can specify a username and password for processModel:
<system.web>
<processModel enable="true" userName="user" password="pwd" />
</system.web>
That either didn’t work or it’s not doing what I’d hoped.
I think what you have should work if you use IIS Express instead of the built-in Cassini web server with Visual Studio.
IIS Express acts exactly like the built-in web server (along with debugging, etc), but with a more realistic environment in which to test. Easiest way to download it is with the Web Platform Installer.
After you install it, right click on your project within Visual Studio and select “Use IIS Express…”