I have developed a windows service and this is service is running on my local computer under my account. When I try to debug this service by attaching this as a process in visual studio 2008 I get “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.” I have logged in to my system as administrator and so when VS 2008 is launched it is running as administrator not sure why I get this error. I am using Windows XP Pro sp3
相关问题
- the application was unable to start correctly 0xc0
- Pass custom debug information to Microsoft bot fra
- Why does a windows service, hosting an NserviceBus
- How do I identify what code is generating “ '&
- Monodevelop: `Waiting for debugger`
相关文章
- How to add external file to application files ( cl
- XCopy or MOVE do not work when a WCF Service runs
- How do I get to see DbgPrint output from my kernel
- Advanced profiling is unavailable for the selected
- Can't Inspect Variables When Debugging .NET As
- What is the difference between glibc's MALLOC_
- Problem installing windows service
- Embedding a program's source code into its bin
Spoulson is correct, uless you have the SeDebugPrivilege in your logon token, you can't debug a process runing as a service. To check, I use ProcesExp.exe from the SysInternals suite by double clicking the Visual Studio process and checking the Security tab. On the bottom you will see all privileges you have been tranted. They start with a "Se" prefix.
Another thought would be to ensure you have all the JIT (Just In Time), debugger settings enabled under the Tools->Options->Debugger menu option in VS (Visual Studio for those who don't know).
I've also encountered this problem. I don't know how to solve it permanently but I found a work-around.
This worked for me. I hope it works for you too.
If you're using Windows XP, the local security policy of the PC may be restricting non-administrators from running debuggers. By default, only administrators can debug.
Administrative tools -> Local Security Policy -> Local Policies -> User Rights Assignment -> "Debug programs"
Sounds like a couple of different things. First, check what user the process is running under, most likely admin or a domain admin. Change that to something less priviledged.
Also, it might be that you are connected to a domain and the domain admins have neutered the local administrator priviledges. In that case you need to get the IT department to fix this.
I know this is old but I was having the same problem in VS2015. Turns out the only problem was that my code/solution was stored under my user documents folder which has the little padlock icon on it. I think that means those files were not available to the VS debug processes. Moving it to a less restricted folder fixed the problem. Hope this helps someone else - Oh and my first post on here!
I have seen this on Vista, but not on XP. To counter this in Vista, I just right-click the Visual Studio 2008 entry in my start menu, and choose "Run as Administrator"