Blog

Blog posts on .NET, Azure, and more.

Implementing Content Security Policy (CSP) in ASP.NET Core

November 01, 2021 by Anuraj

AspNetCore Security

This post is about implementing content security policy in ASP.NET Core. Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross-Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware - Content Security Policy (CSP) MDN

Deploying PHP Applications to Azure App Service with Azure DevOps

October 20, 2021 by Anuraj

PHP DevOps AzureDevOps Azure

This post is about deploying PHP applications to Azure App Service with Azure DevOps. Recently I had to deploy PHP application to Azure App Service. You can deploy it to Azure App Service using FTP, since there is no compilation steps required. If you’re using Composer - Dependency Manager for PHP, you need to run the composer install before deploying the files to app service via FTP. Instead of using deploying FTP deploy the app, I choose to implement a deployment pipeline, so that I don’t want to share the FTP credentials to the developer. And if I enable continuous integration - when ever developer commit some changes, can be deployed automatically to the app service.

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.

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