In an asp.net mvc3 website, I imported the microsoft.web.helpers, webmatrix.data, and webmatrix.webdata. After that, I have found that when I use the [Authorize] attribute
you can just delete WebMatrix.WebData.dll from you bin file
I ran into that same issue some time ago. I had added a 'deployable dependency' on 'ASP.NET Web Pages with Razor Syntax'. This adds a reference to: WebMatrix.Data.dll This assembly has a class with a static constructor that does the following:
static FormsAuthenticationSettings()
{
FormsAuthenticationSettings.LoginUrlKey = "loginUrl";
FormsAuthenticationSettings.DefaultLoginUrl = "~/Account/Login";
}
That explains! It will override whatever you had in your web.config.
To override use:
<configuration>
<appSettings>
<add key="loginUrl" value="~/Account/Logon" />
</appSettings>
</configuration>
From http://www.redmountainsw.com/wordpress/archives/webmatrix-redirects-unauthorized-pages-to-accountlogin