简体   繁体   English

如何为Azure辅助角色部署增加MaxReceivedMessageSize?

[英]How to increase MaxReceivedMessageSize for azure worker role deployment?

I have an azure worker role which is medium size and one instance. 我有一个天蓝色的工作人员角色,大小适中,有一个实例。 I encountered an error which says " The maximum message size quota for incoming messages (1048576) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. " when deploying my azure worker role cloud service to azure using visual studio. 我将azure worker角色云服务部署为使用可视化进行azure部署时遇到错误,该错误表示“ 超出了传入消息的最大消息大小配额(1048576)。要增加配额,请在适当的绑定元素上使用MaxReceivedMessageSize属性。 ”工作室。

I tried to increase maxReceivedMessageSize property in app.config like this but it didn't work: 我试图像这样在app.config中增加maxReceivedMessageSize属性,但是它不起作用:

<bindings>
    <basicHttpBinding>
        <binding name="basicHttp" allowCookies="true"
                 maxReceivedMessageSize="2147483648" 
                 maxBufferSize="2147483648"
                 maxBufferPoolSize="2147483648">
            <readerQuotas maxDepth="32" 
                 maxArrayLength="2147483648"
                 maxStringContentLength="2147483648"/>
        </binding>
    </basicHttpBinding>
</bindings>

Please help me to solve this problem. 请帮我解决这个问题。

Thanks in advance. 提前致谢。

The highest permittable number for the max* numbers is 2147483647, not 2147483648 which you have listed. 最大*号的最大允许数字是2147483647,而不是您列出的2147483648。 Your config should look like this: 您的配置应如下所示:

<bindings>
    <basicHttpBinding>
        <binding name="basicHttp" allowCookies="true"
                 maxReceivedMessageSize="2147483647" 
                 maxBufferSize="2147483647"
                 maxBufferPoolSize="2147483647">
            <readerQuotas maxDepth="32" 
                 maxArrayLength="2147483647"
                 maxStringContentLength="2147483647"/>
        </binding>
    </basicHttpBinding>
</bindings>

I am having the exact problem. 我有确切的问题。 Apparently, it is a problem with Azure itself (see: https://social.msdn.microsoft.com/Forums/en-US/6b895c6b-69e3-4211-ab2f-29b95ff23030/unable-to-publish-web-role-maxreceivedmessagesize-error?forum=windowsazuredevelopment ). 显然,这是Azure本身的问题(请参阅: https : //social.msdn.microsoft.com/Forums/en-US/6b895c6b-69e3-4211-ab2f-29b95ff23030/unable-to-publish-web-role- maxreceivedmessagesize-error?forum = windowsazuredevelopment )。

The problem was marked as fixed in the link above. 该问题在上面的链接中被标记为已修复。 However, today, I am still getting the exact same problem. 但是,今天,我仍然遇到完全相同的问题。 I had to upload the package manually :( 我必须手动上传软件包:(

Cheers 干杯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM