WCF Over SSL 使用机器名称 IIS 7.5

标签 wcf ssl iis-7.5

我在使用 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/

相关文章:

powershell - IIS 7.5 应用程序池/IIS 管理器 GUI 列 : Applications

.net - 如何在 MSDN 文档中报告错误?

.net - 远程还是不远程?

asp.net - 将 Windows 身份验证重定向到自定义 401 页面

amazon-web-services - ELB 到后端服务器使用带有自签名证书的 HTTPS

ssl - Microsoft Edge 强制使用 HTTP/2

file - 使用 HTTP POST 将文件发送到 IIS 7.5 虚拟目录

.net - 单元测试WCF方法

WCF svc 托管 IIS 7 自签名证书的使用

php - 使用 mkdir 和 fopen 通过 https 连接上传文件/在 webroot 外部创建文件夹