views:

439

answers:

2

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.

+1  A: 

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!

Jason Stevenson
A: 

You could write a script that disables UAC and then run that script every time you restart your computer, or maybe just before you launch VS.

Modify registry:

More options for disable/enable UAC:

I can open VS with "Run as administrator" under my domain account (which is in the local admin group) on my work computer, so I suspect something is wrong on your computer. And by now, you may have had you PC re-imaged, so perhaps the problem went away for you.

JohnB