인증서를 사용하여 작동해야하는 wcf 서비스를 만들었습니다. 내 자체 인증서를 사용하고있는 곳에서의 테스트는 완벽하지만 CA에서 인증서를 생성하는 서버에서 인증서를 실행하려고 할 때마다 변경됩니다. CA를 사용하여 클라이언트 및 서버 인증서를 생성 한 후 서버 인증서를 "신뢰할 수있는 사용자"폴더로 내 보냈습니다. (두 인증서를 LocalMachine 디렉토리에 배치했습니다.) 또한 인증서에 필요한 모든 권한을 부여했습니다.WCF 서비스 인증서가 신뢰할 수있는 사용자 저장소에 없습니다.
여기 내 서버 설정X.509 인증서는 CN = XXXX 신뢰할 수있는 사람들 저장소에없는 : 나는 예외를 받고 있어요 클라이언트 프로그램을 실행하고있을 때
문제
가 나타납니다. 여기
<services>
<service behaviorConfiguration="MyServiceBehavior" name="PoswsService">
<endpoint address="http://xxxx/PoswsService.svc" binding="wsHttpBinding" bindingConfiguration="MyServiceBinding"
contract="IPoswsService" />
<endpoint address="http://xxxx/mex" binding="mexHttpBinding" name="MetadataBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceCredentials>
<clientCertificate>
<authentication certificateValidationMode="PeerOrChainTrust" revocationMode="Online"/>
</clientCertificate>
<serviceCertificate findValue="xxxxxxxxxxxxxxxxxxxxx" storeLocation="LocalMachine"
storeName="My" x509FindType="FindBySerialNumber" />
</serviceCredentials>
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="MyServiceBinding">
<security>
<message clientCredentialType="Certificate"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
입니다 클라이언트 설정은
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IPoswsService"
bypassProxyOnLocal="false" transactionFlow="false" >
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Certificate" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://xxxx/PoswsService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IPoswsService"
contract="TestService.IPoswsService" name="WSHttpBinding_IPoswsService" behaviorConfiguration="CustomBehavior">
<identity>
<certificate encodedValue="long word" />
</identity>
</endpoint>
</client>
<behaviors>
<endpointBehaviors>
<behavior name="CustomBehavior">
<clientCredentials>
<clientCertificate findValue="xxxxxxxxxxxxxxxxxxx" x509FindType="FindBySerialNumber" storeLocation="CurrentUser" storeName="My"/>
<serviceCertificate>
<authentication certificateValidationMode="PeerTrust"/>
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
누군가가 내 실수가 될 수있는 곳을 알고 계십니까?