【发布时间】:2016-03-23 21:06:34
【问题描述】:
对于 app.config 中的简化 WCF 配置,我需要做哪些最少的客户端设置?
默认是这样的:
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
我可以排除什么,我需要多少?
编辑:我应该开始撕掉零件直到它坏掉吗?我希望能找到一些经过优化的 wsHttpBindings,人们会很幸运。
【问题讨论】:
-
从这个问题上看不清楚我们应该从服务器还是客户端的角度出发。最小配置可能不同。无论如何,我想无论如何都不需要绑定配置。无需任何绑定配置,WCF 客户端和服务器都可以很好地工作。最小配置是
<client>或<services>元素,具体取决于问题是针对客户端还是服务器。
标签: .net wcf app-config