首页 > 代码库 > WCF: Hosting WCF In IIS

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.

技术分享

 

WCF: Hosting WCF In IIS