2017-08-24 7 views
0

Webサービスがhttpで正常に動作していますが、httpsでは正常に動作していません。 私はweb.configに間違いがあると思うし、web.configもhttpsに変更しましたが、それは私の仕事ではありませんでした。WCF Webサービスがhttpsと連携していません

<system.serviceModel > 
<!--<serviceHostingEnvironment multipleSiteBindingsEnable ="true"></serviceHostingEnvironment>--> 
<services> 
    <service name="DriverSuvidhaAppService.Driversuvidhaservice" behaviorConfiguration="serviceBehave"> 
    <endpoint address="" behaviorConfiguration="webHttp" binding="webHttpBinding" contract="DriverSuvidhaAppService.IDriversuvidhaservice"/> 
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
    <host> 
     <baseAddresses> 
     </baseAddresses> 
    </host> 
    </service> 
</services> 
<bindings> 
    <netTcpBinding> 
    <binding name="TcpBindingConfiguration"> 
     <security mode="Transport"> 
     <transport clientCredentialType="None"/> 
     </security> 
    </binding> 
    </netTcpBinding> 
</bindings> 
<behaviors> 
    <serviceBehaviors> 
    <behavior name="serviceBehave"> 
     <!-- To avoid disclosing metadata information, set the values below to false before deployment --> 
     <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> 
     <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
     <serviceDebug includeExceptionDetailInFaults="false"/> 
    </behavior> 
    </serviceBehaviors> 
    <endpointBehaviors> 
    <behavior name="webHttp"> 
     <webHttp helpEnabled="true" automaticFormatSelectionEnabled="false" defaultBodyStyle="Bare" defaultOutgoingResponseFormat="Json"/> 
    </behavior> 
    </endpointBehaviors> 
</behaviors> 
<protocolMapping> 
    <add binding="basicHttpsBinding" scheme="https"/> 
</protocolMapping> 
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
<!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>--> 

答えて

1

だけ答えが眉をひそめている、SSL

How to: Configure an IIS-hosted WCF service with SSL

+0

リンクを使用してWCFを設定するには、マイクロソフトから、このステップバイステップガイドに従ってください - 以来、関連するコンテンツを追加することを検討リンクされたページが消えたり、コンテンツが変更されたりする可能性があります(MSの文書でもそうです)。 – Tim

+0

ほぼ完了しましたが、アンドロイドからのサービスを呼び出すときにエラーが発生しました:HTTP/1.1 415コンテンツタイプ 'application/json; charset = UTF-8 'は予想されるタイプ' text/xmlではありませんでした。 charset = utf-8 'となります。 –

関連する問題