vb.net 如何为 Visual Studio 使用的 IIS Express 添加 net.tcp 协议支持?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15838792/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to add net.tcp protocol support for IIS Express used by Visual Studio?
提问by Alejandro Robleto
I'm using the default configuration of Visual Studio to host my wcf service in a development scenario. I want to add a net.tcp endpoint, but I always get an error.
我正在使用 Visual Studio 的默认配置在开发方案中托管我的 wcf 服务。我想添加一个 net.tcp 端点,但我总是收到错误消息。
回答by nkvu
According to thisFAQ, this functionality is not available in IIS Express:
根据此常见问题解答,此功能在 IIS Express 中不可用:
Here's the extract of the relevant question from the FAQ:
以下是常见问题解答中相关问题的摘录:
Q: Does IIS Express support non-HTTP protocols such as net.tcp or MSMQ?
A: No. IIS Express only supports HTTP and HTTPS as its protocol.
问:IIS Express 是否支持 net.tcp 或 MSMQ 等非 HTTP 协议?
A: 不可以。IIS Express 仅支持 HTTP 和 HTTPS 作为其协议。
For TCP bindings, you might have to create your own service host (e.g. if it's just for testing or similar, perhaps in a console application). Either that or go with the fullIIS install (sorry, I've assumed you're on Win7) and deploy your application there.
对于 TCP 绑定,您可能必须创建自己的服务主机(例如,如果它只是用于测试或类似用途,可能在控制台应用程序中)。要么使用完整的IIS 安装(抱歉,我假设您使用的是 Win7)并在那里部署您的应用程序。

