I have a need to override the default namespace and change the root name when serialising object to XML string. I could add XmlType attribute and change the namespace and add XmlRoot attribute for a different root name. However, we have different clients and each requires different namespace and root name. So I need to … [Read more…]
In my last post, I showed how to read an XML digital signature. In this post, I’m going to show how to verify the XML digital signature to check if it’s valid or not. Like this post?
For a project I’m working on, I have to read in an XML digital signature – XmlDSig. In this post, I’m going to show how to read an XmlDsig value using SignedXml object from namespace System.Security.Cryptography.Xml. I add a class to hold my signature data The following is the function to read the XmlDsig value … [Read more…]
I have a xml string without any namespaces that needs to deserialise to an object that has namespace in XmlType attribute. When I try to deserialise it with XmlSerializer, all my properties are not populated. To fix it, I need to add my own XmlTextReader that will replace it with the namespace from class. I … [Read more…]