By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,058 Members | 1,217 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,058 IT Pros & Developers. It's quick & easy.

Form becomes unresponsive after 2 hours.

P: n/a
Hi,

I'm having problem with this internet application. It's a simple form
with a button and couple text boxes where I can enter parameters like
timeout etc.

Once I push the button, it starts reading the content of a specific
URL and updating the database every minute or so. When I leave the
application for overnight I find it "frozen". It seems it's still
doing its job, but I cannot restore the form on the screen. The only
way to stop is to "end task" from task manager.

I use httprequest and httpresponse objects. Problem doesn't appear in
debug mode, but in the exe file. I believe it takes 1-2 hour to be
unresponsive like that. I use doEvents in a Timer object every second.
Clinet machine has latest Framework installed. Different clients give
the same result. As for the database, I connect to a MS SQL database
somewhere on the Intranet.

Any suggestion on that?

Thanks in advance...
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
DenoxiS,
Have you considered creating a Windows Service instead of a Windows Forms
application?
I use doEvents in a Timer object every second. Is this a Windows.Forms.Timer? You may need to call DoEvents, to have the
Timer click event handled, in other words if the Timer's click event is not
handled, then your DoEvents is not called, which means that the Timer.Click
event cannot be handled.

I would look at creating a Windows Service instead, and use the EventLog
(ServiceBase.EventLog) property to write information (start, stop, file) to
the Windows Event Log, I would also add
System.Diagnostics.PerformanceCounter classes to keep track of work being
done.

I would then either use the built-in Windows utilities to check the event
log & performance counters or write a simply Windows Forms app that collects
& displays the info. This windows forms app would not need to be left
running...

Hope this helps
Jay

"DenoxiS" <go****@deniznet.com> wrote in message
news:d2*************************@posting.google.co m... Hi,

I'm having problem with this internet application. It's a simple form
with a button and couple text boxes where I can enter parameters like
timeout etc.

Once I push the button, it starts reading the content of a specific
URL and updating the database every minute or so. When I leave the
application for overnight I find it "frozen". It seems it's still
doing its job, but I cannot restore the form on the screen. The only
way to stop is to "end task" from task manager.

I use httprequest and httpresponse objects. Problem doesn't appear in
debug mode, but in the exe file. I believe it takes 1-2 hour to be
unresponsive like that. I use doEvents in a Timer object every second.
Clinet machine has latest Framework installed. Different clients give
the same result. As for the database, I connect to a MS SQL database
somewhere on the Intranet.

Any suggestion on that?

Thanks in advance...

Nov 20 '05 #2

P: n/a
Hi DenoxiS,

Are you sure you are not creating endless objects in a single method?

Just a thought

Cor
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.