WCF安全和配置帮助 - 找不到https的基地址

时间:2010-07-14 18:54:10

标签: c# wcf configuration wcf-binding wcf-security

我在Windows托管服务的事件日志中收到此错误。

  

无法启动服务。
  System.InvalidOperationException:   找不到那个基地址   匹配端点的方案https   绑定BasicHttpBinding。   注册的基地址方案是   [HTTP]。

此服务一直有效,直到最近我们想要添加一些安全功能。这是我的basicHttpBinding节点和我的服务节点。

<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>

知道这里发生了什么吗?我的服务将不再启动,它告诉我我的基地址设置不正确。我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

有时在IIS中启用“要求SSL”时,我会遇到此问题。我想您可能需要使用命令行配置您的ssl主机头。

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

相关问题