Limit access to your Azure Web App from your Azure Front Door only

Azure Front Door team just GA’d March 2020 updates which include easier lockdown for backends. Now instead of using multiple values for X-Forwarded-Host header for filtering traffic to your backends, you can use the Front Door ID field for a new header X-Azure-FDID to lockdown your backends for both production traffic as well as health probes. Read more…

 

Limit access to your ASP.NET Core app by IP address with middleware

Update 12 Sep 2017: You can add IP restrictions to your Web App from Azure Portal now. https://docs.microsoft.com/en-us/azure/app-service/app-service-ip-restrictions I’m working on a mini-project that should be seen only from inside our company network. This is my first ASP.NET Core project and I’m still kind of lost with the configuration part and there aren’t many examples in Read more…

 

How to secure your ASP.NET Azure Web App

One of the ASP.NET Azure Web applications I’ve been working with is going to be security audited tomorrow and I was “only checking” that everything is OK in my app security-wise. I figured that I should write down a cheat sheet for the future to make sure I have all the configurations needed in place Read more…

 

Tips for Microsoft Build attendees

We had quite many ahaa-moments during our trip to Build 2016 in San Francisco and I wish we had figured out certain things beforehand. That gave me an idea to write about tips and lessons learned for people who are attending Microsoft Build or similar events in the future.

 

Output .NET MVC bundle content as a string with Razor

Sometimes you might run into situations when you need to output the contents of your style or script bundle as a raw string inline. For example if you need to pass your markup and stylesheets to somewhere else without having any external resources in it, this would be a handy solution.

 

Running Jasmine unit tests in your Visual Studio Online build

I couldn’t find thorough enough tutorial of running Jasmine tests in Visual Studio Online build as part of my continuous integration workflow. I struggled for hours to get this work and decided to write a step-by-step guide about how to make it work.

 

Apply IP restrictions for Azure Cloud Service

Since Azure SDK 2.4 there’s been a possibility to configure IP restrictions for Azure Cloud Services with Access Control List (ACL). Just add the following to your ServiceConfiguration.Cloud.cscfg.

 

Hide your .NET MVC site from search engines (robots.txt)

Short story short. Add routes.IgnoreRoute(“robots.txt”); to your RouteConfig.cs and add a file called robots.txt to your project root folder.

 

AngularJS SPA and .NET MVC routing

How hard can it be to do .NET MVC routing properly along with your AngularJS single page app? -Not very hard. Here is how you can do it: MVC routing in RouteConfig.cs Most of the guides you find tells you how to handle the routing if you wan’t to have your SPA routes with an app/ or angular/ prefix. For the sake of having as Read more…

 

Validate Anti-Forgery Token using AngularJS, TypeScript, ASP.NET MVC and Web API

I’ve used Olav Nybø’s guide as a base for this article.