Reputation: 5139
When Visual Studio is run without admin. privileges and
I am registering .dll for COM interop the error message is:
Cannot register assembly "myassembly.dll" - access denied.
Please make sure you're running the application as administrator.
Access to the registry key 'HKEY_CLASSES_ROOT\' is denied.
I am running a web application on IIS the error message is:
The Web Application Project PSW is configured to use IIS.
To access local IIS Web sites, you must run Visual Studio
in the context of an administrator account.
I have set Visual Studio run as Administarator to avoid these errors. But UAC message annoys me (but I do not want to switch UAC off).
Is there a way to run Visual Studio normally and use COM Interop or IIS? I mean e.g. some access rights to registry or IIS or set regasm to run as admin.
Upvotes: 2
Views: 3686
Reputation: 63133
UAC requires an application to split itself into standard user friendly parts, and admin only parts, and then you can request elevation only when admin only parts are needed (elevation on the fly).
However, the current Visual Studio releases, 2008, 2010, even 11 Beta are still monolithic (like a monolithic kernel, http://en.wikipedia.org/wiki/Monolithic_kernel). So it is impossible right now to achieve what you want, and you have to get used to what it is.
Some access rights to registry or IIS won't help, as you obviously considered too little about what Visual Studio is :) It is a much larger system relying on too many underlying bits.
Upvotes: 2