1
У меня есть следующий вид структуры:RedirectToAction возвращает неправильный URL
Home Index Security Accounts LogOn
Следующий код в действии LogOn вызывает редирект http://localhost/Security/Home/Index вместо http://localhost/Home/Index
return RedirectToAction("Index", "Home");
Вот мой маршрут регистрационный код для каждый:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new {controller = "Home", action = "Index", id = UrlParameter.Optional} // Parameter defaults
);
безопасности
public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context) {
context.MapRoute(
"Security_default",
"Security/{controller}/{action}",
new { action = "LogOn" }
);
}
Любая помощь очень ценится.
Работает отлично! Благодарю. – sydneyos