I want to auto run asp.net page after a fixed interval of time without
sending any request from browser to server. I dont want to use windows
service or something like that.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
> I want to auto run asp.net page after a fixed interval of time without
> sending any request from browser to server. I dont want to use windows
> service or something like that.
AFAIK there isn't an easy way to launch a page or keep a site alive...
However, Paul Wilson does have an artice on how to extend the globalbase
class to reload the page automatically to keep an ASP.NET application
alive. You might be able to modify it for your purpose:
http://authors.aspalliance.com/PaulWilson/Articles/?id=12
--
Lucas Tam (REMOV...@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Not that *I* know of. Web (including asp.net) pages are
"dumb" and only respond to requests.
The first dirty solution that comes to mind is setting up a
small console app to run as a scheduled job...in it you
could use a HttpWebRequest object to invisibly fire a
request to the page so it would run.
However, that might be a cosmic waste of time when you
could have just placed the code you needed to run within
the console application, that's probably your best bet and
easiest solution.
I have no idea what your requirements are so I'm just
shooting in the dark here.
-v
>.
>
"Khurram Hanif" <khurr...@yahoo.com> píse v diskusním príspevku
news:eKQqbM13...@TK2MSFTNGP10.phx.gbl...
The code on the Enabled event is like this:
System.IO.TextWriter writer = new
System.IO.StreamWriter("d:/tmp/global_timer.log", true);
writer.WriteLine(String.Format("Log time: {0:F}", DateTime.Now));
writer.Flush();
writer.Close();
However the log is being appended twice.
Here's a chunk of the log:
App Started at Friday, January 21, 2005 12:55:56 AM
Log time: Friday, January 21, 2005 12:56:56 AM
Log time: Friday, January 21, 2005 12:56:56 AM
Log time: Friday, January 21, 2005 12:57:56 AM
Log time: Friday, January 21, 2005 12:57:56 AM
Log time: Friday, January 21, 2005 12:58:56 AM
Log time: Friday, January 21, 2005 12:58:56 AM
Log time: Friday, January 21, 2005 12:59:56 AM
Log time: Friday, January 21, 2005 12:59:56 AM
The first line is logged on the Application.Start method, with similar code.
Regards,
Manuel.
App Started at Friday, January 21, 2005 1:18:20 AM
Log time: Friday, January 21, 2005 1:19:19 AM
EOL
Log time: Friday, January 21, 2005 1:19:20 AM
EOL
Log time: Friday, January 21, 2005 1:20:19 AM
EOL
Log time: Friday, January 21, 2005 1:20:20 AM
EOL
Log time: Friday, January 21, 2005 1:21:19 AM
EOL
Log time: Friday, January 21, 2005 1:21:20 AM
EOL
Notice the 1 sec diff! The interval, you might have guessed, is 60 secs.
Is this a bug or something?
Regards,
Manuel.
"Manuel Vázquez" <Manuel Vázq...@discussions.microsoft.com> wrote in message
news:7427F2D4-6697-40A1...@microsoft.com...