Milan Nankov – Blog

IIS Basic Authentication and Web Applications – Resolving Error 404 2013/12/05

I was trying to set up a very basic form of authentication on Internet Information Services the other day and I stumbled upon a problem that I could not resolve for quite some time. As usual, when you are stuck on something as basic as this, the solution is trivial.


THE TASK – Protect a site with the most basic form of authentication (Basic Authentication on IIS) where the user is presented with a form where he enters a predefined username and a password.

THE PROBLEM – As soon as I turned basic authentication on, I started getting “HTTP Error 404.15 – Not Found”.

THE REVELATION – It turned out that my web application was overriding the authentication method which ultimately resulted in the aforementioned error. Be careful with that especially if you are deploying a test app which was built using one of the Visual Studio templates that usually have authentication built in.

THE SOLUTION – Since I was dealing with a MVC application, I just commented the method ConfigureAuth in Sartup.cs and the problem was resolved.


Realizing what caused me so much trouble was embarrassing at best but I hope that this post can help some other lost soul.