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

Help: Async ws call fail. Sync ws call is fine...(!)

P: n/a
Hi

(Framework 1.1, Webservice platform Windows 2003 Server)

I have a little windows service which is supposed to call one or more
webservices at regular intervals. Recently this service has started to
fail more and more often until now, when it won't run at all.

I've managed to locate the problem, and it seems that when it makes an
asyncronous webservice call, it doesn't get any notification when the
service has finished.

I ran a couple of tests and it seems that the problem only occurs on
certain webservices and _only_ when called async.

I'm relying on the IAsyncResult.IsCompleted to know when a service has
finished.

// Same method as in Timer service...

while (!m_res.IsCompleted)
{
System.Threading.Thread.Sleep(1000);
log.Debug(string.Format("Call pending for {0} sec", DateTime.Now -
starttime));
}

IsCompleted will always be False.

I tried using a delegate to handle the completion of the webservice,
but it is never called.

On the webservice side, everything looks just fine. It executes
exaclty as it should.

It seems to me that since the calling code has been working just fine
for the last two years, the cause of the problem is probably
elsewhere, but it would help to know what could cause these symptoms.

Any help is appreciated.

//Johan

Aug 6 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.