Developing as Non Admin with Admin Access on a Server

Here is another cool trick for running under Non Admin that was shared to me be by Aaron and works like a charm.  The scenario is if you require Administrative privileges on an IIS Server but you still want to develop and design as non-admin on your local machine then you can do the following:

· Create a Quick Launch shortcut on your desktop to launch Visual Studio 2005 or Visual Studio.NET 2003

· In the location field type: runas.exe /u:ServerName\Administrator /netonly devenv.exe

Visual Studio 2005 or Visual Studio.NET 2003 will still run under your regular account with the same profile and least privilege, however, you will be authenticated on the network as ServerName\Administrator.

There is some debate where others recommend running the target application in an Application Pool with the same user account you log on with.  I would disagree with this approach as running the Application Pool in an account for which there is an interactive logon is not running as least privilege and nor does it truly emulate the production environment.