2010-08-02 20 views
0

我在IIS 7.5上使用我的WCF设置SSL时遇到问题。我已经看到了这个帖子:WCF over SSL使用机器名称IIS 7.5

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复位似乎都没有影响。

对别人没有帮助吗?

回答

1

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

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

做出此调整后,您需要删除并重新添加您的Web引用。我重建了这个项目,但我不确定这是否有必要。

+0

其实,我需要添加更多的东西。看到这篇文章。 http://stackoverflow.com/questions/1521117/wcf-over-ssl-404-error/1527277#1527277 – 2010-08-04 18:25:57