Try 'Create a new RSACryptoServiceProvider object.
Dim RSA As New RSACryptoServiceProvider() 'Export the key information to an RSAParameters object.
'Pass false to export the public key information or pass
'true to export public and private key information.
Dim RSAParams As RSAParameters = RSA.ExportParameters(False)
Catch e As CryptographicException
'Catch this exception in case the encryption did
'not succeed.
Console.WriteLine(e.Message)
End Try
Dim RSA As New RSACryptoServiceProvider() 'Export the key information to an RSAParameters object.
'Pass false to export the public key information or pass
'true to export public and private key information.
Dim RSAParams As RSAParameters = RSA.ExportParameters(False)
Catch e As CryptographicException
'Catch this exception in case the encryption did
'not succeed.
Console.WriteLine(e.Message)
End Try
解决方案 »
- 未能找到存储过程 'SP_Pagination'。
- 继刚才的小算法再问个问题
- vs2005编写的代码怎么到2008中打开
- xp 同时存在sql2000和sql2005时用VS2008连接的问题
- 关于WEB资源管理后台的实现
- |zyciis| ASP.NET操作Word第二贴,如何在ASP.NET使用System.IO.File读取二进制流,然后进行格式化 Word文件
- 关于在类里面.怎么能写这样的代码?
- pet shop4调试出错?是什么原因呢?
- 请问各位高手
- 一个小问题,如何弹出删除确认框。
- 各位,我写了一个treeview 的树,数据库都设计好了,可在树中没有显示数据,怎么回事?
- 最新水晶报表产品家族 Crystal Reports、Enterprise、Analysis 下载列表
using System.Security.Cryptography;
using System.Text;
http://support.microsoft.com/default.aspx?kbid=322371"....
CAUSE
Underlying base, enhanced, or strong cryptographic service provider (CSP) implementations create a key container for storing an RSA public/private asymmetric key pair. Key containers are stored in user profiles. For performance reasons, the user profile is not loaded by the system under a scenario where the .NET code runs in a Web service, ASP page, or COM+. If the user profile is not loaded, a key container cannot be opened or created. Because a key container is required for RSACryptoServiceProvider or DSACryptoServiceProvider, the .NET code (when run from a Web Service, ASP Page, or COM+) fails by throwing the exception described in the "Symptoms" section of this article. If the same .NET code is run from the context of the interactive logged-on user, where the user profile is loaded by Winlogon, a key container can be created and opened, and the code works under this scenario.
...."