2016-08-24 18 views
0

こんにちは私はスタックオーバーフローで提供されるすべてのソリューションを試してみました。私は "提供されているURIスキーム 'https'が無効で、 'http'が必要です。パラメータ名:via error。サービスはIIS7でうまくいっています。このサービスを使用しようとするとこのエラーが発生します。私のwcfサービスの設定とクライアントの設定を見てください。指定されたURIスキーム「https」は無効です。期待される 'http'。パラメータ名 - すぐに必要なヘルプ

<?xml version="1.0"?> 
    <configuration> 
    <system.web> 
    <compilation targetFramework="4.0"/> 
    <httpRuntime/> 
    </system.web> 
    <system.serviceModel> 
    <serviceHostingEnvironment > 
    <serviceActivations> 
    <add factory="System.ServiceModel.Activation.ServiceHostFactory"   relativeAddress="./CARetriever.svc" service="CARetrieverInterface.CARetriever"/> 
     </serviceActivations> 
    </serviceHostingEnvironment> 

    <behaviors> 
     <serviceBehaviors> 
     <behavior name="MyTesting"> 
      <!-- Other options would go here --> 
      <useRequestHeadersForMetadataAddress> 
      <defaultPorts> 
       <add scheme="https" port="443" /> 
      </defaultPorts> 
      </useRequestHeadersForMetadataAddress> 
      <serviceMetadata httpsGetEnabled="True"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 

    <services> 
     <service name="CARetrieverInterface.CARetriever" behaviorConfiguration="MyTesting"> 
     <endpoint address="https://sspumptest.dhr.state.ga.us/testcode/CARetriever.svc" binding="basicHttpBinding" contract="CARetrieverInterface.ICARetriever" bindingConfiguration="secureHttpBinding"> 
      <identity> 
      <dns value="sspumptest.dhr.state.ga.us" /> 
      </identity> 
     </endpoint> 
     <!--<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />--> 
     </service> 
    </services> 
    <bindings> 
     <basicHttpBinding> 
     <binding name="secureHttpBinding"> 
      <security mode="Transport"> 
      <transport clientCredentialType="None" proxyCredentialType="None" realm=""/> 
      </security> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    </system.serviceModel> 
</configuration> 

My client configuration is given below. 

<?xml version="1.0"?> 

<!-- 
    For more information on how to configure your ASP.NET application, please visit 
    http://go.microsoft.com/fwlink/?LinkId=169433 
    --> 
<configuration> 
    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 

    <system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
     <binding name="BasicHttpBinding_ICARetriever">    
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="https://sspumptest.dhr.state.ga.us/testcode/CARetriever.svc" 
      binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICARetriever" 
      contract="CARetrieverRef.ICARetriever" name="BasicHttpBinding_ICARetriever" /> 
    </client> 
    </system.serviceModel> 
</configuration> 

答えて

0

cleint構成バインディングセクションをサービス構成と同じに変更しました。クライアントの設定を以下のように変更しました。

 <bindings> 
      <basicHttpBinding> 
       <binding name="BasicHttpBinding_ICARetriever"> 
       <security mode="Transport">  
       </security>       
       </binding> 
      </basicHttpBinding> 
     </bindings> 

私はこのアクセスを拒否しました。その後、私は、NetworkServiceからLocalSystemにアプリケーションプールIDを変更しました。そして、それは私が応答を返す魅力のように働いた。私は再びアプリケーションプールのDefaultAppoolidentityにNetworkServiceを変更してみました。しかし、私がクライアントの設定から削除すると、 "提供されたURIスキーム 'https'が無効であると予期した 'http' 'のようなエラーが表示されます。

関連する問題