[Mono-dev] Threading issues in page_load event (in ASP.NET on mono)
arunarun2000 at gmail.com
Wed May 30 10:37:33 EDT 2007
When the thread is taking longer to execute than the script timeout value,
it is automatically aborted.
But, won't the users see a plain blank page w/o any messages, if the code
I want to show a decent message, if the thread is taking too long!
Interestingly this code works *perfectly* on a windows box on IIS. But not
Rafael Teixeira wrote:
> AFAIR, ASP.NET already does that for you, you can just configure the
> timeout period, don't reinvent the wheel, please.
> On 5/30/07, Arun <arunarun2000 at gmail.com> wrote:
>> Hi guys
>> I am trying to run an asp.net application on mono. Please see whether
>> you can help me out with the following problem.
>> I am using a seperate thread to query a remote database, in the page
>> load event of an aspx page.
>> I am using this since it might take a really long time, for the query
>> to return to return some results.
>> So in another thread, I am monitoring how long it is taking to finish.
>> If it taking more that 180 seconds, then I am aborting the query
>> thread and printing error message accordingly.
>> But if i run this on mono, I am getting a plain blank white page.
>> (script timeout !!??)
>> Also in the log I am seeing the "Trigerring Pageload.." message
>> multiple times even when I opened the page only once !!
>> I have included the code, below.
>> private void Page_Load(object sender, System.EventArgs e)
>> log.Debug("Trigerring Pageload..");
>> ts_start = new ThreadStart(start_process);
>> thread_starter = new Thread(ts_start);
>> if(thread_starter.IsAlive != true)
>> int i = 0;
>> while(thread_starter.ThreadState !=
>> if(i > 8)
>> log.Debug("Query Aborted");
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
> Rafael "Monoman" Teixeira
> "The reasonable man adapts himself to the world; the unreasonable one
> persists in trying to adapt the world to himself. Therefore all
> progress depends on the unreasonable man." George Bernard Shaw
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
View this message in context: http://www.nabble.com/Threading-issues-in-page_load-event-%28in-ASP.NET-on-mono%29-tf3838407.html#a10875080
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list