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. 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…


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.


LESS with .NET bundling and minification (+Bootstrap)

There are two things you always have to do when building a website or web application: use a CSS preprocessor and bundle and minify your style/script resources. Using a preprocessor makes writing CSS not so horrible and bundling and minification gives you great performance advantages when you minimize your request amount and size. Bundling and minification is usually done Read more…