In this short post, I will show how to use TLS 1.2 in ASP.NET Core 2.0 and the above version. Why TLS 1.2 ? Client-Server applications use the TLS protocol to communicate across a network in a way designed to prevent eavesdropping and tampering. Since applications can communicate either with or without TLS (or SSL), […]
Browsing Tag: AspNetCore
Working with optional body parameters in ASP.NET Core 2.2
Working with optional body parameters in ASP.NET Core 2.2 is now possible and I will show how to solve the issue in this post. Optional parameter exists in .Net for a long time. Specifying the default value used to be enough to mark them as optional. However, marking a body parameter in a Web API […]
How to cast int to enum in C#
Introduction In this short post, I show How to cast int to enum in C#. We have used an enumeration type (or enum type) in our day to day programming. Enum is a value type defined by a set of named constants of the underlying integral numeric type. To define an enumeration type, we used […]
How to: Create API documentation using OpenAPI & Swagger
Introduction In this post, I show how to create API documentation using OpenAPI & Swagger. This post will help to cover a part of knowledge required to complete Azure AZ-203 certification. To start with Azure AZ-203 certification, take a look at my post EXAM AZ-203: DEVELOPING SOLUTIONS FOR MICROSOFT AZURE What is API documentation ? […]
Policy and Resource based authorization in ASP NET Core
Introduction In this post, we will see how to implement Policy and Resource based authorization in ASPNETCore. There are instance where we need to validate the incoming data model. We will see how to validate the data model and authorize. In our example, say we have two entities namely, Category and Product. Examples in this […]