none
Windows service only gets called when visual studio is attached to a process RRS feed

  • Question

  • I am struggling to know where to post this, I put it in Visual Studio Debugger as that is what I am trying to do, debug the process which is VB.Net based but was told it was the wrong forum.

    Any help would be greatly appreciated. 

    I am having problems with a windows service we have built within Windows 7 x64. It does not work correctly normally, however when I "Attached To Process" within Visual Studio it works as expected. I am using vb.net and I have tried disabling the firewall with no luck. 

    Are there some specific permissions that I need to allow the service to be called?

    Thanks in advance


    Katie Smith Systems Developer Bakkavor IS Development

    Friday, April 13, 2012 1:07 PM

Answers

  • Try to attach non-invasive debugger like windbg. Or collect dumps for your service and see what is going on (you may need to add special in-memory logging).

    -Karel

    Friday, April 13, 2012 9:58 PM
    Moderator

All replies

  • Friday, April 13, 2012 1:48 PM
  • Hi Purvi

    Thanks for the link but unfortunately it's not quite what I'm looking for, this shows how to debug a service in visual studio. I am able to do this using Visual Studio by using the "Attach To Process" tool. However my problem is, when the service is running normally (without debugging) it isn't working, something isn't firing. But when I am running the service with the debugging, it does work. 

    So it would seem something isn't firing when it is running by itself.

    Thanks for your response


    Katie Smith Systems Developer Bakkavor IS Development

    Friday, April 13, 2012 2:13 PM
  • Try to attach non-invasive debugger like windbg. Or collect dumps for your service and see what is going on (you may need to add special in-memory logging).

    -Karel

    Friday, April 13, 2012 9:58 PM
    Moderator
  • Hi Company Developer,

    1) Please make sure that you have installed your windows service correctly.

    2) Try to run your service under local system (because it has full privileges as Admin account has).

    3) If your service is using any system resources like file then you have to give permission to that resource explicitly.

    Please try all above steps, and check if it works.


    Regards, http://shwetamannjain.blogspot.com

    Sunday, April 15, 2012 7:54 AM
  • Hi Shweta

    Thanks for your response. I tried each of your steps and unfortunately still came out with the same result. It is quite difficult as it is a bespoke system and the service had been developed by us. 

    However, if it helps, an error I am getting is "Failed to reset desktop process".

    Thanks again for your help!


    Katie Smith Systems Developer Bakkavor IS Development

    Monday, April 16, 2012 8:10 AM
  • Hi Karel

    I will give your suggestion a try. Thanks!


    Katie Smith Systems Developer Bakkavor IS Development

    Monday, April 16, 2012 8:10 AM