공용 웹 서비스를 사용하는 시스템을 작성하고 있습니다. VS2008 및 고전 .NET Framework 2.0 웹 서비스 기술을 사용하여 웹 서비스를 사용하고 있습니다. 내 문제는 웹 서비스를 사용하거나 작업을 호출하지 않습니다.WSE3003 : 인증서의 트러스트 체인을 확인할 수 없습니다.
문제는 내가 서명 한 작업에서 응답을 받았을 때 생성 된 프록시가 서명을 확인하기 시작하는 것입니다. 그 당시 WSE3003 오류가 발생했습니다. 나는 (I 생각) 내 LocalComputer/TrustedPeople 인증서 저장소에 서비스 인증서를로드하고 난 모두가 괜찮다는 것을 알 수 있습니다 내가 볼 때 인증서 경로입니다 : CA
베리사인 클래스 3 공용 차 www.verisign.com/CPS Incorp.by Ref. 책임 LTD (C) 97 ...
servcert.there.com
하지만 다음과 같은 예외가 점점 계속 :.
Microsoft.Web을 .Services3.ResponseProcessingException : WSE910 : 응답 메시지 처리 중에 오류가 발생하여 내부에서 오류가 발견 될 수 있습니다. 예외. 응답 속성에서 응답 메시지를 찾을 수도 있습니다. ---> Microsoft.Web.Services3.Security.SecurityFault는 : 보안 토큰이 인증 또는 공인 할 수없는 ---> System.Security.SecurityException : WSE3003 : 인증서의 신뢰 체인 는 할 수 없었다 검증되어야한다. 인증서가 올바르게 인증 된 경우 이 신뢰할 수있는 사람 인증서 저장소에 설치되어 있는지 확인하십시오. 또는 이 테스트 인 경우 allowTestRoot 구성 섹션을 true로 설정해야 할 수 있습니다.
// Construct the wse proxy MyServiceWse wsClient = new MyServiceWse(); // Assign the credentials UsernameToken userToken = new UsernameToken("user", "pass", PasswordOption.SendPlainText); wsClient.SetClientCredential(userToken); wsClient.RequestSoapContext.IdentityToken = userToken; // Find the client and service certificates X509Certificate2 clientCert = MyCertificateManager.FindCertificate(StoreLocation.LocalMachine, StoreName.TrustedPeople, "mycert.here.com"); X509Certificate2 serviceCert = MyCertificateManager.FindCertificate(StoreLocation.LocalMachine, StoreName.TrustedPeople, "servicecert.there.com"); // Add the policy to the proxy Policy policy = new Policy(); MySecurityClientAssertion assertion = new MySecurityClientAssertion(); assertion.SetServiceCertificate(serviceCert); assertion.SetClientCertificate(clientCert); policy.Assertions.Add(assertion); wsClient.SetPolicy(policy); // Assign the service URL and call an operation wsClient.Url = "https://services.there.com/TheirService.asmx"; TheirOperationResponse r = wsClient.CallTheirOperation();
은 확실 희망 내 코드 때문에 잘못된 :
다음 코드는 아마 컴파일하지 않고 내가 여기에 민감한 재료의 일부를 제거하지만, 한 내가 내 역할을 어떻게 뒤에 생각이다 인증서 저장소 및 트러스트 체인 항목보다 훨씬 잘 이해할 수 있습니다. 어떤 도움이라도 좋을 것입니다. 노력해 주셔서 감사합니다.