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…]
We discover a bug in our code where it seems like the gateway api is calling the core microservice infinitely. The problem We have a background task which creates some entities in the database. This results in eventual consistency. However, the front end does not know when the background task finishes. So when the front … [Read more…]
I often find myself adding some sort factory in almost every project I’ve ever worked on. Let’s say we have a pizza price checker factory that returns a validator to check if the price is valid based on a particular type of pizza. It would look something like below However, if you have other similar … [Read more…]
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…]