如何增加azure工作者角色部署的MaxReceivedMessageSize
本文关键字:角色 工作者 部署 MaxReceivedMessageSize azure 何增加 增加 | 更新日期: 2023-09-27 18:11:36
我有一个azure worker角色,它是中等大小和一个实例。我遇到了一个错误,上面写着"传入消息的最大消息大小配额(1048576)已超过"。要增加配额,请在适当的绑定元素上使用MaxReceivedMessageSize属性。"当使用visual studio将我的azure worker role云服务部署到azure时。
我试图增加maxReceivedMessageSize属性在app.config像这样,但它没有工作:
<bindings>
<basicHttpBinding>
<binding name="basicHttp" allowCookies="true"
maxReceivedMessageSize="2147483648"
maxBufferSize="2147483648"
maxBufferPoolSize="2147483648">
<readerQuotas maxDepth="32"
maxArrayLength="2147483648"
maxStringContentLength="2147483648"/>
</binding>
</basicHttpBinding>
</bindings>
请帮我解决这个问题。
max* number的最高允许数是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>
我有确切的问题。显然,这是Azure本身的问题(参见:https://social.msdn.microsoft.com/Forums/en-US/6b895c6b-69e3-4211-ab2f-29b95ff23030/unable-to-publish-web-role-maxreceivedmessagesize-error?forum=windowsazuredevelopment)。
这个问题在上面的链接中被标记为fixed。然而,今天,我仍然得到完全相同的问题。我必须手动上传软件包:(
欢呼