且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

错误:已超出传入邮件的最大邮件大小配额 (65536)

更新时间:2021-08-14 23:16:36

听起来您在服务端遇到了错误(当您尝试上传时).根据您发布的服务配置,您已为 maxReceivedMessageSize 和其他设置设置了更高的限制,但您从未将该绑定分配到您的服务端点,因此 WCF正在使用 maxReceivedMessageSize 的默认值 (65536).

It sounds like you're getting the error on the service side (when you try to upload). According to your posted service config, you've set a higher limit for maxReceivedMessageSize and other settings, but you never assign that binding to your service endpoint(s), so WCF is using the default value for maxReceivedMessageSize (65536).

您需要通过 endpoint 元素的 bindingConfiguration 属性将定义的绑定 (wsBinding) 分配给您的服务端点,像这样:

You need to assign your defined binding (wsBinding) to your service endpoint(s) via the bindingConfiguration attribute of the endpoint element, like this:

<endpoint address="" 
          binding="wsHttpBinding"
          bindingCongifuration="wsBinding"
          contract="PMSService.ThomoloshaDeclaration">

现在该服务将使用您定义的绑定配置,该配置具有更大的尺寸.

Now the service will use the binding configuration you've defined, that has the larger size.