获取MAXIMUMSIZE问题,一边阅读从WCF服务的字节数组ASP.NET MVC 3 [英] Getting Maximumsize issue, while reading the Byte Array from WCF service to ASP.NET MVC 3

查看:165
本文介绍了获取MAXIMUMSIZE问题,一边阅读从WCF服务的字节数组ASP.NET MVC 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从我的WCF Web服务读取字节数组的PDF文档,然后返回到Web应用程序,以prepare文件暂时的。但不知何故,我得到这个异​​常:

 传入消息(65536)的最大邮件大小已超出配额。为了增加配额,使用MaxReceivedMessageSize属性相应绑定元素上

在阅读从WCF服务的字节数组。

我的Web应用程序绑定标签如下。
我试图2147483647也更换号码104857600。但问题仍然存在。
有人能帮忙吗?我所缺少的?

 <绑定名称=BasicHttpBinding_IServicecloseTimeout =00:10:00
          openTimeout =00:10:00receiveTimeout =00:10:00的SendTimeout =00:10:00
          allowCookies =假bypassProxyOnLocal =假hostNameComparisonMode =StrongWildcard
          MAXBUFFERSIZE =104857600maxBufferPoolSize =104857600maxReceivedMessageSize =104857600
          messageEncoding =TEXTtextEncoding =UTF-8transferMode =缓冲
          useDefaultWebProxy =真正的>
          < readerQuotas MAXDEPTH =104857600maxStringContentLength =104857600maxArrayLength =104857600
            maxBytesPerRead =104857600maxNameTableCharCount =104857600/>
          <安全模式=无>
            <运输clientCredentialType =无proxyCredentialType =无
              境界=/>
            <消息clientCredentialType =用户名algorithmSuite =默认/>
          < /安全>
        < /&结合GT;


解决方案

您可能需要包括WCF服务主机上的这些相同的绑定配置为好。

请参阅this帖子以供参考。

I am reading the pdf in byte array from my WCF web service and returning it to the web application to prepare the file temporary. But somehow I am getting this exception:

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 

While reading the Byte Array from WCF service.

My binding tag in web application is as follows. I tried to replace the number 104857600 with 2147483647 also. But the issue is still there. Can somebody help? What I am missing?

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

解决方案

You likely need to include these same binding configurations on the WCF service host as well.

See this post for reference.

这篇关于获取MAXIMUMSIZE问题,一边阅读从WCF服务的字节数组ASP.NET MVC 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆