efn阿克说 发表于 2017-12-27 17:38:02

WCF绑定netTcpBinding寄宿到IIS

<system.serviceModel>  <services>
  <service name="Wettery.WcfContract.Services.GameService" behaviorConfiguration="mex">
  <endpoint address="" binding="netTcpBinding" contract="Wettery.WcfContract.Services.IGameService" bindingConfiguration="netTcpBindingConfig"></endpoint>
  <!--为net.tcp绑定提供元数据-->
  <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
  </service>
  <service name="Wettery.WcfContract.Services.PlayerService" behaviorConfiguration="mex">
  <endpoint address="" binding="netTcpBinding" contract="Wettery.WcfContract.Services.IPlayerService" bindingConfiguration="netTcpBindingConfig"></endpoint>
  <!--为net.tcp绑定提供元数据-->
  <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
  </service>
  </services>
  <bindings>
  <netTcpBinding>
  <binding name="netTcpBindingConfig" transferMode="Buffered" portSharingEnabled="true">
  <readerQuotas maxStringContentLength="6553600" />
  <security mode="None" />
  </binding>
  </netTcpBinding>
  </bindings>
  <behaviors>
  <serviceBehaviors>
  <behavior name="mex">
  <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
  <serviceDebug includeExceptionDetailInFaults="true" />
  </behavior>
  </serviceBehaviors>
  </behaviors>
  </system.serviceModel>
页: [1]
查看完整版本: WCF绑定netTcpBinding寄宿到IIS