Just-in-time debugger with ViewFinity/no admin rights - debugging

My company uses ViewFinity to elevate processes that need admin rights in lieu of any kind of actual admin privileges. Visual studio is already elevated, but for some reason the JIT debugger doesn't run as admin. It is a separate .exe that kicks off when an exception occurs? How would I go about fixing this?

IT fixed the issue. Evidently when JIT debugger is launched, it launches a separate .exe (can't remember the name right now) which in turn launches visual studio.

Related

Visual Studio 2005 Output file requires Administrative Privileges

Using Visual Source Safe 2005, I downloaded a jobmate's project in my computer and built it correctly, but when I press "play" to debug it I receive an error message telling me that I need higher privileges.
Looking around, I've noticed that the freshly build program has the little shield icon that means that I need administrator permission to run it and actually, if I run it outside Visual Studio, I manage to execute it after the UAC question.
I'm domain and local administrator so I can disable UAC, but I don't think this is the solution, so: what can make my program to require administrative privileges?

Not able to see Run Elevated option for .sln files

When I try to run a vs solution file, I cant do it with run elevated access...as that option is not showing up on right click.
There is no such option in VS. If your program requires UAC elevation to do its job then you have to ask for it in your program itself. So it will still operate correctly on the user's machine. Edit the manifest of your EXE project as described in this answer.
To debug such an app, Visual Studio needs to be elevated itself. It normally prompts you for that, but there's a bug in VS2013 that prevents that from working if the Visual Studio Hosting Process option is turned on. Avoid this bug, and the prompt, by starting VS elevated. Do so by right-clicking the shortcut and selecting "Run as Administrator".

Debugging with Visual Studio 2012, Windows 8 and User Account Control

First of all - this is all about the RTM Versions. And Windows 8 has some changes regarding the UAC, as we all learned from http://www.brianbondy.com/blog/id/140/, it cannot be disabled side-effect-free.
Now the problem starts:
Our main app requires elevated privileges (at least the server part). Debugging will only work when running VS in elevated mode, too. But when I'm starting a Silverlight Project in elevated mode of VS, the IE fired up for debugging is started as with normal privileges and debugging is not possible, too. To make things more complicated, we're not running solutions with all (700+) projects loaded, but do lot of our dev-stuff (compiling, starting, testing) in command line. Which needs to be elevated, too.
What is the correct configuration of UAC for this purpose: I want to be able to debug Silverlight applications running in Internet Explorer, Applications of any kind started by VS "F5", a server process started from commandline and (maybe) C#/XAML Metro-Apps?
In Windows 7 it was just disabling UAC and everything's fine. Now I feel like fighting against my own toolset and have a bad feeling about this.
And please - do not tell me that UAC is important and useful. I'm totally okay with it, but for a developer things are slightly different.
See this answer on Superuser:
The Only way I'm aware of which ensures it will always open as
Administrator (including when you open from file associations, jump
list etc) is:
Locate the devenv.exe file in Explorer eg mine is in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\
Right-click devenv.exe and choose "Troubleshoot compatibility"
Select "Troubleshoot program"
Select "This program requires additional permissions"
You'll need to let it launch VS before it lets you click Next, but
then you're done.
EXTREMELY annoying that you can't just do this through the normal
properties dialog any more. It's like Microsoft are going out of their
way to ensure Windows 8 alienates as many people as possible...
Have you tried installing VSCommands and using the Always start Visual Studio with elevated permissions option? I'm not sure how this would function differently than restarting with elevated permissions but it can't hurt to try.
I ran into the same issues with the command line, debugging, and other things such as once you're running with elevated permissions you can no longer drag & drop files into Visual Studio, or open files associated with Visual Studio when it's set to always run with elevated permissions. This is why I've always disabled UAC.
In the end I just turned off UAC in the registry. I'm not missing out on anything by doing so. It would be nice to hear how Microsoft uses the Win8 + VS2012 combo internally after seeing how broken it feels.

How to avoid necessity of Admin. privileges for Visual Studio with IIS or COM Interop?

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.
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.

Need to debug process as a non admin (VS2010)

I am running the following
Win7 SP1 Enterprise
VS2010 Pro SP1
Non admin user
I need to attach to the w3wp.exe process
I have assigned myself debug privs via GPO
When attempting to attach to the process I get
Microsoft Visual Studio
Unable to attach to the process. Visual Studio has insufficient privileges to debug this process. To debug this process, Visual Studio must be run as an administrator.
The main issue is I need to debug a site that handles multiple hostheaders (sitecore)
Cassini has no concept of hostheaders
IISExpress does not handle hostheaders - cannot launch site with different hostheaders*
Is there an alternative around this ?
Side note
I have tried to give myself admin token with the following as a test as well
http://www.scriptlogic.com/products/privilegeauthority/
VS launches as an 'admin' but gives me the whole Unable to attach to the process. Visual Studio has insufficient privileges to debug this process.
Side note 2
Using process explorer on devenv.exe doesn't show the SeDebugPrivilege enabled
I have tried using ntrights.exe to grant the rights - rebooted and still not there.
If you have an admin password you can (when you open VS) right click, and then say 'run as administrator', otherwise you just may be out of luck as far as I know.
This link here: Working with Web Projects in Visual Studio as a Non-Administrative User says it clearly:
You cannot attach to a process that is running under the IIS worker
process because it requires administrative privileges.
We ended up using http://www.scriptlogic.com/products/privilegeauthority/ granting the SeDebug Token as well.
This worked out well as we could also apply this to other products like ants profiler which needed admin rights to run (wasn't required for XP)

Resources