多个NIC上的WCF HTTPS多个域

时间:2016-05-25 01:59:24

标签: c# .net wcf https

我在使用以下构造函数打开的同一台计算机上有两个WCF服务:

serviceHost = new ServiceHost(proxy, ub.Uri);
...
serviceHost.Open();

对于每个相应的服务,uri看起来像: https ://proxy.company.com和 https :// api.company.com。

我的机器有两个网卡,因此有两个可用的IP地址。我使用以下内容设置了网址:

netsh http add urlacl url="https://proxy.company.com" user="user1"
netsh http add urlacl url="https://api.company.com"  user="user2"

但是,WCF仍然试图在机器上获取整个443 IP空间(例如https:// + :443),这当然会导致错误,因为两个ServiceHost都可以&#39 ; t可能保留整个IP空间。

有没有办法指示WCF 尝试注册https:// + :443而是专门请求适用的网址空间(例如{{3而不是https://proxy.company.com等等?)

0 个答案:

没有答案