Host WCF service application on IIS

落爺英雄遲暮 提交于 2019-12-25 02:44:40

问题


I have created this service: http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/four-steps-to-create-first-wcf-service-for-beginners/ and now I want to host that service on IIS.

The solutions I came across are creating service library and then creating a separate hosting project.

What if I want to host WCF service application on IIS?

Purpose of hosting on IIS is because I want to consume that service on android application.


回答1:


MSND How-to for hosting the WCF on IIS. You don't have to create Service library seperatly and hosting application seperately. All you can do is create a simple Visual studio WCF Service Application Project which includes a SVC file which will help you to host on IIS and create Services in the same project. Steps:

  1. Create a new Visual Studio WCF Service Application
  2. This WCF Service Project already contains the SVC file, which is used for hosting the services on IIS.
  3. Create your services.
  4. Compile the Service Project.
  5. Open the IIS using inetmgr windows shortcut (win + r)
  6. Create a website /web application on IIS and point the WCF Service Application Project directly.
  7. Select Appropriate Application Pool, depending on your .NET Framework.


来源:https://stackoverflow.com/questions/20674398/host-wcf-service-application-on-iis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!