2011-05-12 30 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>看起来启动,但永远不会结束。