【发布时间】:2013-04-07 18:41:36
【问题描述】:
我有带有 wsDualHttpBinding 的 WCF 服务。 如何在托管应用程序中托管它?
Uri baseAddress = new Uri("http://localhost:51160");
using (ServiceHost host = new ServiceHost(typeof(FileServer), baseAddress))
{
host.Open();
Console.ReadLine();
host.Close();
}
【问题讨论】:
-
你得到什么错误?如果这是权限问题,请确保以管理员权限运行它。如果您从 Visual Studio 调试您的应用程序,您必须专门以管理员身份运行 IDE。
-
合约需要双工,但绑定 'basicHttpBinding' 不支持
-
这个错误似乎有2630 search results,你看过那些吗?
-
我做到了。问题是如何为主机设置绑定。
-
This 应该这样做。
标签: c# .net wcf binding duplex