Using RSA from ASP.NET
From: Kevin Burton (rkevinburton@charter.net)
Date: 02/12/03
- Next message: Henry Ma: "Re: Access denied ( From one site to another, that is in another server)"
- Previous message: David Adams: "Re: Querystring hash?"
- Next in thread: Kevin Burton: "Using RSA from ASP.NET"
- Reply: Kevin Burton: "Using RSA from ASP.NET"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Kevin Burton" <rkevinburton@charter.net> Date: Wed, 12 Feb 2003 12:38:50 -0800
I am trying to use SignedXml from an ASP.NET web page but
it seems to throw an exception. I can build a simple
Windows Form that calls RSA.Create and I don't have any
problem. But when I put virtually the identical code in an
ASP.NET application I get an exception at RSA.Create.
The details are included below. Any idea how I work around
this problem. I need to be able to sign and/or encrypt
data returned from this ASP.NET application but there is
some permission problem that I don't understand.
Thank you in advance for your help.
Kevin Burton
rkevinburton@charter.net
Server Error in '/AMPOCScan' Application.
-----------------------------------------------------------
---------------------
CryptoAPI cryptographic service provider (CSP) for this
implementation could not be acquired.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.
Exception Details:
System.Security.Cryptography.CryptographicException:
CryptoAPI cryptographic service provider (CSP) for this
implementation could not be acquired.
Source Error:
Line 93: signedXml.AddReference
(reference);
Line 94:
Line 95: RSA rsaKey = RSA.Create();
Line 96: signedXml.SigningKey =
rsaKey;
Line 97: KeyInfo keyInfo = new
KeyInfo();
Source File: c:\projects\baxter\ampocscan\ampocscan.cs
Line: 95
Stack Trace:
[CryptographicException: CryptoAPI cryptographic service
provider (CSP) for this implementation could not be
acquired.]
System.Security.Cryptography.RSACryptoServiceProvider..ctor
(Int32 dwKeySize, CspParameters parameters, Boolean
useDefaultKeySize) +870
System.Security.Cryptography.RSACryptoServiceProvider..ctor
() +54
[TargetInvocationException: Exception has been thrown by
the target of an invocation.]
System.Reflection.RuntimeConstructorInfo.InternalInvoke
(BindingFlags invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture, Boolean isBinderDefault)
+0
System.Reflection.RuntimeConstructorInfo.Invoke
(BindingFlags invokeAttr, Binder binder, Object[]
parameters, CultureInfo culture) +509
System.Security.Cryptography.CryptoConfig.CreateFromName
(String name, Object[] args) +418
System.Security.Cryptography.RSA.Create(String algName)
+7
System.Security.Cryptography.RSA.Create() +13
Baxter.Stargate.AMPOCScan.GeneratePumpInfo() in
c:\projects\baxter\ampocscan\ampocscan.cs:95
Baxter.Stargate.AMPOCScan.Application_AcquireRequestState
(Object source, EventArgs e) in
c:\projects\baxter\ampocscan\ampocscan.cs:138
System.Web.SyncEventExecutionStep.Execute() +60
System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously) +87
-----------------------------------------------------------
---------------------
Version Information: Microsoft .NET Framework
Version:1.0.3705.288; ASP.NET Version:1.0.3705.288
- Next message: Henry Ma: "Re: Access denied ( From one site to another, that is in another server)"
- Previous message: David Adams: "Re: Querystring hash?"
- Next in thread: Kevin Burton: "Using RSA from ASP.NET"
- Reply: Kevin Burton: "Using RSA from ASP.NET"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|