将字节数组从WCF服务读取到ASP.NET MVC 3时,出现Maximumsize问题
我正在从WCF web服务读取字节数组中的pdf,并将其返回到web应用程序以准备临时文件。但不知怎的,我得到了一个例外:将字节数组从WCF服务读取到ASP.NET MVC 3时,出现Maximumsize问题,wcf,asp.net-mvc-3,web-config,azure-storage,Wcf,Asp.net Mvc 3,Web Config,Azure Storage,我正在从WCF web服务读取字节数组中的pdf,并将其返回到web应用程序以准备临时文件。但不知怎的,我得到了一个例外: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element 从WCF服务读取
The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element
从WCF服务读取字节数组时
我在web应用程序中的绑定标记如下所示。
我还试图用2147483647替换104857600。但问题仍然存在。
有人能帮忙吗?我错过了什么
<binding name="BasicHttpBinding_IService" closeTimeout="00:10:00"
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="104857600" maxBufferPoolSize="104857600" maxReceivedMessageSize="104857600"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="104857600" maxStringContentLength="104857600" maxArrayLength="104857600"
maxBytesPerRead="104857600" maxNameTableCharCount="104857600" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
您可能还需要在WCF服务主机上包含这些相同的绑定配置
请参阅以获取参考。您可能还需要在WCF服务主机上包括这些相同的绑定配置 请参阅以供参考