下面这段代码thows以下错误: System.Security.Cryptography.CryptographicException“句柄无效”DSACryptoServiceProvider构造函数会引发CryptographicException
CspParameters CSPParam = new System.Security.Cryptography.CspParameters(13, null, null);
CSPParam.Flags = CspProviderFlags.UseMachineKeyStore;
CSPParam.KeyContainerName = "MyKeys";
System.Security.Cryptography.DSACryptoServiceProvider r = new System.Security.Cryptography.DSACryptoServiceProvider(CSPParam); //Error occurs here
该代码已经工作没有问题,然后它开始抛出这个错误。我想不出任何我已经改变的与此有关的事情。 nayone有没有看到这个错误?什么尝试的想法?
我看了那篇文章,并做了它说的,但它没有帮助。 – HitLikeAHammer 2010-06-16 22:37:26