BTW, I modified a little bit the Elapsed code to write two lines instead, it
"Manuel Vázquez" <Manuel Vázquez@discussions.microsoft.com> wrote in message
news:7427F2D4-6697-40A1-9D9B-EE898C328C37@microsoft.com...
> I've made a test using the Timer Component and it work *almost* fine.
>
> 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.
>
> "Jiri Zidek" wrote:
>
>> Try using System.Timer inside of Application.Start in global.asax. It
>> can
>> trigger a new thread in defined intervals. Maybe enough for you, but
>> aware
>> that this would be running under aspnet working thread and corresponding
>> privildges.
>>
>>
>> "Khurram Hanif" <khurram_09@yahoo.com> píse v diskusním príspevku
>> news:eKQqbM13EHA.3224@TK2MSFTNGP10.phx.gbl...
>> >
>> >
>> > 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!
>>
>>
>>