WEB开发网
开发学院WEB开发ASP.NET 稳扎稳打Silverlight(53) - 4.0通信之对WCF NetTc... 阅读

稳扎稳打Silverlight(53) - 4.0通信之对WCF NetTcpBinding的支持

 2010-10-12 12:30:06 来源:WEB开发网   
核心提示: ServiceReferences.ClientConfig代码<configuration> <system.serviceModel> <!-- 使用 NetTcpBinding 绑定需要先引用 System.ServiceModel.NetTcp.dll 程序

ServiceReferences.ClientConfig

代码

<configuration>
    <system.serviceModel>
        <!--
            使用 NetTcpBinding 绑定需要先引用 System.ServiceModel.NetTcp.dll 程序集
        -->
        <client>
            <endpoint address="net.tcp://localhost:4502/SocketServer/Duplex" binding="customBinding" contract="DuplexServiceReference.IDuplex"
                      bindingConfiguration="netTcpBinding" />
        </client>

        <!--
            Silverlight 4.0 对 NetTcpBinding 的支持是通过自定义绑定的方式来实现的。服务端和客户端都需要使用自定义绑定
        -->
        <bindings>
            <customBinding>
                <binding name="netTcpBinding">
                    <binaryMessageEncoding />
                    <tcpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
                </binding>
            </customBinding>
        </bindings>
    </system.serviceModel>
</configuration>

2、通过 HTTP 的方式检索 Socket 通信的安全策略

上一页  1 2 3 4 5 6 7  下一页

Tags:稳扎稳打 Silverlight 通信

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接