You cannot have 2 logon urls in Forms Authentication. If you need to achieve this functionality you could write custom [Authorize] attributes and then override the HandleUnauthorizedRequest method where you could redirect to the corresponding logon url.
For example:
public class MyAuthorizeAttribute : AuthorizeAttribute
{
private readonly string _controller;
private readonly string _action;
public MyAuthorizeAttribute(): this("account", "logon")
{
}
public MyAuthorizeAttribute(string controller, string action)
{
_controller = controller;
_action = action;
}
protected override void HandleUnauthorizedRequest(AuthorizationContext filterContext)
{
var values = new RouteValueDictionary(new
{
controller = _controller,
action = _action,
returnurl = filterContext.HttpContext.Request.Url.PathAndQuery
});
filterContext.Result = new RedirectToRouteResult(values);
}
}
and then:
public class SomeController
{
[MyAuthorize]
public ActionResult Foo()
{
return View();
}
[MyAuthorize("account", "someotherlogonaction")]
public ActionResult Bar()
{
return View();
}
}