我在使用 IIS 7.5 上的 WCF 设置 SSL 时遇到问题。我看过这个帖子:
WCF not using computer name instead of domain name when viewing MyService.svc?wsdl
但是,IIS 7 的解决方案似乎对我不起作用。此外,我有一个通配符 ssl,我不确定这是否会有所不同。
我已经尝试将 applicationHost.config 修改为:
<bindings>
<binding protocol="https" bindingInformation="<ip or *>:443:<my.domain.com>" />
</bindings>
和
<bindings>
<binding protocol="https" bindingInformation="<ip or *>:443:<mycname>" />
</bindings>
IIS 重置似乎没有影响。
对任何人帮助不大?
最佳答案
要回答我自己的问题。解决此问题的正确方法是调整 WCF 上的 Web 配置以包含 httpsGetEnabled="true"。相关部分应如下所示:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpsGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
进行此调整后,您需要删除并重新添加您的网络引用。我重建了项目,但不确定是否有必要。
关于WCF Over SSL 使用机器名称 IIS 7.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3392597/