【问题标题】:How to increase MaxReceivedMessageSize for azure worker role deployment?如何为 azure worker 角色部署增加 MaxReceivedMessageSize?
【发布时间】:2015-09-08 09:36:55
【问题描述】:

我有一个中等规模的 azure worker 角色和一个实例。在部署我的 azure worker 时,我遇到了一个错误,提示“已超出传入消息的最大消息大小配额 (1048576)。要增加配额,请在适当的绑定元素上使用 MaxReceivedMessageSize 属性。”使用 Visual Studio 将角色云服务转为天蓝色。

我尝试像这样在 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>

请帮我解决这个问题。

提前致谢。

【问题讨论】:

    标签: c# asp.net azure azure-worker-roles azure-cloud-services


    【解决方案1】:

    max* 数字的最高允许数字是 2147483647,而不是您列出的 2147483648。你的配置应该是这样的:

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

    【讨论】:

    • 我按照您的建议更改了最大数量,但没有解决问题:(
    【解决方案2】:

    我遇到了确切的问题。显然,这是 Azure 本身的问题(参见:https://social.msdn.microsoft.com/Forums/en-US/6b895c6b-69e3-4211-ab2f-29b95ff23030/unable-to-publish-web-role-maxreceivedmessagesize-error?forum=windowsazuredevelopment)。

    该问题已在上面的链接中标记为已修复。但是,今天,我仍然遇到完全相同的问题。我不得不手动上传包:(

    干杯

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-03
      • 1970-01-01
      • 1970-01-01
      • 2014-12-29
      • 1970-01-01
      相关资源
      最近更新 更多