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

The operation has timed-out When calling web service by multithrea

P: n/a
When I call Web Service by mulithread just like the following:

public class test
{
public void Execute()
{
while(....)
{
ThreadPool.QueueUserWorkItem(new WaitCallback(DoProcess),request);
}
}

public void DoProcess(object request)
{
// call web service
}

}

I got the exception:

System.Net.WebException: The operation has timed-out.
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at
ABCDeposit.ABCService.NewBfService.newBfService(co m_snda_bf_item_NewServiceItem param0)
at ABCDeposit.ServiceAgent.DepositAgent.Deposit(ABCDe positInfo info,
String& message)
at ABCDeposit.Components.ABCDepositAction.Execute()

However, when I call the web service in single thread,
I do not get any timeout exception
I don't know why, is this a bug or other?

Could anybody help me? Thank you!

Dec 10 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sat, 10 Dec 2005 04:33:02 -0800, reaway
<re****@discussions.microsoft.com> wrote:

However, when I call the web service in single thread,
I do not get any timeout exception


You might be hitting up against the outgoing HTTP throttle:
http://odetocode.com/Blogs/scott/arc...06/08/272.aspx

--
Scott
http://www.OdeToCode.com/blogs/scott/
Dec 10 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.