Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So this one has me stumped, and seems really odd. I wrote some c# forms which act as the "server" component in a client server app setup. (Client sends udp data, server program chugs some numbers and send back results.) Due to various reasons, there are 4 instances of 1 form and 1 instance of another form all running at the same time. And I have a bat file that automatically starts all these forms in case of a power reset.

Anyways, so I am trying to leave this running all the time and have them be somewhat reliable. It was working fine a month ago, but over the past few weeks i have noticed they have been disappearing. Sometimes they stay up for a day, sometimes 4, but then just disappear. (Up until the last occurance they would all disappear seemingly at the same time, but i wasn't watching so i couldn't be sure. This last time the one different form stayed running for some reason.)

So I added some logging and found that all the forms do disappear at the same second, and the _FormClosing event shows a CloseReason of TaskManagerClosing.

I know for a fact no other person has physical access to the machine.

What could cause this to happen? Anybody else starting to think maybe my computer is infected?? Just a thought, but this behaviour would be odd for malware or a virus anyways. Especially since everything else on the computer seems to behave just fine. That said I do have tightVNC installed, maybe that isn't that secure.

Other than that there isn't much else, maybe antivirus software or Ad-Aware is closing the forms??

Thoughts? Thanks in Advance.

share|improve this question

closed as off topic by jscott, John Gardeniers, mdpc, Ward, Magellan Nov 16 '12 at 17:46

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Does the windows event log show anything going on when those instances shut themselves down? –  Tremmors Jul 30 '11 at 6:10
add comment

2 Answers

Well, after unistalling like everything and the issue still happening, I finally finally figured it out. It was silly. So I was using a scheduled task to start the programs on computer startup. Well in windows XP the opton for "Stop task if runs for 72 hours" is automatically checked. DOOOOHHHHHH!!!!!!!

share|improve this answer
add comment

You could add some code to FormClosing event to enumerate all of the processes and process details on the system, to determine if it may be a local process.

I suspect this could also be initiated remotely, i.e., someone could enumerate the processes on the system and kill the processes using TASKLIST and TASKKILL. You may want to test if using these produces the same close reason.

To identify network activity at the time of the event, you could the Port Reporter tool.

Availability and description of the Port Reporter tool
http://support.microsoft.com/kb/837243

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.