2011-05-12 29 views
2

請,請,請,請幫助! :-)WCF和SSL - 沒有發現端點錯誤,404

我想用SSL測試WCF,似乎缺少一些東西。我做了大量的搜索,似乎無法找到我在配置中丟失的東西。我有一個基於Windows 7的IIS自帶簽名證書託管的基本WCF服務。我也有一個測試客戶端Web應用程序調用該WCF服務。

我正在測試客戶端以下錯誤:

There was no endpoint listening at https://<url>/WcfAuthTest/Service1.svc that could accept the message. 

我可以導航到瀏覽器的服務,並獲得標準自動生成的頁面SOAP服務。

下面是WCF服務的配置:

<system.serviceModel> 
<bindings> 
    <wsHttpBinding> 
    <binding name="wsSecureBinding"> 
     <security mode="Transport"> 
     <transport clientCredentialType="None" /> 
     </security> 
    </binding> 
    </wsHttpBinding> 
</bindings> 

<behaviors> 
    <serviceBehaviors> 
    <behavior name="wsSecureBehavior"> 
     <serviceMetadata httpGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="true" /> 
    </behavior> 
    <behavior name=""> 
     <serviceMetadata httpGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="false" /> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 

<services> 
    <service behaviorConfiguration="wsSecureBehavior" name="Service1"> 
    <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsSecureBinding" name="wsService1" contract="WcfAuthTest.IService1" /> 
    <endpoint address="mex" binding="mexHttpsBinding" bindingConfiguration="" name="MexHttpsBindingEndpoint" contract="IMetadataExchange" /> 
    </service> 
</services> 

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 

客戶端配置爲:

<system.serviceModel> 
<bindings> 
    <wsHttpBinding> 
    <binding name="wsTestBinding" closeTimeout="00:01:00" openTimeout="00:01:00" 
     receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 
     transactionFlow="false" hostNameComparisonMode="StrongWildcard" 
     maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" 
     textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> 
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
     maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
     <reliableSession ordered="true" inactivityTimeout="00:10:00" 
     enabled="false" /> 
     <security mode="Transport"> 
     <transport clientCredentialType="None" proxyCredentialType="None" 
      realm="" /> 
     </security> 
    </binding> 
    </wsHttpBinding> 
</bindings> 
<client> 
    <endpoint address="https://<url>/WcfAuthTest/Service1.svc" 
    binding="wsHttpBinding" bindingConfiguration="wsTestBinding" 
    contract="ServiceReference1.IService1" name="wsTestBinding" /> 
</client> 

回答

0

您好我知道它已經有一段時間,因爲你問這個問題。

我有通過設置服務行爲的性質與WCF和SSL,只是想你可能會對解決您的問題類似的問題httpsGetEnabled =「真」

設置該屬性使我能夠下得去問題:)

0

在你的配置結束階段,你必須:

<endpoint address="https://<url>/WcfAuthTest/Service1.svc" 
binding="wsHttpBinding" bindingConfiguration="wsTestBinding" 
contract="ServiceReference1.IService1" name="wsTestBinding" /> 

<url>看起來啓動,但永遠不會結束。