【问题标题】:Getting Error : The size necessary to buffer the XML content exceeded the buffer quota出现错误:缓冲 XML 内容所需的大小超出了缓冲区配额
【发布时间】:2011-10-12 06:47:19
【问题描述】:

我开发了一个控制台应用程序,并在添加为 Web 参考后从那里调用了 WCF 函数。我的控制台应用程序的 web.config 如下所示..

 <system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="BasicHttpBinding_IApicaAzureMonitorAgentReceiverWCF"
      closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
      sendTimeout="00:01: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="2147483647"
        maxArrayLength="2147483647" 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://apicaWCF.cloudapp.net/ApicaAzureMonitorAgentReceiverWCF.svc"
    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IApicaAzureMonitorAgentReceiverWCF"
    contract="Dashboard2WCFData.IApicaAzureMonitorAgentReceiverWCF"
    name="BasicHttpBinding_IApicaAzureMonitorAgentReceiverWCF" />
</client>

我收到错误:缓冲 XML 内容所需的大小超出了缓冲区配额。我也尝试过并增加了 maxbuffersize 等。仍然无法解决这个问题。希望任何人都可以在这里帮助我解决这个问题。

谢谢。 阿伦

【问题讨论】:

    标签: asp.net wcf console-application


    【解决方案1】:

    最后我得到了解决方案,问题出在存储过程参数数据类型上,并使用 Visual Studio 中的附加进程机制得到了这个解决方案,所以我从控制台应用程序调试了 wcf 函数,并在 WCF 捕获块中得到了确切的错误。

    【讨论】:

    • 那是客户端的错误吗?什么存储过程数据类型?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-07-25
    • 1970-01-01
    • 2021-05-26
    • 2013-11-27
    • 2017-05-12
    • 1970-01-01
    • 2011-12-24
    相关资源
    最近更新 更多