开发者

WCF SSL Endpoints reporting 404, no endpoints listening

We have a WCF web service that, unfortunately, has to use SOAP 1.1 + SSL, thus why I'm using basicHttpBinding and not wsHttpBinding. I believe that my web.config is in order, as I have compared it to countless others on stackoverflow and MSDN articles. I haven't had any luck with the other issue solutions because everybody seems to be using wsHttpBinding for all of the SSL binding examples.

Many of the suggestions on StackOverflow lead to server configuration errors such as SSL Headers, but I have confirmed with the people that manage our IIS that the SSL port bindings and SSL Host Headers are configured correctly (as far as we can tell). We do however use a wildcard certificate, which I've read can complicate this process like in this (removed due to new user limit on links), though my SSL is working and the session is encrypted.

I'm hoping its something simple in the config that I'm missing because I've been staring at it for too many hours/days on end.

When I try to call the service from WcfTestService.exe or a basic .net application, I get the following error.

There was no endpoint listening at https:// subdomain.domain.us:8091/SalesService/SalesService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Server stack trace:

at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException (WebException webException, HttpWebRequest request, HttpAbortReason abortReason) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at IServiceRC.RestrictedProduct(String line1) at ServiceRCClient.RestrictedProduct(String line1)

Inner Exception: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

And here is my web.config

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="SalesService.ServiceRCbehavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpsGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="ServiceRCbind" closeTimeout="00:01:00" openTimeout="00:01:00"
        receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
        bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
       maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
        messageEncoding="Text" textEncoding="utf-8"
        useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="None"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address=""
    binding="basicHttpBinding" bindingConfiguration="ServiceRCbind"
    contract="SalesService.IServiceRC"/>
    </client>
    <services>
      <service behaviorConfiguration="SalesService.ServiceRCbehavior" name="SalesService.ServiceRC">
        <endpoint address="" listenUri="SalesService.svc" binding="basicHttpBin开发者_开发问答ding" contract="SalesService.IServiceRC" bindingConfiguration="ServiceRCbind"/>
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
        <host>
          <baseAddresses>
            <add baseAddress="https://subdomain.domain.us:8091/SalesService/"/>
          </baseAddresses>
        </host>
      </service>
    </services>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true">
      <baseAddressPrefixFilters>
        <!--<add prefix="https://subdomain.domain.us:8091/SalesService/"/>-->
      </baseAddressPrefixFilters>
    </serviceHostingEnvironment>
  </system.serviceModel>

Another thing I've considered is doing custom endpoints like in the previously linked solution, but I don't think my situation specifically requires it and would only complicate things.

Any input/references would be extremely appreciated.

Edit: Here is a link to the text of the wsdl generated by IIS (only edited the domain name for anonymity)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜