Sto chiamando un servizio Web WCF localmente (o in remoto) che funziona correttamente con piccole quantità di dati (circa 25 righe di < 1K di dati ea). Ma quando i dati diventano più grandi (circa 300 righe) il servizio web ha esito negativo. Di seguito sono riportati Eccezione, Eccezione interna e Traccia stack dall'eccezione interna.Il servizio Web WCF non è in grado di ricevere grandi dati
Anche il servizio sembra richiedere insolitamente una lunga esecuzione locale (aggiungo questo perché potrebbe darti qualche suggerimento nel risolvere). Ottenere la grande quantità di dati richiede 3s lato server e il piccolo di dati prende 1 s lato server. Tuttavia, l'esecuzione del servizio Web (localmente) per ottenere il minor numero di dati richiede 24 secondi.
Ho anche incluso le informazioni di binding dall'app.config dall'applicazione di test del mio client.
========= =========== informazioni vincolanti
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IFormsService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="02:00:00" sendTimeout="00:02:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="1000000000"
maxArrayLength="1000000000"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None"
proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint
address="http://monica-pc/TrialIQSvc/FormsService.svc/FormsService/FormsService.Svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IFormsService"
contract="WebService.IFormsService" name="BasicHttpBinding_IFormsService" />
</client>
ECCEZIONE ========= dATI =============
**Exception**: An error occurred while receiving the HTTP response to http://monica-pc/TrialIQSvc/FormsService.svc/FormsService/FormsService.Svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
**Inner Exception**: The underlying connection was closed: An unexpected error occurred on a receive.
**Stack trace**:
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
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 Test.WebService.IFormsService.GetFormGroupInstance(String formGroupId, String subjectId, String userId)
at Test.WebService.FormsServiceClient.GetFormGroupInstance(String formGroupId, String subjectId, String userId) in G:\SVNTrialIQ\trunk\Common\trunk\source\Forms\Test\Service References\WebService\Reference.cs:line 59
at Test.Form1.btnInstanceInfo_Click(Object sender, EventArgs e) in G:\SVNTrialIQ\trunk\Common\trunk\source\Forms\Test\Form1.cs:line 408
Sì! Questo è stato. Non è stato possibile visualizzare un registro di traccia nella mia macchina di sviluppo (Vista). Ma, quando guardo l'interfaccia di IIS 7 fornita con Vista, devo ammettere che mi fa sentire come se non avessi mai toccato un computer prima nella mia vita. Quindi non ho fatto troppa risoluzione dei problemi. –
Tuttavia, l'esecuzione del codice di traccia nel web.config sul mio server Win2003 ha rivelato che si trattava di un errore di tipo dovuto all'ereditarietà, che è piuttosto non correlato, ma è descritto bene qui: http://developers.de/blogs/damir_dobric/archive /2009/03/24/about-quot-knowntypeattribute-quot-example.aspx –