Asp – Can’t attach to w3wp under Vista with UAC turned on

asp.netuacvisual-studio-2008windows-vista

I run Vista (business x32) on my work machine, in which I do ASP.NET development. Because I use IIS to server the sites I build (I do a lot of CMS integrations so I need to use IIS not the inbuilt web development server) I always need to attach to w3wp for debugging.

The problem is that w3wp requires elevated permissions for me to connect to the processes from VS 2008. But when I try and restart VS to "run as administrator" I get the error:
"This program has been blocked"
"Your administrator has set a policy to block this program"

I only get this problem when I'm logged into my machine with my domain account (which is in the local admin group), if I use the local admin I have no problems.

I'm the only person on the domain who has this problem, everyone else using Vista can open VS as an administrator no dramas.

To get around this I have to turn off UAC, but it always turns itself back on (after each restart), so this is highly frustrating.

I've not been able to find out how to add a program to the "safe" list either.

Best Answer

Have you asked the Domain Admins if they have a Group Policy which is re-enabling UAC?

It may be that Vista by default has only a few places that can run unrestricted and if you have Visual Studio installed outside those areas, it may be preventing it from running with elevated permissions.

Check where it is installed, and add its location as an "unrestricted" area within the Softwware Restrictions / Additional Rules area.

To do this follow these steps:

  1. Open the secpol.msc editor.
  2. Browse to Local Policies / Software Restriction Policies / Additional Rules.
  3. Then right click the right window and choose New Path Rule...
  4. Browse to the path where VS is installed and set the Security Level to Unrestricted.

See if that doesn't do the trick.

Good Luck!