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!
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!