Blog

Blog posts on .NET, Azure, and more.

Deploying Angular with ASP.​NET MVC 5 on IIS

September 30, 2021 by Anuraj

AspNet AspNetMvc Angular IIS

This blog post is about Deploying Angular with ASP.NET MVC 5 on IIS. Recently I saw one discussion in K-MUG and I had to consult for an issue on deploying Angular with ASP.NET MVC on IIS. So I thought of writing a blog post around it. In this blog post I am using Angular 12 and ASP.NET MVC 5. First I am creating an ASP.NET MVC project and then creating an Angular project using ng new command. I created an ASP.NET MVC project using Visual Studio and in the root folder I created an Angular project using ng new Frontend --minimal command. Once it is done, I am adding Bootstrap to the Angular project using npm install Bootstrap command in the Frontend folder. Next I am modifying the project.json file to use Bootstrap style and script. Also I modified the output path property to Scripts/Dist - here is the code inside Angular.json file.

The workflow must be associated with an integration account - Azure Logic App

September 14, 2021 by Anuraj

Azure LogicApps Serverless NoCode

This blog post is about fixing an error while using Execute Javascript code step in Azure Logic Apps. While working a Azure Logic app, I faced this issue - I am using a script which converts the RSS feed categories / tags and convert it to hashtags. But when I tried to save the Logic App, I got an error like this.

OData (Open Data Protocol) in ASP.NET 6.0

September 13, 2021 by Anuraj

OData AspNetCore

OData (Open Data Protocol) is an ISO/IEC approved, OASIS standard that defines a set of best practices for building and consuming RESTful APIs. This post is about implementing OData (Open Data Protocol) in ASP.NET 6.0. OData RESTful APIs are easy to consume. The OData metadata, a machine-readable description of the data model of the APIs, enables the creation of powerful generic client proxies and tools. Unfortunetly OData is not available as part of Minimal APIs. So first let’s create a Web API application using the dotnet new webapi command. Once you created the API project add reference of Microsoft.AspNetCore.OData package.

Working with DevOps friendly EF Core Migration Bundles

September 11, 2021 by Anuraj

EFCore DevOps

This post is about EF Core migration bundles, which is a devops friendly way to deploy your database migrations. Currently you can deploy your EF Core migrations either using Code Approach where is you can call the migrations with C# code and another approach is using generating scripts and deploying the scripts using SQL CLI tools - I did some one blog post on how to deploy your EF Core database changes in Azure DevOps - it is using the EF Core script approach. The scripting remains a viable option for migrations. For those who choose the code approach, and to mitigate some of the risks associated with the command line and application startup approaches, the EF Core team introduced the migration bundles in EF Core 6.0 Preview 7.

How to implement two-factor authentication in ASP.NET Core without Identity

September 04, 2021 by Anuraj

AspNetCore Security

This post is about implement two-factor authentication in ASP.NET Core without ASP.NET Core Identity. Two factor authentication adds an extra layer of security is to your account to prevent someone from logging in, even if they have your password. This extra security measure requires you to verify your identity using a randomized 6-digit code. If you’re ASP.NET Core identity, 2FA support is available out of the box. In this post, you will learn how to implement two factor authentication in ASP.NET Core without identity, for example - if your project is using Cookie authentication or a token based approach.

Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub