1

这有点像新手,但我花了一整天的时间试图弄清楚这一点。我在 Azure WebRole 中有一个 WF Service1.xamlx,其中包含一个 web.config ServiceModel 部分:

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" >
  <serviceActivations>
    <add relativeAddress="~/Service1.xamlx" service="Service1.xamlx" factory="System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory"/>
  </serviceActivations>
</serviceHostingEnvironment> 

在我的客户端应用程序中,当我将服务引用添加到 Service1.xaml 时,这就是我得到的绑定(basicHttpBinding 的所有默认设置):

    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                useDefaultWebProxy="true">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="None">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="UserName" algorithmSuite="Default" />
                </security>
            </binding>

我需要增加绑定中的 maxStringContentLength="8192" 值。我怎么做??

感谢您查看此内容以及您可以提供的任何帮助。

4

0 回答 0