Last post Oct 11, 2010 07:28 AM by toas1
Sep 14, 2010 08:02 AM|robinspaul|LINK
I developed an ASP.NET 3.5 website to read a few XML files generated by a third party software
and convert them to a single Excel Book. The entire process takes more than 1 HOUR
and even before completing the entire work, the system comes back with a message like -
"Page cannot be displayed" and it fails. So, I am planning to make this website an Asynchronous site (I think if I make this site asynchronous it will work faster and will not stop execution before completing - new ideas are welcome.) I am new
to this concept. Can anyone help me with some examples of how to convert a normal website to Asynchronous website? At present my site has 3 tiers and the
reading of XML pages and writing them into Excel are happening in the Data Access Layer.
Sep 14, 2010 08:41 AM|sirdneo|LINK
Ajax is the key for such activities. See this sample:-
In above sample it is a smiple function which validates some business logic. You can start your process with one ajax call. and with the help of timer and ajax calls, you can display the progress of file processing, finally when file is fully processed you
can save that file on server and show its URL to client.
Oct 11, 2010 07:15 AM|robinspaul|LINK
What about using back ground thread?
Oct 11, 2010 07:28 AM|toas1|LINK
since the processing takes about 1 hour I suppose the user wont sit and wait untill its finished? I think its a better idea to just post a job to the thread pool using ThreadPool.QueueUserWorkItem and perhaps send an email to the user when the processing
is done (or failed).