【问题标题】:WCF failing when service is impleneted over HTTP AND HTTPS通过 HTTP 和 HTTPS 实现服务时 WCF 失败
【发布时间】:2012-10-24 00:12:56
【问题描述】:
<system.serviceModel>
<services>
<service name="foo">
<endpoint address="" behaviorConfiguration="testbehaviour" binding="webHttpBinding" contract="testcontact" bindingConfiguration="webBinding" />
<endpoint address="" behaviorConfiguration="testbehaviour" binding="webHttpBinding" contract="testcontact" bindingConfiguration="webBindingHttps" />
</service>
</services>
<system.serviceModel>

如上面的 web.config 摘录所示,在我们的 windows server 2008 机器上,我们有一个可以通过 HTTP 和 HTTPS 访问的端点。

我刚刚安装了 server 2012(使用 iis8),现在我收到了消息 “找不到与绑定 WebHttpBinding 的端点的方案 https 匹配的基地址。注册的基地址方案是 [http]。”

非常奇怪的是 - 如果我将一个 endpoint 元素注释掉(只留下一个活动端点),那么剩下的端点会正常工作吗?

【问题讨论】:

    标签: wcf


    【解决方案1】:

    我在 IIS 中错误地设置了站点 - 我为 HTTP 版本和 HTTPS 版本创建了一个单独的网站,但实际上它们应该是同一个网站,但具有 HTTPS 和 HTTP 绑定

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-20
      • 1970-01-01
      • 2014-05-22
      • 2014-08-06
      • 1970-01-01
      • 1970-01-01
      • 2019-11-21
      • 2010-11-19
      相关资源
      最近更新 更多