I have a windows service that has been built (VS 2005 Beta 2), installed and is running ( I am getting output in the event viewer, and part of it the service is working correctly). But when I try to debug it using the "Attach to process", the service process is greyed out, and I am not allowed to attach to it.
I am running Windows Xp Pro, SP2, as an admin.
Not sure if this is a security or permisson problem so I also have tried adding "Everyone" to the "impersonate a client after authentication" in the user rights assignments in local security settings, but it didn't help.
I installed the service using a Setup Project added to the solution. I added the primary output to the application folder and then installed the service by right clicking the setup project (this is much easier than VS 2003).
Am I missing something
thanks
dh

Attaching process to Windows Service
EricN
I am using C# and also cannot debug my windows service...
Barb O
I can see the process when I check the "Show processes from all users" and it appears to attach but my break points are never reached. When I "pause" the debugger it shows a green arrow on the line of code:
System.ServiceProcess.ServiceBase.Run(ServicesToRun);
it says that this code has called into another function and when that function is finished this will be the next line to get executed...
Keith Henkel
I figured out why it wasn't working. I assumed that the managed process type was the executable, but it wasn't. To see the service executable you need to check the two boxes in the attach to process Show process from all users & Show processes in all sessions. You should then see the executable for the service once you start the service.
_________________________
Brian Cauley
Commpoint
brian@commpoint.com.(Spam).please
Jim Fox
thanks
dh
MMA_man
System.Threading.
Timer timer2;timer2 = new System.Threading.Timer(timer1_Ticks, null, 0, 10000);
private
void timer1_Ticks(object timerStatus){
Your timer code here
}
That should fix it.
________________________
Brian Cauley
Commpoint, Inc
brian@commpoint.com.spam.remove
Chris Jiang
sirck sirck
_________________
Brian
Commpoint, Inc
brian@commpoint.com
Vipin.B
I found my problem! My service was coded to execute during a timer_Tick event. I dropped a timer control onto my Service class in design mode and that created a System.Windows.Forms.Timer.... It never fired... set Enable = true, started the timer, rewired up the event... nothing. So, I deleted the timer and a programmatically added a System.Timers.Timer and used the timer_Elapsed event. That solved my issue.
Is this a bug Can someone reproduce my results that the System.Windows.Forms.Timer does not work
Thanks,
KB< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
joostvaningen
Neil