WCF:在ide创建的服务上配置maxbuffersize
本文关键字:服务 配置 maxbuffersize 创建 ide WCF | 更新日期: 2023-09-27 18:16:07
在过去,我使用WCF的经验总是基于Castle Windsor和它的WCF工具,在那里配置绑定参数非常容易。
在这个项目中,我需要使用Visual Studio(项目->添加新项目-> WCF服务)与那些自动生成的WCF代码方法一起工作。现在我需要调整服务器端绑定的maxbuffersize参数,但是Visual Studio为我生成的唯一配置如下(Web.config):
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
我想知道Visual Studio不生成任何绑定或端点配置。通过Web.config附加特定绑定的最佳方法是什么?
如果可能的话,我更倾向于基于xml的配置,而不是以编程方式调整绑定参数。
提前感谢。
<bindings>
<basicHttpBinding>
<binding name="*********" maxBufferSize="2147483647">
<basicHttpBinding>
<bindings>
也许这能帮上忙。