2012-01-13 11 views
0

既存のWCFサービスの開発環境でHTTPSを設定することに成功していません。サービスはhttpでうまくいっています。私はホストファイルを使用してhttpに対応しているlocalhostにリダイレクトしています。httpsを使用したWCF設定

マイウェブサービスの設定

<services> 
    <service name="EnfieldWebService"> 
    <endpoint address="https://enfieldwebservice.devserver.int/EnfieldWebService.svc" 
    binding="basicHttpBinding" bindingConfiguration="transportSecurity" /> 
    </service> 
</services> 
<bindings> 
    <basicHttpBinding> 
    <binding name="transportSecurity"> 
     <security mode="Transport"> 
     </security> 
    </binding> 
    </basicHttpBinding> 
</bindings> 

クライアント構成

<bindings> 
     <basicHttpBinding> 
      <binding name="BasicHttpBinding_IEnfieldWebService" 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="Transport"> 
        <transport clientCredentialType="None" proxyCredentialType="None" 
         realm="" /> 
        <message clientCredentialType="UserName" algorithmSuite="Default" /> 
       </security> 
      </binding> 
     </basicHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="https://enfieldwebservice.devserver.int/EnfieldWebService.svc" 
      binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IEnfieldWebService" 
      contract="HttpsEnfieldService.IEnfieldWebService" name="BasicHttpBinding_IEnfieldWebService" /> 
    </client> 

とユニットテスト結果:

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://enfieldwebservice.devserver.int/EnfieldWebService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.

答えて

0

基本的に同じ構成を書き換えるためにWCF設定エディタを使用します。削除したものはすべて

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 

となりました。この機能は、http、壊れやすいhttpsとのみ互換性があります。

+0

複数のサービスがリストされている場合はどうなりますか? – DazManCat

関連する問題