2010-08-02 21 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