In this post, I’m going to show how to read details of a digital certificate using Chilkat library from a Base64 string. The below is my model of the details I want to read from the certificate. Here is the method to read in the certificate Like this post?
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…]
If you’re given WSDL files, you can generate your web service reference and C# classes with the following command in cmd dotnet svcutil SomeService.wsdl –namespace “*,SampleProject.SomeService” In case you’re only given XSD files to work with, you can generate C# classes with the following command “C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\xsd.exe” /c SomeService.xsd /n:SampleProject.SomeService Like … [Read more…]
I have a client generated enum class with values already defined. I have to populate a dropdown list with all the enum values with a different order than the order they are declared in. First, I thought its as simple as just rearranging the order they are declared in to the order I need and … [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…]
I need to show the differences between 2 HTML documents. I use this library called htmldiff.net to achieve this. First, install htmldiff.net from nuget package manager.Then, you can do the following example to get the new HTML string with the differences highlighted. This is what my example looks like in an MVC app Like this … [Read more…]
I have a generated WCF client with class similar to the sample below In my unit test, I instantiate an instance of SampleClass with a value of Cost field but without setting the CostFieldSpecified to true. When I serialise it to Json string, the Cost field’s value is 0 instead of the value I set … [Read more…]