WCF和SSL - 找不到端点错误,404

时间:2011-05-12 02:32:35

标签: wcf http-status-code-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>

2 个答案:

答案 0 :(得分:0)

嗨,我知道你提出这个问题已经有一段时间了。

我遇到与WCF和SSL类似的问题,只是认为您可以通过在服务行为中设置属性来解决您的问题 httpsGetEnabled =“true”

设置此属性使我能够进入下一阶段的问题:)

答案 1 :(得分:0)

在您的配置结束时,您有:

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

<url>看起来像是开始但永远不会结束。

相关问题