2011-09-12 5 views
2

SSL 및 WCF를 사용하여 웹 서비스를 작동시키는 데 문제가 있습니다. 내가 그것을 취소하는 경우WCF 및 SSL의 문제점

WebHost failed to process a request.

Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/36097441 Exception: System.ServiceModel.ServiceActivationException: The service '/' cannot be activated due to an exception during compilation. The exception message is: Service 'ISS.MS.WebServices.MessageDispatch.MessageDispatchWebService' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.. ---> System.InvalidOperationException: Service 'ISS.MS.WebServices.MessageDispatch.MessageDispatchWebService' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.

그러나, 페이지 브라우저에서 미세로드하지만 그때 나는이 오류가 발생합니다 : 내가 IIS에 체크하면

은 내가이 오류가 다음 seeting "SSL 필요" 내가 전화를 걸 때.

Service 'ISS.MS.WebServices.MessageDispatch.MessageDispatchWebService' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.

는 구성입니다 :

<system.serviceModel> 
    <services> 
     <service name="ISS.MS.WebServices.MessageDispatchWcfService"> 
      <endpoint 
       address="" 
       binding="basicHttpBinding" bindingConfiguration="basicHttpBinding_MS2" 
       contract="ISS.MS.WebServices.IMessageDispatchWcfService" /> 
      <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
      <behavior> 
       <serviceDebug includeExceptionDetailInFaults="False" /> 
       <serviceMetadata httpsGetEnabled="true"/> 
      </behavior> 
     </serviceBehaviors> 
    </behaviors> 

    <bindings> 
     <basicHttpBinding> 
      <binding name="basicHttpBinding_MS2" > 
       <readerQuotas maxStringContentLength="1048576" /> 
       <security mode="Transport"> 
       </security> 
      </binding> 
     </basicHttpBinding> 
    </bindings> 

    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"> 
    </serviceHostingEnvironment> 
</system.serviceModel> 

나는 그것이 정상적인 HTTP를 사용하여 완벽하게 작동 얻을 수 있지만, HTTPS에서 작동하지 않습니다.

IIS 설정 또는 WCF 구성 문제를 추측하고 있습니까?

답변

3

나는 그것을 알아 냈다. 서비스와 계약의 이름이 정확하지 않았다 ... 얼마나 당혹 스럽습니까.

누구나 왜 HTTP를 통해 여전히 작동하는지 알 수 있습니다.

+1

당신을 감사하십시오. 이것은 방금 약 8 시간의 디버깅을 끝냈습니다. –

0

("multipleSiteBindingsEnabled"정보) : 서비스에 대해 사이트 당 여러 IIS 바인딩을 사용하려면이 속성을 true로 설정하십시오. 여러 사이트 바인딩은 HTTP 프로토콜에 대해서만 지원됩니다.

심판 : http://msdn.microsoft.com/en-us/library/system.servicemodel.configuration.servicehostingenvironmentsection.multiplesitebindingsenabled.aspx

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false"> 
</serviceHostingEnvironment>