1
IIS 6.0에서 .svc WCF를 호스팅했습니다. 해당 웹 서비스에 대한 참조를 winform 응용 프로그램에 추가했습니다. 그러나, 내 서비스의 모든 메서드를 호출 할 때 System.Net.WebException 얻을 : 요청이 HTTP 상태 403 : 실패와 함께 실패했습니다.winform 응용 프로그램에서 SSL 인증서로 보안 된 WCF 사용
나는 내 개인 상점에 인증서를 설치했습니다.
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IAwsService" 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="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="Certificate"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://teclpo02.srr.fr:1098/AwsService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IAwsService" contract="wsAws.IAwsService" name="BasicHttpBinding_IAwsService"/>
</client>
<services>
<service name="AuthWorkStation_Wcf_Web.AwsService" behaviorConfiguration="ServiceBehavior">
<endpoint name="" address="" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="AuthWorkStation_Wcf_Web.IAwsService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceCredentials>
<clientCertificate>
<authentication certificateValidationMode="None" revocationMode="NoCheck" />
</clientCertificate>
<serviceCertificate storeName="Root" findValue="CA_SRR_DISTRIB" x509FindType="FindBySubjectName" />
</serviceCredentials>
<serviceMetadata httpsGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
내가 내을 winform의 app.config 파일을 편집해야합니까 :
여기 내 서버 설정입니까? 인증서가 어디에 있는지 알려면 코드 줄을 써야합니까?
클라이언트 섹션은 내 wcf에서 다른 웹 서비스를 호출하는 데 사용됩니다. 내 브라우저에서 HTTPS : //myserver/Service.svc? wsdl을 입력하여 보안 된 wcf의 wsdl을 읽을 수 있습니다. 그래서이 경우에는 문제가되지 않습니다. –