Boarding WCF (TCP) on iis7)

Source: Internet
Author: User

Boarding WCF on IIS is a way of boarding WCF, but the method of boarding TCP on IIS is not found. Since IIS6 was used previously, net. TCP cannot be parsed .. after reading a lot of information online, it seems that only iis7 supports TCP and other communication methods (was ), download the Virtual Machine and install Windows 7 for a try (originally we were going to install win2008, but the company only had the image file of the DC version R2. After the installation, it was impossible to activate it .....)

0. Install IIS, framework, and was

These are all added to Windows Components.

1. Configure IIS to support boarding to WCF

This is the first tangle point. If the configuration is not good, let alone TCP, even HTTP cannot be hosted. Generally, if IIS has been installed on the machine. net Framework will automatically prompt you to install IIS's support for WCF, which is no problem. Unfortunately, if you installed the framework first, congratulations, manually run servicemodelreg. This file is hidden in the Framework tool you installed, generally, you can find the path under the Framework \ V3.0 \ Windows Communication Foundation Directory (3.0 is used here. For other versions, refer to the path. However, the command parameters may change)

2. Configure the IIS node to support TCP

Open the IIS Manager (because I used win7 for the first time, I couldn't find the running path .... ), set the site binding, and append the net. TCP: the binding information is set to 808: *. The address is configured on the web. the TCP address in config is also empty.

3. In this case, IIS hosts the TCP Service, and the audience is lucky enough to implement the desired function. If anyone is lucky enough, continue to look down.

4. if you are not using a virtual machine, you do not need to read this article. I am using a virtual machine. Therefore, to debug WCF, you must connect the virtual machine to the host. However, when you look online, you can basically use bridging, then allocate the virtual machine and the host to a network segment, but this obviously does not meet the requirements for testing in the company. The host IP address cannot be changed (otherwise it will not be able to access the network ....), the Virtual Machine IP address cannot be changed (no IP address is assigned ...), if you want to think about it, you can think about whether or not you can use the virtual network card. However, when you have just created a virtual network card, the Internet of the host is broken by the company's IT management... as to whether this method can achieve interoperability, please test it on your own. If the test is complete, please let us know. Finally, we have to find that the network communication methods of virtual machines are not only using bridging, net, only .. in addition, there is another way, joy... so, point it to the vmnet8 created by the virtual machine, and then reconfigure the Virtual Machine IP information, the gateway points to the net8 IP address, and the internal and external functions of the communication ..

5. If you are familiar with iis7 to publish Web information, you do not need to read this article. I encountered a classic problem because I installed Windows 7 and used iis7 for the first time. I could access the published services in the virtual machine, but the external machine could not access the published services, after the tangle, it may be caused by permission issues, so I opened the virtual machine's guest account and found that it was still not working. Then I set up a firewall to enable HTTP File Access, finally, we can see the WSDL information .....

Above, my TCP Service has finally been successfully hosted on IIS. If anyone wants to know how to publish TCP and how to host the Orthodox problem of IIS .. well, I don't want to talk about this online document. I personally recommend the artech series.

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.