MVC3 Account/Login

I want to start off with something simple, to make posting easier. Something along the lines of learning something new every day, or Something I Learned Today.

Today I was working on a MVC3 project and for some reason on of resources that required authentication was looking for /Account/Login.

I couldn’t find anything, even searching the entire project for Login. Worst case I just created the Login action in the Account controller and did a redirect to the LogOn action.

But a little more Googling I found: Two bugs in ASP.NET MVC 3 and a workaround for both

The solution is to add the following app setting to the web.config:


<add key="loginUrl" value="~/Account/LogOn"/>

I created a new project at home to test to see if this is a normal thing and the good news is that it’s not. So it must just be my one resource in my project at work. But know I know how to fix the issue for the future.

Leave a Reply