WCF Non-HTTP Homestay IIS

Source: Internet
Author: User

One: Build a simple WCF project, as well as the IIS service configuration, publish the project, step

II: Web. config configuration

<?xml version="1.0"encoding="Utf-8"?><configuration> <appSettings> <add key="Aspnet:usetaskfriendlysynchronizationcontext"Value="true"/> </appSettings> <system.web> <compilation debug="true"targetframework="4.5"/> "4.5"/> </system.web> <system.serviceModel>

<services> <service name="Tcpwcf.service1"> <endpoint binding="nettcpbinding"address=""contract="Tcpwcf.iservice1"/> <endpoint address="Mex"binding="mextcpbinding"contract="IMetadataExchange"/> "net.tcp://localhost:7878/service1.svc"/> </baseAddresses> "true"></binding> </netTcpBinding> </bindings>

<behaviors> <serviceBehaviors> <behavior> <!--to avoid leaking metadata information, set the following values before deployment tofalse-"Need to be modified"<servicemetadata httpgetenabled="false"Httpsgetenabled="false"/> <!--to receive the fault exception details for debugging, set the following values totrue。 Before deployment, set tofalseTo avoid leaking exception information--<servicedebug includeexceptiondetailinfaults="false"/>"Need to be modified"
</behavior> </serviceBehaviors> </behaviors> <protocolMapping> <add binding="basichttpsbinding"Scheme="HTTPS"/> </protocolMapping> <servicehostingenvironment aspnetcompatibilityenabled="true"Multiplesitebindingsenabled="true"/> </system.serviceModel> <system.webServer> <modules runallmanagedmodulesforallrequests="true"/> <directorybrowse enabled="true"/> </system.webServer> </configuration>

Three: Site Configuration when publishing

Four: Post-release results

Five: Client-side reference, need to refer to several times.

WCF Non-HTTP Homestay 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.