2012-05-21 139 views
1

我一直有乐趣和游戏WCF通过SSL和负载均衡:(获得404 WCF Web服务通过HTTPS

当前立场的一点是,它似乎我们得到的服务器处理,但它不喜欢在THBE配置终点。

任何一个能指教?

客户端配置。

<system.serviceModel> 
     <bindings> 
      <basicHttpBinding> 
       <binding name="BasicHttpBinding_IWorkflowAPI" closeTimeout="00:01:00" 
        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 
        maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 
        useDefaultWebProxy="true"> 
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
         maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
        <security mode="TransportWithMessageCredential"> 
         <transport clientCredentialType="None" proxyCredentialType="None" 
          realm="" /> 
         <message clientCredentialType="UserName" algorithmSuite="Default" /> 
        </security> 
       </binding> 
      </basicHttpBinding> 
     </bindings> 
     <client> 
      <endpoint address="https://ourserver.com/API/workflow.svc" binding="basicHttpBinding" 
       bindingConfiguration="BasicHttpBinding_IWorkflowAPI" contract="Warms.IWorkflowAPI" 
       name="BasicHttpBinding_IWorkflowAPI" /> 
     </client> 
    </system.serviceModel> 

Webservice的网络配置。

<system.serviceModel> 
    <behaviors> 
    <serviceBehaviors> 
     <behavior name=""> 
     <serviceMetadata httpGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
     <behavior name="Originator Secured"> 
     <serviceMetadata httpGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="true" /> 
     <serviceCredentials> 
      <userNameAuthentication userNamePasswordValidationMode="Custom" /> 
     </serviceCredentials> 
     </behavior> 
    </serviceBehaviors> 
    </behaviors> 
    <services> 
    <service name="xx.xx.Web.UI.API.Workflow" behaviorConfiguration="Originator Secured"> 
     <endpoint address="https://ourserver/API/workflow.svc" binding="basicHttpBinding" 
     bindingConfiguration="BasicHttpBinding_IWorkflowAPI" contract="xx.xx.Web.UI.API.IWorkflowAPI" 
     name="BasicHttpBinding_IWorkflowAPI" listenUri="/" /> 
    </service> 
    </services> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    <bindings> 
    <basicHttpBinding> 
      <binding name="BasicHttpBinding_IWorkflowAPI" closeTimeout="00:01:00" 
         openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
         allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 
         maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
         messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 
         useDefaultWebProxy="true"> 
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
      maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
     <security mode="TransportWithMessageCredential"> 
      <transport clientCredentialType="None" proxyCredentialType="None" 
       realm="" /> 
      <message clientCredentialType="UserName" algorithmSuite="Default" /> 
     </security> 
     </binding> 
    </basicHttpBinding> 
    <wsHttpBinding> 
     <binding name="Workflow API Binding"> 
     <security mode="TransportWithMessageCredential"> 
      <transport clientCredentialType="None" /> 
      <message clientCredentialType="UserName" /> 
     </security> 
     </binding> 
    </wsHttpBinding> 
    <customBinding> 
     <binding name="CustomHttpBinding"> 
     <security allowInsecureTransport="True"> 
     </security> 
     <httpTransport /> 
     </binding> 
    </customBinding> 
    </bindings> 
</system.serviceModel> 
+0

是什么HTTP嗅探器,就像小提琴手正显示出?我知道你因为https而无法看到内容,但是你仍然可以看到标题 –

+0

你会得到什么错误? –

+0

我得到的错误是“没有终点的https://ourserver.com/API/workflow.svc听,可以接受的。这通常是由不正确的地址或SOAP行动造成该消息。见的InnerException,如果存在的话, – DazManCat

回答

2

也许你的负载平衡器没有使用SSL其连接到真正的Web服务器。一旦启用传输安全WCF服务不会在端口80上回应,只在443 我觉得你的选择是: 1.有负载均衡器重新谈判本身和Web服务器 2.假期运输安全关之间的SSL在WCF配置中,只使用消息安全性,为负载平衡器留下SSL。

+0

关闭...负载平衡器正在采取HTTPS请求和stunneling它到http然后去服务器。通过做另一个stunnel排序。 – DazManCat