Aysnc Web Services - Thread Issues

D

David Shreffler

I have a web form that asynchronously calls a web service on the local
machine. The problem is that when the callback delegate fires, and calls
the End... web method, no results return and no further code within the
function executes. I tried wrapping the End... call in a try/catch block
and no exception is being thrown. The callback delegate is definitely
firing since I set a breakpoint on it and it stopped appropriately.

I have tested the web service by calling it synchronously, and it works just
fine. However, that was with dummy return values. The real web service
takes 30-45 min (crunching millions of records) so it needs to be called
asynchronously.

I am assuming it's a problem with threading. I've read other examples where
this kind of problem occurred and the solution was to have the callback
delegate invoke another delegate on the original thread that called the web
service (rather than the worker thread the web service created). However,
since I'm dealing with web forms and web controls, there is no invoke method
to call.

VS.NET solution background:
I have one solution, containing a web form application project and another
project for the web service. The solution has both of the projects start,
and has the web form (consumer application) dependent on the web service
project to ensure the web service is compiled first. The web service
project

Thoughts??

Thanks!!!!
David.


PS- This problem is similar to this developer's problem:
http://www.dotnet247.com/247reference/msgs/7/38335.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,821
Messages
2,569,725
Members
45,511
Latest member
Osiris-Team

Latest Threads

Top