IntroductionIn this article, I would like to give a brief idea on using NetTcpBinding with Silverlight application and hosting configuration to be done on IIS 7.Note: Only IIS7 has support for net.tcp binding. One of the most important features in Silverlight 4 is the introduction of NetTcpBinding support; we can communicate with a WCF service using net.tcp protocol.
Advantages of using NetTcpBinding Performance: Silverlight applications using NetTcpBinding communicates with WCF service in your intranet zone. Performance of NetTcpBinding compared to HTTP polling duplex is the key reason to consider using the WCF net.tcp protocol in duplex communication scenarios. NetTcpBinding offers major performance gains when compared to httpPollingDuplex on these parameters:
Increase in throughput of data notifications a client application can receive from the server.
Increase in the maximum number of connected clients the server can support concurrently.
Duplex Communication: Supports Duplex communication between client and service.
IDE Integration: Net.tcp protocol is well integrated with the Add Service Reference feature in Visual Studio 10. A WCF service proxy to a WCF service exposed using the net.tcp binding can be easily generated for a Silverlight 4 client application. Net.tcp protocol comes with Silverlight configuration support (ServiceReferences.ClientConfig), so the details of the binding, including service address, can be changed without recompiling the application.
Improved library factoring to help optimize the Silverlight application (XAP) size. Applications that utilize only request/response exchange patterns using WCF have all the required components available in Silverlight core. Applications that require duplex message exchange patterns must include the System.ServiceModel.Extensions.dll in the XAP, as well as one or both of System.ServiceModel.NetTcp.dll and System.ServiceModel.PollingDuplex.dll, depending on the protocol the application is using. System.ServiceModel.Extensions.dll contains functionality common for all duplex communication scenarios. System.ServiceModel.NetTcp.dll supports the WCF net.tcp protocol and System.ServiceModel.PollingDuplex.dll the HTTP polling duplex protocol. When a proxy is created in a Silverlight 4 project using the Add Service Reference feature of Visual Studio 10, appropriate library references will be added to the project depending on the actual protocols the WCF service exposes. Note: NetTcpBinding is subject to TCP port limitations, Silverlight applications with NetTcpBinding can run only on ports 4502-4534.
Read more: Codeproject
QR:
Advantages of using NetTcpBinding Performance: Silverlight applications using NetTcpBinding communicates with WCF service in your intranet zone. Performance of NetTcpBinding compared to HTTP polling duplex is the key reason to consider using the WCF net.tcp protocol in duplex communication scenarios. NetTcpBinding offers major performance gains when compared to httpPollingDuplex on these parameters:
Increase in throughput of data notifications a client application can receive from the server.
Increase in the maximum number of connected clients the server can support concurrently.
Duplex Communication: Supports Duplex communication between client and service.
IDE Integration: Net.tcp protocol is well integrated with the Add Service Reference feature in Visual Studio 10. A WCF service proxy to a WCF service exposed using the net.tcp binding can be easily generated for a Silverlight 4 client application. Net.tcp protocol comes with Silverlight configuration support (ServiceReferences.ClientConfig), so the details of the binding, including service address, can be changed without recompiling the application.
Improved library factoring to help optimize the Silverlight application (XAP) size. Applications that utilize only request/response exchange patterns using WCF have all the required components available in Silverlight core. Applications that require duplex message exchange patterns must include the System.ServiceModel.Extensions.dll in the XAP, as well as one or both of System.ServiceModel.NetTcp.dll and System.ServiceModel.PollingDuplex.dll, depending on the protocol the application is using. System.ServiceModel.Extensions.dll contains functionality common for all duplex communication scenarios. System.ServiceModel.NetTcp.dll supports the WCF net.tcp protocol and System.ServiceModel.PollingDuplex.dll the HTTP polling duplex protocol. When a proxy is created in a Silverlight 4 project using the Add Service Reference feature of Visual Studio 10, appropriate library references will be added to the project depending on the actual protocols the WCF service exposes. Note: NetTcpBinding is subject to TCP port limitations, Silverlight applications with NetTcpBinding can run only on ports 4502-4534.
Read more: Codeproject
QR: