简体   繁体   English

WCF 使用 net.tcp 绑定

[英]WCF Using net.tcp binding

I'm running Windows 7 64-bit.我正在运行 Windows 7 64 位。 I'm attempting to host a WCF service which will use Windows security (net.tcp binding) on IIS7.我正在尝试在 IIS7 上托管 WCF 服务,该服务将使用 Windows 安全性(net.tcp 绑定)。 The service I'm running is a very simple skeleton app, which works fine so far with HTTP and HTTPS.我正在运行的服务是一个非常简单的骨架应用程序,到目前为止它与 HTTP 和 HTTPS 一起工作正常。 (I've finally gotten HTTPS to work and I'm just trying to add another binding--NET.TCP.) (我终于让 HTTPS 工作了,我只是想添加另一个绑定——NET.TCP。)

I've configured IIS to enable net.tcp: I added a net.tcp binding with Binding information "808:*".我已将 IIS 配置为启用 net.tcp:我添加了一个 net.tcp 绑定,绑定信息为“808:*”。 My "Advanced Settings -> Enabled Protocols" field is set to "https,net.tcp".我的“高级设置 -> 启用的协议”字段设置为“https,net.tcp”。

The entire solution (contains the service application and a client app which consumes both http and https) can be found at http://petio.org/2011/06/29/MagicEightBall.zip .整个解决方案(包含服务应用程序和同时使用 http 和 https 的客户端应用程序)可以在http://petio.org/2011/06/29/MagicEightBall.ZADCDBDZ29A8D8417522 In the service Web.config, a copy of which can be found at http://petio.org/2011/06/29/MagicEightBall/Web.config ,在服务 Web.config 中,可以在http://petio.org/2011/06/29/MagicEightBall/Web.config找到其副本,

I have three endpoints: http, https, and net.tcp.我有三个端点:http、https 和 net.tcp。 Right now http and https are working properly, but I have the net.tcp endpoint commented out.现在 http 和 https 工作正常,但我有 net.tcp 端点注释掉了。 When I uncomment this, it breaks http and https, and then when I navigate to http://localhost/MagicEightBall/MagicEightBallService.svc , I see the error:当我取消注释时,它会破坏 http 和 https,然后当我导航到http: //localhost/MagicEightBall/MagicEightBall IMagicEightBall 时,

The protocol 'net.tcp' is not supported.不支持协议“net.tcp”。

What am I doing wrong?我究竟做错了什么? All code is posted on the above links, or you can navigate the solution via ftp://petio.org/2011/06/29/MagicEightBall/ .所有代码都发布在上述链接上,或者您可以通过ftp://petio.org/2011/06/29/MagicEightBall/浏览解决方案。

By the way, I've already activated 'Windows Communication Foundation Non-HTTP Activation', and made sure the 'Net.Tcp Listener Adapter' service is running.顺便说一句,我已经激活了“Windows Communication Foundation Non-HTTP Activation”,并确保“Net.Tcp Listener Adapter”服务正在运行。

Any help is greatly appreciated.任何帮助是极大的赞赏。

Thanks,谢谢,

Jay Sullivan杰伊·沙利文

Most likely an IIS issue - it's a bit tricky and unintuitive to get to work at first.很可能是 IIS 问题 - 开始工作有点棘手和不直观。

Read:读:

and then:接着:

Those steps are needed - if you do them correctly and in the right order, everything should work fine after that.这些步骤是必需的——如果你按照正确的顺序正确地执行它们,那么之后一切都会正常工作。

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

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