WebMatrix redirects unauthorized pages to ~/Account/Login

The secret is in WebMatrix.WebData.dll

public static class FormsAuthenticationSettings
{
    // Fields
    public static readonly string DefaultLoginUrl = "~/Account/Login";
    public static readonly string LoginUrlKey = "loginUrl";
}

and

internal static class ConfigUtil
{
    // Methods
    private static string GetLoginUrl()
    {
        return (ConfigurationManager.AppSettings[FormsAuthenticationSettings.LoginUrlKey] ?? FormsAuthenticationSettings.DefaultLoginUrl);
    }

To override this to – say “/Login” , set the following in web.config