problem with multithreading and Web services method invocation  
Author Message
abhra.haldar





PostPosted: 2006-5-11 21:03:43 Top

dotnet-framework-aspnet, problem with multithreading and Web services method invocation Hi:

I have an ASP.NET page which makes a synchronous Web services method
call. At the same time, however, I wanted it to load another page as an
iFrame (i've also tried as a javascript popup window) - this second
page is responsible for polling a DB and continually updating its text
box display.

The problem is that once the Web service call is initiated, the second
page becomes unresponsive exactly until the call is completed, when it
resumes. I'm baffled as to why this second page's request should have
anything to do with the first one's Web service request. I've tried to
encapsulate the time-consuming DB queries of the second page into a
separate thread and this works great (I tested it by printing a
timestamp to a file), but I also need a way of updating the display in
real-time while the Web services call is going through. Are there any
ideas as to how I can accomplish this?

- adh

 
bruce barker (sqlwork.com)





PostPosted: 2006-5-12 0:21:00 Top

dotnet-framework-aspnet >> problem with multithreading and Web services method invocation your second window is blocked because asp.net serializes request by session.
one one request per session runs at a time. you shoud change you logic.

client -- request long running process -->

server starts process on background thread
<-- server returns a page display status, with a meta refresh

client displays status page
sends refresh request -->

server check if procees is done
if not done
<-- send poll page
else
<-- send results


-- bruce (sqlwork.com)


<email***@***.com> wrote in message
news:email***@***.com...
> Hi:
>
> I have an ASP.NET page which makes a synchronous Web services method
> call. At the same time, however, I wanted it to load another page as an
> iFrame (i've also tried as a javascript popup window) - this second
> page is responsible for polling a DB and continually updating its text
> box display.
>
> The problem is that once the Web service call is initiated, the second
> page becomes unresponsive exactly until the call is completed, when it
> resumes. I'm baffled as to why this second page's request should have
> anything to do with the first one's Web service request. I've tried to
> encapsulate the time-consuming DB queries of the second page into a
> separate thread and this works great (I tested it by printing a
> timestamp to a file), but I also need a way of updating the display in
> real-time while the Web services call is going through. Are there any
> ideas as to how I can accomplish this?
>
> - adh
>