IIS上的主机WCF服务应用程序 [英] Host WCF service application on IIS

查看:137
本文介绍了IIS上的主机WCF服务应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了这项服务: http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/four-steps-to-create-first-wcf-service-for-beginners/ 现在我想主持那个IIS上的服务。

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.

如果我想在IIS上托管WCF服务应用程序怎么办?

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

在IIS上托管的目的是因为我想在Android应用程序上使用该服务。

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

推荐答案

MSND使用方法在IIS上托管WCF 。您不必单独创建服务库和单独托管应用程序。您所能做的就是创建一个简单的Visual Studio WCF服务应用程序项目,其中包含一个SVC文件,该文件将帮助您在IIS上托管并在同一项目中创建服务。
步骤:

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. 创建新的Visual Studio WCF服务应用程序

  2. 此WCF服务Project已包含SVC文件,该文件用于在IIS上托管服务。

  3. 创建服务。

  4. 编译服务项目。

  5. 使用inetmgr windows快捷方式打开IIS(win + r)

  6. 在IIS上创建网站/ Web应用程序并直接指向WCF服务应用程序项目。 / li>
  7. 选择适当的应用程序池,具体取决于您的.NET Framework。

  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.

这篇关于IIS上的主机WCF服务应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆