Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows Service Debug on VS2010

Windows Service Debug on VS2010

Scheduled Pinned Locked Moved C#
helpcsharpvisual-studiodebuggingquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    garfield185
    wrote on last edited by
    #1

    Hi everybody. I have migrated my software from VS2005 to VS2010, and when debugging my windows services, trying to attach to the process I get this error: "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." So, I run it as an administrator, I checked the permission on VSLauncher.exe and devenv.exe to make it run always as an admin, but I still get the error. I am an administrator already. Has anybody have this same problem? BTW, I'm using W7, VS2010.

    S G 2 Replies Last reply
    0
    • G garfield185

      Hi everybody. I have migrated my software from VS2005 to VS2010, and when debugging my windows services, trying to attach to the process I get this error: "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." So, I run it as an administrator, I checked the permission on VSLauncher.exe and devenv.exe to make it run always as an admin, but I still get the error. I am an administrator already. Has anybody have this same problem? BTW, I'm using W7, VS2010.

      S Offline
      S Offline
      S 53K S
      wrote on last edited by
      #2

      Did you try Opening the application as with Run as Administrator? And does the service also run in the same account ?

      Sastry

      G 1 Reply Last reply
      0
      • S S 53K S

        Did you try Opening the application as with Run as Administrator? And does the service also run in the same account ?

        Sastry

        G Offline
        G Offline
        garfield185
        wrote on last edited by
        #3

        Thanks for your answer Sastry. Yes, I tried selecting the box "Run as administrator" on the Visual Studio launcher, and also tried with right click -> Run as administrator. The top of the window says "Visual Studio 2010 (Administrator)" . And the service is running in my user. I don't know why is this still happening. Any other idea? First I thought that the problem was to try to debug the code on the network, but I also copied the solution to my C: and it still happens.

        1 Reply Last reply
        0
        • G garfield185

          Hi everybody. I have migrated my software from VS2005 to VS2010, and when debugging my windows services, trying to attach to the process I get this error: "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." So, I run it as an administrator, I checked the permission on VSLauncher.exe and devenv.exe to make it run always as an admin, but I still get the error. I am an administrator already. Has anybody have this same problem? BTW, I'm using W7, VS2010.

          G Offline
          G Offline
          garfield185
          wrote on last edited by
          #4

          It was a permissions problem. Win7 comes with a new security system, and I had to add to my profile (even being an admin) this permission: Control panel -> Administrative tools -> Local Security policy -> Local Policies -> User rights Assignment -> Debug programs -> Add user or group . And there, I added my own user. Reboot machine(Important!! Without rebooting, it won't work). After that, I was able to attach processes to debug them. It's been a really long time to solve this, I hope to help other people that find this same problem. Thanks everybody for your help.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups