WCF: How to host the Net.TCP protocol to IIS

Source: Internet
Author: User

Original address: http://jingyan.baidu.com/article/aa6a2c14d60f7a0d4d19c447.html

1 Deploying IIS

1.1 Installing was

IIS was originally a service that does not support non-HTTP protocols, and in order for IIS to support NET.TCP, you must first install was (Windows Process Activation
Service), or Windows Process activation services.

Open Control Panel-programs and features-turn Windows features on or off, install was,

After installation, you can go to the following service in the Services window: Windows Process Activation Service; Net.msmq
Listener Adapter; Net.pipe Listener Adapter; Net.TCP Listener Adapter; Net.TCP Port
Sharing service. These few services. Determine net.tcp Listener Adapter and net.tcp
Whether the Port sharing service has been started.

1.2 Determine whether WCF enables Non-http support

This feature is also opened in the Control Panel,

1.3 Adding NET.TCP bindings to a site

In IIS, select your website, then click Bindings in the Action menu bar on the right, a "site bindings" window pops up, click Add, type Select Net.TCP

1.4 Enabling the NET.TCP protocol

Select your site, click "Advanced Settings", pop up the form, and add it manually in the "Enabled Protocols" column: Net.TCP

2 Testing Services

2.1 New Service

To create a new WCF service with VS2010, for the sake of simplicity, I'm testing directly with vs default generated. There is only one GetData method

The following is the configured config:

<?xml version= "1.0"? ><configuration><system.web><compilationdebug= "true" targetFramework= " 4.0 "/></system.web><system.servicemodel><protocolmapping><addscheme=" TCP "binding=" NetTcpBinding "/></protocolmapping><bindings><nettcpbinding><bindingname=" Nettcpbindconfig "closetimeout=" 00:30:00 "portsharingenabled=" true "opentimeout=" 00:30:00 "receiveTimeout=" 00:30:00 "sendtimeout=" 00:30:00 "transactionflow=" false "transfermode=" Buffered "transactionprotocol=" OleTransactions "hostnamecomparisonmode=" StrongWildcard "listenbacklog=" "><readerquotasmaxdepth=" 2147483647 "maxstringcontentlength=" 2147483647 "maxarraylength=" 2147483647 "maxbytesperread=" 2147483647 " Maxnametablecharcount= "2147483647"/><reliablesessionordered= "true" inactivitytimeout= "00:01:00" enabled= " False "/><securitymode=" None "><transportclientcredentialtype=" Windows "protectionlevel=" EncryptAndSign "

experience content is for reference only, if you need to solve specific problems (especially in the areas of law, medicine, etc.), we recommend that you consult the relevant professionals in detail.

WCF: How to host the Net.TCP protocol to IIS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.