通过IIS Manager 7.5与net.tcp绑定的主机WCF服务 [英] Host WCF service with net.tcp binding through IIS Manager 7.5

查看:98
本文介绍了通过IIS Manager 7.5与net.tcp绑定的主机WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对托管Web应用程序和Web服务还很陌生.尽管我成功托管了一个Web应用程序,但是当尝试使用net.tcp绑定托管WCF服务时,却遇到了一个又一个的难题.

I am fairly new to hosting web applications and web services. Though I was successful in hosting a web application, I am running into road block after road block when trying to host a WCF service with net.tcp binding.

我的情况如下,我有一个托管的Web应用程序,该应用程序需要通过IIS 7.5与具有net.tcp绑定的托管WCF服务进行通信.如前所述,该Web应用程序托管良好,我可以浏览该网站.但是,Web应用程序对WCF服务进行了服务调用,并且我收到"TCP错误代码10061"消息,我认为这是由于托管的WCF服务未运行所致.我认为这没有运行,因为我尝试通过"telnet localhost 808"来查看WCF服务是否正在运行,并且没有运行.我浏览了许多在线指南,但仍然没有运气.我相信我是菜鸟和所有人,可能会做一些根本性的错误.我能够通过VS2010托管该服务并运行Web应用程序,并且运行良好,因此我相信绑定是正确的.我还在IIS管理器中的两个网站上启用了TCP协议.

My scenario is as follows, I have a hosted web application that needs to communicate with a hosted WCF service with net.tcp binding through IIS 7.5. As stated the web application is hosted fine and I can browse the web site. However, the web application makes services calls to the WCF service and I am getting the 'TCP error code 10061' message which I believe is due to my hosted WCF service not running. I think this is not running because I attempt to 'telnet localhost 808' to see if the WCF service is running and it is not. I've run through numerous online guides and I still have had no luck. I believe I may be doing something fundamentally wrong with me being a noob and all. I am able to host the service through VS2010 and run the web application and it works fine so I believe my bindings are correct. I've also enabled tcp protocols on both websites in IIS Manager.

所以我想我真正的问题是,通过net.tcp绑定托管WCF服务需要哪些IIS管理器步骤?在我看来,仅通过创建一个网站就不可能通过IIS管理器托管net.tcp服务,因为IIS管理器希望绑定到http端口.

So I guess my real question is what are the IIS Manager steps needed to host a WCF service with net.tcp binding? It appears to me that it is not possible to host a net.tcp service through IIS Manager by simply creating a website because IIS Manager wants to bind to an http port.

推荐答案

这里有一些要检查的东西:

Here are some things to check:

  • 确保Net.Tcp侦听器适配器Windows服务正在运行
  • 确保将netTcp列为网站的已启用协议(在IIS管理器中,转到网站的高级设置")
  • 确保netTcp被列为托管您的服务的应用程序(目录)的已启用协议(在IIS管理器中,转到托管您的服务的目录,然后选择高级设置")
  • 确保您的IIS站点具有net.tcp的绑定,并列出了正确的端口号.


请参见以下MSDN页面,以在.Net 4 + IIS 7/7.5中启用/使用非HTTP绑定:


See the following MSDN page for enabling/using non-HTTP bindings in .Net 4 + IIS 7/7.5:

配置Windows进程激活服务以与Windows Communication Foundation一起使用

这篇关于通过IIS Manager 7.5与net.tcp绑定的主机WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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