【问题标题】:WCF Over SSL Uses Machine Name IIS 7.5WCF Over SSL 使用机器名称 IIS 7.5
【发布时间】:2011-03-24 11:37:33
【问题描述】:

我在 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 ssl iis-7.5


    【解决方案1】:

    要回答我自己的问题。解决此问题的正确方法是调整 WCF 上的 Web 配置以包含 httpsGetEnabled="true"。相关部分应如下所示:

    <?xml version="1.0"?>
    <configuration>
        <system.serviceModel>
            <behaviors>
                <serviceBehaviors>
                    <behavior>
                        <serviceMetadata httpsGetEnabled="true"/>
                    </behavior>
                </serviceBehaviors>
            </behaviors>
        </system.serviceModel>
    </configuration>
    

    进行此调整后,您需要删除并重新添加您的网络参考。我重建了项目,但不确定是否有必要。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-11-30
    • 2011-08-14
    • 2013-02-05
    • 1970-01-01
    • 2012-08-02
    • 1970-01-01
    • 2011-04-30
    • 1970-01-01
    相关资源
    最近更新 更多