Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc MVC路由之谜_Asp.net Mvc_Asp.net Mvc Routing - Fatal编程技术网

Asp.net mvc MVC路由之谜

Asp.net mvc MVC路由之谜,asp.net-mvc,asp.net-mvc-routing,Asp.net Mvc,Asp.net Mvc Routing,我有一个使用MVC4和Internet应用程序模板创建的简单应用程序。我排除了以下内容并部署到IIS7服务器 /App_Start/AuthConfig.cs /Controllers/AccountController.cs all views under /Views/Account/ AuthConfig.RegisterAuth() in Global.asax.cs 当应用程序以//HostingIIS/MyApp/启动时,它总是路由到AccountController的登录名(字符

我有一个使用MVC4和Internet应用程序模板创建的简单应用程序。我排除了以下内容并部署到IIS7服务器

/App_Start/AuthConfig.cs
/Controllers/AccountController.cs
all views under /Views/Account/
AuthConfig.RegisterAuth() in Global.asax.cs
当应用程序以
//HostingIIS/MyApp/
启动时,它总是路由到
AccountController的登录名(字符串returnUrl)
,URL为
//HostingIIS/MyApp/Account/login?returnUrl=…
,错误为404

如果我修改URL并删除
/Account/Login?
并按enter键,应用程序将正确路由到
主页/索引。在我的计算机上的Visual Studio Development Server上不会出现此问题


有人知道问题的原因吗?托管IIS上有什么吗?

我猜这是
web.config
中表单身份验证中的
重定向URL
中的设置

大概你已经在本地进行了身份验证

如果您删除所有本地cookie,您是否在本地看到相同的行为

当你把ASP.NETMVC称为“MVC”时,小猫就死了。