开发者

WCF Security and config help - base address for https not found

开发者 https://www.devze.com 2023-01-06 23:49 出处:网络
I\'m getting this error in my event log for a Windows hosted service. Service cannot be started. System.InvalidOperationException:

I'm getting this error in my event log for a Windows hosted service.

Service cannot be started.

System.InvalidOperationException: Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http].

This service has always worked until recently we wanted to add some security features. Here is my basicHttpBinding node and my service node.

<basicHttpBinding>
    <binding name="BasicHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" transferMode="Buffered" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="52428800" maxBufferSize="65536000" maxReceivedMessageSize="65536000">
      <readerQuotas maxDepth="32" maxStringContentLength="1819200" maxArrayLength="1638400" maxBytesPerRead="1409600" maxNameTableCharCount="1638400" />
        <security mode="TransportWithMessageCredential" >
            <message clientCredentialType="UserName"/>
        </security>
    </binding>
  </basicHttpBinding>
  <service behaviorConfiguration="CKISServiceBehavior" name="tcore.CKWcfService.CKISService">
     <endpoint address="CKISService" 
               binding="basicHttpBinding" 
               bindingConfiguration="BasicHttpBinding" 
               bindingNamespace="http://ws.jcore.com" 
               contract="jcore.Common.ICKISService" />
     <endpoint address="mex" 
               binding="mexHttpsBinding" 
               contract="IMetadataExchange" />
     <host>
        <baseAddresses>
           <add baseAddress="https://localhost:9303" />
        </baseAddresses>
     </host>
 </service>
 开发者_如何学运维<behavior name="CKISServiceBehavior">
     <serviceThrottling maxConcurrentCalls="300" maxConcurrentSessions="300" maxConcurrentInstances="400" />
     <serviceMetadata httpsGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="false" />
 </behavior>

Any idea what's going on here? My service will no longer start and it's telling me my base addresses aren't set up correctly. How can I remedy this?


I get this problem sometimes when Require SSL is enabled in IIS. I think you may need to configure your ssl host headers using command line.

http://www.hosting.com/support/iis7/configure-ssl-host-headers-in-iis7

0

精彩评论

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