我有一个ASP.NET MVC 4.0应用程序,带有2个控制器,没有区域。为什么在控制器AzMigrationController的index动作视图中两次看到控制器名称?
例如:https://localhost:44348/AzMigration/AzMigration
这是控制器签名
public class AzMigrationController : Controller
{
// GET: /AzMigration/
[HttpGet]
public ActionResult Index()
{
return View();
}
[HttpPost]
public ActionResult Index(string msftAccount)
{
return View("MigrationErrorPage");
}
public ActionResult AuthResult()
{
}
我下面有以下mapRoute
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);