WCF 서비스 (NetTcpBinding)를 개발 중이며 보안없이 정상적으로 작동합니다. 우리는 DigiCert에서 인증서를 구입하여 서버에 설치하고 DigicertUtil.exe로 구성했습니다. 또한 테스트 클라이언트 시스템에 설치됩니다.유효성 검사 절차에 따라 원격 인증서가 유효하지 않습니다.
보안을 켜면 문제없이 내 dev PC에서 연결할 수 있습니다.
서버 설정 :
binding.Security.Mode = SecurityMode.Transport;
binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.Certificate;
binding.Security.Transport.ProtectionLevel = ProtectionLevel.EncryptAndSign;
ServerHost.Credentials.ServiceCertificate.SetCertificate(
StoreLocation.LocalMachine,
StoreName.My,
X509FindType.FindBySubjectName,
Properties.Settings.Default.CertificateName);
클라이언트 설정 : (. 내가 고객의 개인 정보를 유지하는 도메인 및 서비스 이름을 변경)
<binding name="EndPointTCP" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false"
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="1610612736"
maxReceivedMessageSize="1610612736">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="false" inactivityTimeout="00:10:00" enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Certificate" protectionLevel="EncryptAndSign"/>
</security>
</binding>
<behaviors>
<endpointBehaviors>
<behavior name="behavior_ServerService">
<clientCredentials>
<clientCertificate findValue="*.domain.com"
storeLocation="LocalMachine"
storeName="My"
x509FindType="FindBySubjectName" />
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<client>
<endpoint address="net.tcp://clients.domain.com:10001/Server/ServerService"
binding="netTcpBinding" bindingConfiguration="EndPointTCP" contract="ServerServiceReference.IServerWS"
name="EndPointTCP" behaviorConfiguration="behavior_ServerService">
<identity>
<dns value="*.domain.com" />
</identity>
</endpoint>
</client>
다른 컴퓨터에서 그것을 시도 고객에게 다음과 같은 오류 메시지가 나타납니다.
,210The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9840000'.
An existing connection was forcibly closed by the remote host
서버의 추적 로그는 말한다 :
나는 단절와 클라이언트 모두에 동일한 인증서를 사용하기 때문에 매우 이상하다The remote certificate is invalid according to the validation procedure.
... (그리고는 dev에 PC를 언급하는 것이 일하고있는 음 ...)는
오류 메시지는 내가 서버에
ServerHost.Credentials.ClientCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
및
ServiceClient.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
01,235,164을 설정 한 경우에도 동일
클라이언트에 있습니다.
아무에게도 올바르게 수행하는 방법을 알려 줄 수 있습니까? 물론 유효성 확인 콜백 (callback)과 같은 대안을 항상 true로 설정하거나 위의 유효성을 검증하지 않은 모드로 사용하고 싶지 않습니다.
도움을 주시면 감사하겠습니다. 만이 '작은'문제는 ... 해제 할 수 있도록 해결해야 :(
덕분에 많은 사전에!
Hudgi
http : // stackoverflow.COM/질문/777607/더 - 원격 인증서는-입니다 - - 무효 따라 -에 - 더 - 검증 - 절차-PLE 이 가 어떻게이 경우 복사 붙여 넣기 한 라인과 터져 죽자 : – ariel