问题描述
如题,我在WEBSERVICE中使用证书的私钥来解密,客户端发过来的信息时,只要一访问私钥对像就出错。怀疑是权限问题,那位高手可以指点一下。如以下的语X509Certificate2prikeycert=XmlXChange.GetCertificateBySubject(StoreName.My,StoreLocation.LocalMachine,ConfigurationManager.AppSettings["PrivateKey"]);xchanger.PrivateKey=prikeycert.PrivateKey;//此句抛出以下异常System.Web.Services.Protocols.SoapException:Serverwasunabletoprocessrequest.--->System.Security.Cryptography.CryptographicException:密钥集不存在。atSystem.Security.Cryptography.Utils.CreateProvHandle(CspParametersparameters,BooleanrandomKeyContainer)atSystem.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmTypekeyType,CspParametersparameters,BooleanrandomKeyContainer,Int32dwKeySize,SafeProvHandle&safeProvHandle,SafeKeyHandle&safeKeyHandle)atSystem.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()atSystem.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32dwKeySize,CspParametersparameters,BooleanuseDefaultKeySize)atSystem.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()atService.Login(Stringrstxml)---Endofinnerexceptionstacktrace---我是使用WIN2000SERVER部署WEBSERVICE的