resolution
From: Ellery Familia (ellery_AT_ellery.tv)
Date: 03/20/03
- Next message: Justin: "Any ideas what the solution is, to this problem in an asp.net c# web page??? (CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired.)"
- Previous message: Robert W. Dempsey: "Re: Persist user login info in a Windows form app"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Ellery Familia" <ellery_AT_ellery.tv> Date: Thu, 20 Mar 2003 09:15:29 -0500
I solved this issue... the problem was that I was suppose to set the
PersistsCsp property of the RSACryptoServiceProvider to true.
--
Ellery Familia
www.universalmembers.com.
Dreams are necessary to life -Anais Nin
From: "Ellery Familia" <ellery AT ellery.tv>
Subject: strange RSACryptoServiceProvider issue
Date: Wednesday, March 19, 2003 11:02 AM
Blankthe code attempts to obtain the persisted CspParameters from the
application object, if it is successfully obtained, then the
RSACryptoServiceProvider it's instantiated, else, new parameters are created
and used. The problem is that the first time I try to use the "rsa" object,
a "BAD DATA" exception is thrown by the RSACryptoServiceProvider--as if the
keys did not match. The second time, the code works fine. Is there a bug in
the framework? No logical errors here.
//***************************************************************
cspParam = HttpContext.Current.Application["csp"] as CspParameters;
if(cspParam == null){
cspParam = new CspParameters();
cspParam.Flags = CspProviderFlags.UseMachineKeyStore;
HttpContext.Current.Application.Add("csp",cspParam);
}
rsa = new RSACryptoServiceProvider(2048,cspParam);
//****************************************************************
- Next message: Justin: "Any ideas what the solution is, to this problem in an asp.net c# web page??? (CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired.)"
- Previous message: Robert W. Dempsey: "Re: Persist user login info in a Windows form app"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|