简体   繁体   English

如何使用Visual Studio 2012在IIS 8.0中部署WCF Web服务?

[英]How to deploy a WCF web service in IIS 8.0 using Visual Studio 2012?

I am stuck and can not figure out how to deploy a wcf web service in iis8.0, can any body please help me out about the detailed process of deploying a wcf web service in iis? 我陷入困境,无法弄清楚如何在iis8.0中部署wcf Web服务,请问有谁可以帮我解决在iis中部署wcf Web服务的详细过程?

Are there any setting that need to be set? 是否需要设置任何设置?

What have tried is....... 尝试过的是.......

Then i created a new website in iis by giving a site name and physical path (C:\\inetpub\\wwwroot\\NEWFOLDER). 然后我通过提供站点名称和物理路径(C:\\ inetpub \\ wwwroot \\ NEWFOLDER)在iis中创建了一个新网站。 Then i opened the VS solution in administrative mode published it. 然后我以管理模式打开VS解决方案发布它。 In the dialog box opened, Created a new web application under the IIS Sites and published it. 在打开的对话框中,在IIS站点下创建一个新的Web应用程序并将其发布。 It was successful and could be seen in output window as well. 它很成功,也可以在输出窗口中看到。

when click on the link of the line Connecting to http://localhost:[port#]/WebApplicationName it shows the directory structure. 当点击连接到http:// localhost:[port#] / WebApplicationName的行的链接时,它会显示目录结构。 then clicked on .svc file it gives an error saying "The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map 然后单击.svc文件,它会显示错误“由于扩展​​配置,无法提供您请求的页面。如果页面是脚本,请添加处理程序。如果要下载文件,请添加MIME映射

WCF Servive handlers are not installed on you server. 您的服务器上未安装WCF Servive处理程序。

In Server Manager 在服务器管理器中

  • Expand ".Net 3.5" or ".Net 4.5", depending on Os/Framework version. 展开“.Net 3.5”或“.Net 4.5”,具体取决于Os / Framework版本。

  • Under "WCF Services", check the box for "HTTP-Activation" (for http binding) or "Non-http" for others bindings (tcp, named pipes, etc). 在“WCF服务”下,选中“HTTP激活”(用于http绑定)或“非HTTP”用于其他绑定(tcp,命名管道等)的框。

  • Click "Install" Button. 单击“安装”按钮。

That's all 就这样

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

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