[WCF practice] 1. WCF uses net. tcp to host in IIS, wcfnet. tcp

Source: Internet
Author: User

[WCF practice] 1. WCF uses net. tcp to host in IIS, wcfnet. tcp

I. IIS Section

Environment: Windows Server 2008 R2
1. Install WAS, as shown in: 2. net. tcp protocol binding for the website, as shown in: 3. Enable net. tcp for the website, as shown in: Ii. WCF code Part 1. DesignCaseService. svc
  1. <%@ServiceHostLanguage="C#"Debug="true"Service="Web.API.Implementations.DesignCaseService"%>
2. web. config configuration example:
<System. serviceModel> <services> <service name = "Web. API. implementations. designCaseService "> <endpoint binding =" netTcpBinding "address =" "contract =" Web. API. interfaces. IDesignCaseService "/> <endpoint address =" mex "binding =" mexTcpBinding "contract =" IMetadataExchange "/> 


3. publish a service. The box is very important and must be net. tcp 4. test Service 3. Error highlights 1. unable to find the endpoint with NetTcpBinding and solution net. the base address of the tcp match. The registered base address scheme is [http]. Cause: the website is not configured with net. tcp protocol. By default, the website only has http protocol solution: Configure net. tcp protocol question: the website is correctly configured with net. is this error returned for tcp? Possible cause: the port is incorrect, for example, the net. tcp port 1000 may be used to right-click the svc file in CMDL Studio and allocate another port, such as 2000. This may cause this problem. Solution: Open the svc file in IIS. 2. You have attempted to create a channel that does not support the. Net Framework and may encounter an HTTP endpoint. You need to record the type "PreambleAck" and find the cause of "72:
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>   
When http metadata is enabled in the default configuration, an http-based Metadata link is displayed on the publish service page, as shown in. net. tcp protocol, but what is displayed here is the http protocol solution:
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="false"/> 


References: http://www.cnblogs.com/Gyoung/archive/2012/12/11/2812555.html

From Weizhi note (Wiz)

In wcf, nettcp is used for binding. Can it be connected on the local machine, but not on other machines?

It should be because you have not deployed. net. tcp can be deployed only after iis7 or above.
Ask a question about nettcp debugging in wcf

To bind with net. tcp, we recommend that you host it in the console or service. If you want to host it under IIS, you must enable several functions of IIS.

Related Article

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.