service not working properly on remote machine

i made a service in windows its running fine on my machine and on my laptop and my friend laptop too when i deploy it on my college machine it work only half only some communication part is done not the all.what might be error.
Are deploying the service with the command line (sc)? Or did you write your own Service Controller app using the "CreateService()" function in another application? Does your service require any Dependencies that might not be started? What do you mean when you say "communicating"? Are you using a port that the firewall might be blocking outgoing traffic on?

These are just a few questions off the top of my head. Also can we see some code?
Last edited on
ya i am deploying service through command line (sc),if looked my exe in dependency walker it require no dependencies,my service communicate with another service deployed on other machine,i have put the firewall off,both the services communicate only half the way
Something might be turning the Firewall back on, this could be an AV suite or GPO. Is your service still running on the college machine after the communication between the two services stops? Are you able to ping the college machine from the system that is hosting the other service after communication has terminated? Try to capture any error codes or if your service was sent a SERVICE_STOP command into event viewer using these functions:

- RegisterEventSource():

- ReportEvent():

- DeregisterEventSource():

Put "ReportEvent()" and "DeregisterEventSource()" at the exit points in your code with a message indicating which exit point was triggered (Examples would be if the service finished what it thought it was supposed to do, if the send() function failed and it can no longer reach the other service so is exiting due to this error etc.). If you cover all of your exit points and no message is saved then we can assume that Anti-Virus sent a TERMINATE command to your service on the college machine, in this case there should be an entry in the Event Viewer from the AV. If you have permission try disabling the AV as a quick experiment instead of assuming this.
Last edited on
Topic archived. No new replies allowed.