WCF: Hosting WCF In IIS

Posted m苗子

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章

WCF

WCF寄宿(Host)之自我寄宿(Self-Hosting)简单实例Windows应用程序宿主

创建一个简单的WCF程序

关于WCF引用方式之WCF服务寄宿控制台

您啥时候会使用 In-Proc WCF 组件?

C/C++ 中/使用 WCF(WCF 绑定)