Saturday, October 30, 2010

VS2010 elevated to load local Web Apps

I just thought I would share with you a couple of things I had to go through to get Visual Studio 2010 to build a couple of my projects on a new Windows 7 machine.

1) Firstly there was the problem with getting Visual Studio elevated in order to load my Web Application projects, deployed on the local IIS. I kept getting this error...


...and the error message in the Console dialog was this:
MyWebProject.csproj : error : The Web Application Project MyWebProject is configured to use IIS. To access local IIS Web sites, you must run Visual Studio in the context of an administrator account.
Of course I could simply right-click my "Microsoft Visual Studio 2010" short-cut and select "Run as administrator" but that is not something I want to do everytime I open up VS2010 and it will not work on solution files.

My solution is to tell Windows ALWAYS to run devenv.exe in an elevated state. This we do with a right-click on the "Microsoft Visual Studio 2010" short-cut and go into properties:

In there, we enter the "Compatibility" tab and select "Change settings for all users" (if you need to) and then check "Run this program as administrator" under "Privilege level":
And that is it!

2) When that was done, there was the problem with the endless UAC dialog.


So, we abandon the UAC notifications. This is easily done using the UAC Settings dialog accessible in the Control Panel. We move the lever down to "Never notify"...


...and then we have that one sorted.

0 comments: