SignedXml fails under .NET 2.0 Beta

From: Gabriel (
Date: 03/05/05

  • Next message: Henrik Skak Pedersen: "StrongNameIdentityPermission and Web Services"
    Date: 5 Mar 2005 13:34:54 -0800


    I'm using the following code to check signed xml files:

    SignedXml signedXml = new SignedXml();
    CspParameters cspParams = new CspParameters();
    cspParams.Flags = CspProviderFlags.UseMachineKeyStore;
    RSACryptoServiceProvider rsaPublicKey = new
    KeyInfo keyInfo = new KeyInfo();
    keyInfo.AddClause(new RSAKeyValue(rsaPublicKey));
    signedXml.KeyInfo = keyInfo;

    XmlNodeList nodeList = licenseData.GetElementsByTagName("Signature");

    return signedXml.CheckSignature();

    This code works great under .NET 1.x and it FAILS under .NET 2.0 Beta.
    Do you know why?
    Thanks in advance.

    PS: xmlPublicKey contains the public key of course.

  • Next message: Henrik Skak Pedersen: "StrongNameIdentityPermission and Web Services"

    Relevant Pages

    • Re: Error Verifying Xml Digital Signature
      ... Found the fix after trawling through this newsgroup. ... CspParameters cspParam = new CspParameters; ... Apparently the default constructor for the RSA or DSA provider tries ... > generated and saved to file (using the SignedXml class). ...
    • Re: Compute XML Signature on external Xml document
      ... The Transform gives the expected XML output. ... XmlDocument domContext = new XmlDocument; ... SignedXml signedXml = new SignedXml; ... KeyInfo keyInfo = new KeyInfo; ...
    • Problem with SignedXml and CheckSignature
      ... I've a problem with the SignedXml Class. ... when I check the signature, ... if I include the keyinfo in then xml-file which I sign. ... RSA rsa; ...
    • RE: Problem with SignedXml and CheckSignature
      ... KeyInfo keyInfo; ... RSA rsa; ... Problem with SignedXml and CheckSignature ... > Reference reference; ...
    • SignedXML
      ... I'm trying to create signed XML document with SignedXml class. ... SigningKey I'd like to use key pair obtained from user certificate ... Reference reference = new Reference; ... KeyInfo keyInfo = new KeyInfo; ...