WebService XML - Problema di timeout
-
venerdì 24 giugno 2011 14:14
Ciao a tutti,
nell'invocazione di un WebService XML tramite un applicativo esterno, sto riscontrando nel log il seguente errore:An error occurred while processing the message, refer to the details section for more information Message ID: {8EBB114B-DDA2-4C56-8A1C-20BEAE5B6476} Instance ID: {DF8D492F-7A33-4B23-8E4A-196E978367AA} Error Description: System.TimeoutException: The HTTP request to 'http://nbdo/NBDOWS/ValidazioneBDE.asmx' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The request was aborted: The request was canceled. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result) --- End of inner exception stack trace --- Server stack trace: at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result) at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result) Input file: 'FILE://\\Epmilsqz08\nbdo\BDE\Caricate\CB-0001523007_20110526183943.doc'
Purtroppo, anche googlando, non ho trovato una soluzione.
Qualcuno ha un'idea in merito?
GrazieLuigi
Tutte le risposte
-
sabato 25 giugno 2011 07:54
Ciao Luigi,
You wrote on 24/06/2011 :
Qualcuno ha un'idea in merito?
non capisco, hai un'operazione che evidentemente dura più di 1 minuto che eccede il timeout, quale è il problema? oltre il fatto che o cambi il timeout o fai in modo che l'operazione ci metta meno.
Grazie
Luigi.m
Mauro Servienti
{C67C0157-5D98-4733-A75E-93CAEE4BADC8}
Microsoft MVP - Visual C# / MCTS
http://mvp.support.microsoft.com
blog @ http://milestone.topics.it
whynot [ at ] topics [ dot ] it -
mercoledì 27 luglio 2011 10:15
ciao
se usi il vecchio client (web reference)
var wsclient = new AsmxClients.TestService();
wsclient.Timeout = 10; //secondivar risp1 = wsclient.HelloWorld(); //schianta
se usi il nuovo client (WCF)var wcfclient = new WCFClients.TestServiceSoapClient();
wcfclient.Endpoint.Binding.SendTimeout = TimeSpan.FromSeconds(10);
var risp2 = wcfclient.HelloWorld();o tramite config
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="TestServiceSoap"
sendTimeout="00:00:10"
/>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:1102/TestService.asmx" binding="basicHttpBinding"
bindingConfiguration="TestServiceSoap" contract="WCFClients.TestServiceSoap"
name="TestServiceSoap" />
</client>
</system.serviceModel>ovviamente il mio test è di 10 secondi.... tu mettici pure 10 minuti....
ma nel caso, verifica se è possibile chiamare il servizio in asincrono o ottimizzarne l'esecuzione
a presto
Antonio Esposito
MCT, MCPD, MCTS, MCP
http://dotnetlombardia.org

