我正在新机器上安装Windows服务.该服务通过TCP对SslStream执行各种操作,该操作使用问题中的证书.
该服务在其他2台Windows 2003计算机上使用相同的代码和相同的证书运行良好.但是,这台新机器也是带有64位处理器的Windows 2003.
当我尝试使用"服务帐户"身份运行服务时,我遇到了这个问题.它使用我自己的凭据工作正常.(同样,它在使用此服务帐户的其他2台计算机上运行正常)
导入证书时,我没有启用"强保护".
这是堆栈跟踪.
System.ComponentModel.Win32Exception:System.Net.Security.SecureChannel.AcquireCredentialsHandle上的System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule,String package,CredentialUse intent,SecureCredential scc)无法识别提供给包的凭据(CredentialUse credUsage, SecureCredential&secureCredential)System.Net.Security.SecureChannel.AcquireClientCredentials(Byte []&thumbPrint)在System.Net.Security.SecureChannel.GenerateToken(Byte []输入,Int32偏移,Int32计数,字节[]和输出)在系统.Net.Security.SecureChannel.NextMessage(字节[]来电,的Int32偏移的Int32计数)
在System.Net.Security.SslState.StartSendBlob(字节[]来电,的Int32计数,AsyncProtocolRequest asyncRequest)
在System.Net.Security.SslState
System.Net.Securi上的System.Net.Security.SslState.StartReadFrame(Byte []缓冲区,Int32 readBytes,AsyncProtocolRequest asyncRequest)
中的.ProcessReceivedBlob(Byte []缓冲区,Int32计数,AsyncProtocolRequest asyncRequest)在System.Net.Security.SslState.StartSendBlob(Byte []传入,Int32计数,System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message,AsyncProtocolRequest asyncRequest)中的ty.SslState.StartReceiveBlob(Byte []缓冲区,AsyncProtocolRequest asyncRequest),
位于System.Net.Security.SslStream.AuthenticateAsClient的System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)的System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst,Byte [] buffer,AsyncProtocolRequest asyncRequest)
中的AsyncProtocolRequest asyncRequest( String targetHost,X509CertificateCollection clientCertificates,SslProtocols enabledSslProtocols,Boolean checkCertificateRevocation)