稳扎稳打Silverlight(53) - 4.0通信之对WCF NetTcpBinding的支持
2010-10-12 12:30:06 来源:WEB开发网App.config
代码<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<!--
元数据地址:http://localhost:12345/SocketServer/Duplex/mex
TCP 地址:net.tcp://localhost:4502/SocketServer/Duplex
TCP 端口限制在 4502 - 4534 之间
-->
<service name="SocketServer.Duplex">
<endpoint address="SocketServer/Duplex" binding="customBinding" contract="SocketServer.IDuplex" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:12345/SocketServer/Duplex" />
<add baseAddress="net.tcp://localhost:4502/" />
</baseAddresses>
</host>
</service>
</services>
<!--
Silverlight 4.0 对 NetTcpBinding 的支持是通过自定义绑定的方式来实现的。服务端和客户端都需要使用自定义绑定
-->
<bindings>
<customBinding>
<binding>
<binaryMessageEncoding></binaryMessageEncoding>
<tcpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
</binding>
</customBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Tags:稳扎稳打 Silverlight 通信
编辑录入:爽爽 [复制链接] [打 印]- ››silverlight全屏显示图片
- ››Silverlight MVVM 模式(一) 切近实战
- ››稳扎稳打Silverlight(53) - 4.0通信之对WCF NetTc...
- ››稳扎稳打Silverlight(54) - 4.0通信之对UDP协议的...
- ››稳扎稳打Silverlight(55) - 4.0通信之对UDP协议的...
- ››稳扎稳打Silverlight(56) - 4.0通信之与 WCF Data...
- ››Silverlight for Windows Phone 7开发系列(1):...
- ››Silverlight for Windows Phone 7开发系列(2):...
- ››Silverlight for Windows Phone 7开发系列(3):...
- ››Silverlight for Windows Phone 7开发系列(4):...
- ››Silverlight for Symbian
- ››Silverlight3系列(四)数据绑定 Data Binding 1
更多精彩
赞助商链接