Re: Error instantiating RSACryptoServiceProvider
From: Ignus Fast (junk_at_no.com)
Date: 03/22/05
- Previous message: cwbp: "Writing a text file to the file system"
- In reply to: Ignus Fast: "Re: Error instantiating RSACryptoServiceProvider"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 21 Mar 2005 17:38:32 -0600
Ping. Again. Has no-one really run into this? Does anyone from
Microsoft read these groups at all?!?!?!?
Ignus
"Ignus Fast" <junk@no.com> wrote in message
news:OgRsQJALFHA.3336@TK2MSFTNGP09.phx.gbl...
> Please help me, I'm bleeding here! Problem outlined below:
>
> Ignus
>
> "Ignus Fast" <junk@no.com> wrote in message
> news:eW6p2PpJFHA.3960@TK2MSFTNGP09.phx.gbl...
>> I'm trying to instantiate an RSACryptoServiceProvider in a web service,
>> which works fine on my local machine. But when I move the web service
>> out to my production server, it blows up with the following error:
>>
>> System.Security.Cryptography.CryptographicException: CryptoAPI
>> cryptographic service provider (CSP) for this implementation could not be
>> acquired.
>> at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32
>> dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
>> at
>> System.Security.Cryptography.RSACryptoServiceProvider..ctor(CspParameters
>> parameters)
>>
>>
>> Things I've tried:
>>
>> Using a CspProviderFlags objects to use the MachineKeyStore:
>>
>> CspParameters cspParams = new CspParameters();
>> cspParams.Flags = CspProviderFlags.UseMachineKeyStore;
>> rsacsp = new RSACryptoServiceProvider(cspParams);
>>
>> Setting the ASPNET user to have full permissions to the
>> MachineKeys folder.
>>
>> Originally I was just reading in the cert, then passing the
>> X509Certificate.PublicKey to SignedXml.CheckSignature(). This I thought
>> *should* have worked, since the CheckSignature method accepts an RSA, but
>> it always returned false (both locally and on the remote server). So I'm
>> exporting the 509Certificate.PublicKey data into an
>> RSACryptoServiceProvider, which works fine with
>> SignedXml.CheckSignature() locally, but always results in the above error
>> on the remote server.
>>
>> Any suggestions?
>>
>>
>>
>
>
- Previous message: cwbp: "Writing a text file to the file system"
- In reply to: Ignus Fast: "Re: Error instantiating RSACryptoServiceProvider"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|