2012-09-07 8 views
2

WCF 서비스와 SSL을 사용하여 만들었습니다. 서비스를 컴파일하고 시작할 수 있습니다. 그러나, 나는 웹 브라우저에서 그것을 칠 수 없다. 그것이 말하는 것은 "192.168.1.12에 대한 연결이 중단되었습니다." 내 브라우저에 SSL이 설정되어 있는지 확인하고 SSL을 사용하는 다른 사이트에서도 작동합니다. WCF 서비스가 처음이므로 문제 해결을위한 조언이나 조언이 도움이됩니다.SSL을 사용하여 WCF 서비스를 실행할 수 없습니다.

<system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
     <binding name="WSHttpBinding_IApplicationService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> 
      <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="6553600" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      <security mode="Transport"> 
      <transport clientCredentialType="None" proxyCredentialType="None" realm=""/> 
      <message clientCredentialType="Certificate" algorithmSuite="Default" /> 
      </security> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> 
    <services> 
     <service name="Application.ServiceModel.ApplicationService" behaviorConfiguration="ApplicationServiceBehavior"> 
     <host> 
      <baseAddresses> 
      <add baseAddress="https://192.168.1.12:8000/ApplicationServiceModel/service" /> 
      </baseAddresses> 
     </host> 
     <endpoint address="" binding="basicHttpBinding" bindingConfiguration="WSHttpBinding_IApplicationService" contract="Application.ServiceModel.IApplicationService" /> 
     <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="ApplicationServiceBehavior"> 
      <serviceMetadata httpsGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 
+4

web.config의 요소를 게시해야합니다. 사람들이 문제를 진단하는 데 도움이 될 수 있습니다. – paul

+0

중복 가능성 : http://stackoverflow.com/questions/1345849/connection-interrupted-when -using-webhttpbinding-in-transport-securitymode – danielQ

+0

이미 MSDN 문서에서 팁을 시도했지만 도움이되지 않았습니다. – spyter

답변

1

자체 서명 된 인증서는 일반적으로 유효하지 않은 것으로 간주되며, 단지 정말 시험에 사용 : 나는 IIS를 사용하고 있지 않다

는 **

다음은 내 웹 구성 정보입니다.

wcf에서 다음을 사용하여 클라이언트에서 인증서 오류를 무시할 수 있습니다.

ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; 

그러나 테스트를 위해서만 사용해야합니다. 프로덕션 환경에서는 신뢰할 수있는 인증 기관에서 인증서를 서명하려고합니다.

관련 문제