SignedXml CheckSignature CryptographicException
- From: "Gene Vangampelaere" <gene.vangampelaere@xxxxxxxxxx>
- Date: Fri, 18 Aug 2006 16:34:54 +0200
Hello,
I'm having a problem with the RSACryptoServiceProvider and the
SignedXml.CheckSignature() method. When I use the function locally (ASP.NET
webservice) it works fine. When I put it on a server then I get this error :
System.Security.Cryptography.CryptographicException: CryptoAPI cryptographic
service provider (CSP) for this implementation could not be acquired.
Public Function CheckXmlSignature(ByVal xmlstring As String, Optional ByVal
isFile As Boolean = True) As Boolean
Dim bresult As Boolean
Try
Dim xmlDoc As New XmlDocument
If isFile Then
xmlDoc.Load(xmlstring)
Else
xmlDoc.LoadXml(xmlstring)
End If
Dim sXml As New SignedXml(xmlDoc)
Try
Dim dsig As XmlNode = xmlDoc.GetElementsByTagName("Signature")(0)
Dim a As String = dsig.InnerText()
sXml.LoadXml(CType(dsig, XmlElement))
Catch ex As Exception
Throw ex
End Try
'Verify the signature.
bresult = sXml.CheckSignature()
Return bresult
Catch ex As Exception
Throw ex
End Try
End Function
Does anyone have any idea what is wrong ? I searched google and the
following urls did NOT solve the thing :
http://groups.google.com/group/microsoft.public.dotnet.security/browse_thread/thread/b8fbdfa3a1137ffa/89a6487c4aa32832?lnk=st&q=%22CryptoAPI+cryptographic+service+provider+(CSP)+for+this+implementation+could+not+be+acquired%22+CheckSignature&rnum=1#89a6487c4aa32832
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q322371
.
- Prev by Date: Re: How to SELECT records based upon ASP.NET Roles
- Next by Date: Preferred method of hashing salted password
- Previous by thread: Re: Verify syntax of an URl
- Next by thread: Preferred method of hashing salted password
- Index(es):
Relevant Pages
|