gpt4 book ai didi

WCF Web 服务在接收大数据时失败

转载 作者:行者123 更新时间:2023-12-04 08:39:25 28 4
gpt4 key购买 nike

我正在本地(或远程)调用 WCF Web 服务,该服务在处理少量数据(大约 25 行 < 1K 的数据 ea)时运行良好。但是当数据变大(大约 300 行)时,Web 服务就会失败。 下面是异常、内部异常和堆栈跟踪 从内部异常。

该服务在本地执行似乎也花费了异常长的时间(我添加这个是因为它可能会给您一些解决问题的提示)。获取大量数据在服务器端需要 3 秒,而少量数据在服务器端需要 1 秒。但是,运行 Web 服务(本地)以获取少量数据需要 24 秒。

我也有包含来自 app.config 的绑定(bind)信息从我的客户端测试应用程序。

=========绑定(bind)信息===========

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

=========异常数据=============
**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

最佳答案

要获取更多错误信息,请尝试使用 SvcTraceViewer .

关于WCF Web 服务在接收大数据时失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1328970/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com