Logging in .NET – Elastic Search, Kibana and Serilog
I’ve been using log4net in the past and I found it quite useful as it is ready to use out of the box. In my last workplace, we are using SPLUNK and its amazing as I’m…
Dotnet general
I’ve been using log4net in the past and I found it quite useful as it is ready to use out of the box. In my last workplace, we are using SPLUNK and its amazing as I’m…
This post is the continuation from the previous post. The previous post was in regard to casting the object dynamically. This post will explain how to deserialize dynamically from Json object I have a json that…
In Automapper, we normally have 1 to 1 mapping defined but I have a case whereas the incoming stream as a json payload which then I cast it as a dynamic (using JObject parse) and in…
I got this nasty 401 unauthorized error from my code all of sudden, I don’t really know why and what’s causing it. I used Fiddler as a proxy to see the request header and all of…
There are few applications/tools out there that can be used to test the security of your application. Check below Contrast http://www.contrastsecurity.com/ Burp https://portswigger.net/burp/ Zap – Free https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project
Its been a while I haven’t blogged for sometime. To create an action filter in Web Api 2 and return the response directly you can use the code below public class StepUpAttribute : ActionFilterAttribute { public…
You can use this function to replace the invisible chars Regex.Replace(s, @"[^x20-x7F]", "");
To convert your DTO to become Camel Case, you can use the code below //Camel Case settings var settings = GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings; settings.ContractResolver = new CamelCasePropertyNamesContractResolver(); settings.Formatting = Formatting.Indented;