2011-09-12 17 views
2

SSLとWCFを使用してWebサービスを動作させるのに問題があります。WCFとSSLの問題

私はIISにチェックすると、私はこのエラーを取得するseeting「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.

が、その後、私はこのエラーを取得します私はそれを呼び出すときに 。

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プロトコルに対してのみサポートされています。

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

この

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