2016-08-24 12 views
0

안녕하세요, 스택 오버 플로우에서 제공되는 모든 솔루션을 시도했습니다. "제공되는 URI 스키마 'https'가 유효하지 않습니다. 'http'가 필요합니다. 매개 변수 이름 :"오류. 서비스는 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> 

은 내가 액세스 거부 예외를 얻었다. 그런 다음 응용 프로그램 풀 ID를 NetworkService에서 LocalSystem으로 변경했습니다. 그리고 그것은 내가 응답을 되찾은 매력처럼 작동했습니다. 다시 NetworkService를 DefaultAppoolidentity로 변경하려고 시도했습니다. 하지만 클라이언트 구성에서 제거하면 "제공되는 URI 스키마 'https'가 잘못되었으므로 'http'가 필요합니다."라는 오류 메시지가 나타납니다. 다른 의견이 있으면 알려주십시오.