Archives for Best Practises
Understanding Task vs ValueTask
These days most of the Interfaces we are seeing with methods have a return type as ValueTask. So, through this article, we are going to understand What is ValueTask? How…
Understanding Thread Starvation in .NET Core Applications
Most of the applications will be facing a performance issue while scaling and this might be due to thread starvation. Before getting into the thread starvation problem, we need to…
Working with Async/Await/Task keywords in depth
Modern systems are coming more powerful with multiple processors. Similarly, the modern server application development also improved to leverage the host CPU power for processing multiple requests in parallel to…
Working with Smarter Enums in C#
Enum means enumeration , mentioning things one by one, and enum type is a special data type that enables a variable to be a set of predefined constants. Below is…
Consume OData feed with C# Client Application
Introduction OData represents Open Data Protocol is an OASIS standard initiated by Microsoft in the year 2007. This defines the best practices for the consumption of data and building with…
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond – SMTP Client
Error Message A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond…
EF Code-First Approach Vs Database First Approach
Following are some of the advantages and disadvantages on each Approaches of Entity Framework Code-First Approach Advantages No need to look at database for any changes in the tables as we can…
How to secure your entire MVC application with “Authorize” attribute ?
Scenario: If you would like to secure your admin pages, you would add “Authorize” attribute for all your admin controllers. However, you might get a situation like; you need to…
Issue: The length of the string exceeds the value set on the maxJsonLength property
Problem Statement Many people had faced with their MVC Applications with the following issue. Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the…
Do we need to use Newtonsoft.Json.JsonConvert.DeserializeObject() or Newtonsoft.Json.Linq.JToken.Parse()?
So many people got this question like to deserialize any JSON string should we need to use ()or ()method?? Let begin the explanation uses LINQ-TO-JSON API internally to loop through…