Showing posts from October, 2022

‘Scaffold-Dbcontext’ Is Not Recognized When Creating a Model for an Existing Database in Entity Framework Core

If you are trying to create a model for an existing database in Entity Framework Core and you are receiving the following error: Scaffold-DbContext : The term 'Scaffold-DbContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the  name, or if a path was included, verify that the path is correct and try again. The try the following steps to solve the issue: In Visual Studio, select menu Tools -> NuGet Package Manger -> Package Manger Console and run the following comma…

Encrypt and Decrypt Text Values in .NET

In this article, we will explore how to encrypt/decrypt text using .NET and MD5 crypto provider. These methods can be used to secure critical values that are used by our ASP.NET web application.  As you may know, .NET provides different ways to encrypt and then decrypt text values. However, in this article we will use the "MD5CryptoServiceProvider" and "TripleDESCryptoServiceProvider" to encrypt our text values. Usually, these encryption and decryption methods are very useful to store user data in an encrypted format.  For …

Quick Overview to Microservices Solution Architecture

The microservices architecture is one of the modern architectural patterns that allows us to build loosely coupled software solution by dividing the solution into various small components or services. Each service  handles a dedicated responsibility inside a large-scale application and it  is completely independent of the other services.  For example, shopping cart, billing, user profile, push notification can all be individual microservices. These functional areas are sometimes called domains. The following diagram shows the microservices arc…

How to Redirect HTTP Traffic to HTTPS in Azure CDN

This post describes how to use the Standard rules engine for Azure Content Delivery Network (Azure CDN) in order  to set up a rule that  forces redirecting HTTP  traffic to HTTPS . I have a static website deployed to a cloud storage account in Azure. For this website, I used a custom domain endpoint enforcing HTTPS traffic only. Which caused a problem for users who tried to browse the website by typing HTTP in the URL. Azure CDN has a rules engine that allows you to redirect traffic, this can be used to replace all HTTP traffic to HTTPS. Navig…

Load More
That is All