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

G

Guest

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.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at
ABCDeposit.ABCService.NewBfService.newBfService(com_snda_bf_item_NewServiceItem param0)
at ABCDeposit.ServiceAgent.DepositAgent.Deposit(ABCDepositInfo 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!
 

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,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top