WCF_Config頁面常用配置

 右键点击App.config文件,选中Edit WCF Configuration进行编辑,我们添加2个baseAddress,一个是基于HTTP协议的;一个是基于TCP协议的。同时添加2个bindings项,一个是basicHttpBinding;一个是netTcpBinding。同时添加2个endpoint,一个是指向basicHttpBinding,一个是指向netTcpBinding。主要配置如下:

baseAddress:

<host> <baseAddresses> <add baseAddress="http://localhost:8732/Design_Time_Addresses/StreamingTransfersServer/MediaStreaming/" /> <add baseAddress="net.tcp://localhost:9001"/> </baseAddresses> </host>

bindings:

复制代码
<bindings> <basicHttpBinding> <binding name="basicHttpStreaming" maxBufferSize="40000000" maxReceivedMessageSize="40000000" messageEncoding="Mtom" transferMode="Streamed" /> </basicHttpBinding> <netTcpBinding> <binding name="netTcpStreaming" transferMode="Streamed" maxBufferSize="40000000" maxReceivedMessageSize="40000000" /> </netTcpBinding> </bindings>

posted on 2015-10-16 08:56  明俠遠飄  阅读(140)  评论(0编辑  收藏  举报

导航