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
解决方案 »
- 网页输出纯文本格式的数据
- 一个网站转向问题
- ~急急急~SOS~ ~~~~弱弱的一个js绑定后台cs变量问题
- 在codebehind里怎么样用Repeater取得数据源中的某个字字段的值?
- 为什么我用程序POST上去数据,取回的是500的服务端错误?
- js函数的参数怎么写
- #########新人求知,求学########
- 关于母版页中站点导航节点间分隔符的用法
- asp.net怎么查看有没有人连接在服务器
- 50分求一个combobox控件,非常急用!!!
- 各位,我写了一个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.
...."