WCF: Hosting WCF In IIS

1. Create an IIS Application as below

2. In the physical path, there're 2 files and 1 App_Code folder

  

  a. App_code contains the WCF Service contract and class implementing the contract

  b. service.svc contains code hosts the service 

  c. Web.config configure the service endpoints exposed to clients

 3. Make sure items below is enabled for your computer

  a. IIS

  b. WCF HTTP Activation

4. Go to http://localhost/IISHostedCalc/service.svc, we can see the service is created.

原文地址:https://www.cnblogs.com/ATually/p/7011591.html