简体   繁体   English

在IIS上发布WCF Rest

[英]Publishing WCF Rest on IIS

I just started with WCF rest services and I've created a very simple project. 我刚开始使用WCF休息服务,我创建了一个非常简单的项目。

在此输入图像描述

I can access it by 我可以访问它

 http://localhost:3349/VUXServicePrototype.svc/test

and see the text on the browser. 并在浏览器上查看文本。

Now my question is how can I deploy it on the IIS? 现在我的问题是我如何在IIS上部署它? I can see it on IIS Express but how can I move it on the IIS? 我可以在IIS Express上看到它但是如何在IIS上移动它?

You can build (I prefer publishing) to a directory. 您可以构建(我更喜欢发布)到目录。

  1. Open IIS. 打开IIS。
  2. Select the app pool node. 选择应用程序池节点。
  3. Create a new app pool targeting your asp.net version and set it to integrated. 创建一个针对您的asp.net版本的新应用程序池,并将其设置为集成。
  4. Select the site node you will use for the domain or localhost. 选择将用于域或localhost的站点节点。
  5. Left click add new web application. 左键单击添加新的Web应用程序。
  6. Set the app pool to the app pool created in step 3. 将应用程序池设置为在步骤3中创建的应用程序池。
  7. Set the physical path to the folder created after the build. 设置构建后创建的文件夹的物理路径。
  8. Set a default document if needed. 如果需要,设置默认文档。
  9. Select content view and select the default document or the app node if no default. 如果没有默认值,请选择内容视图并选择默认文档或应用程序节点。
  10. Click view and test. 单击查看并测试。

To deploy a WCF service once you've finished development, an easy way is to use the visual studio deploy tool. 要在完成开发后部署WCF服务,一种简单的方法是使用visual studio部署工具。 Right click on your service project, and click publish. 右键单击您的服务项目,然后单击“发布”。 Click the dropdown, and create a new profile. 单击下拉列表,然后创建新的配置文件。

You can either deploy directly to the IIS server, or deploy to the file system so that you can setup IIS yourself. 您可以直接部署到IIS服务器,也可以部署到文件系统,以便自己设置IIS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM