2011-10-12 354 views
1

我开发了一个控制台应用程序,从那里我添加了作为Web引用后调用了WCF函数。我的控制台应用程序的web.config按如下..获取错误:缓冲XML内容所需的大小超过了缓冲区配额

<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等等仍然无法解决这个问题。希望任何人都可以在这里帮助我理清这个问题。

谢谢。 Arun

回答

2

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

+0

因此,客户端上的错误?什么存储过程数据类型? – Andez