By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,604 Members | 858 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,604 IT Pros & Developers. It's quick & easy.

Cancel Async Webservice

P: n/a
Hi,

I have a webrequest which is started Asynchronously :

_pf = new PrimeFactorizer();
_pf.FactorizeCompleted += new
FactorizeCompletedEventHandler(pf_FactorizeComplet ed);
_pf.FactorizeAsync(factorizableNum);
To cancel the webrequest I issue :
_pf.Abort();

When the Abort is issued, only the client side gets cancelled, the
Factorize() method on the server keeps on running.
I have allready searched on this forum, where some of you tell that this
impossible due to the stateless nature of HTTP & webservices, but I've read
a post by Martin Kulov where he says :

initialize your web service call with an instance of Monitor class and check
its state during your asynchronous call. When it is signaled, just return
from the call. This is the most convenient way IMHO.

I just don't see how this can be achieved.
Anybody has any idea how to cancel the procedure on the server when the
client call gets cancelled ?

PS : remove "nospam_" from my email address to respond to me in private.
--
Kind regards,
Frederic Hoornaert
Apr 25 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.