Err:
If you want debug the
window service code, few times it will not show in available process under attach
to process window from debugger.
The root cause could be your service is running under local
service or system account not by your user account. In Attach to process window,
by default the available process will show the processes which are running
under your account name.
So in order to resolve the issue please do the following
step.
Sol:
Make sure that you are
running the visual studio as an administrator and from the attach process
window (Debug à
Attach to Process) select the checkbox
‘show process from all users’ in the available process section.
Note: If you have small piece of code in Onstart method. By
the time you have attached the service the code execution might complete so try
to add code Thread.Sleep(3000).
0 Comments:
Post a Comment