简体   繁体   English

ASP.NET MVC:找不到视图“登录”或其主控

[英]ASP.NET MVC: The view 'Login' or its master could not be found

I am attempting to deploy my ASP.NET MVC application to a new environment and I'm running into this error:我正在尝试将我的 ASP.NET MVC 应用程序部署到新环境,我遇到了这个错误:

The view 'Login' or its master could not be found. The following locations were searched:
~/Views/Account/Login.aspx
~/Views/Account/Login.ascx
~/Views/Shared/Login.aspx
~/Views/Shared/Login.ascx 

I have verified that ~/Views/Account/Login.aspx exists.我已经验证 ~/Views/Account/Login.aspx 存在。

The server is Windows 2k3 running IIS 6. We are not using wildcard mapping, but rather file extensions.服务器是 Windows 2k3 运行 IIS 6. 我们没有使用通配符映射,而是使用文件扩展名。 This very same version of the site runs fine in 2 other environments, both that have similar setup (2k3 and IIS 6).这个相同版本的站点在其他两个环境中运行良好,两者都具有相似的设置(2k3 和 IIS 6)。

Could this be a permissions issue or something?这可能是权限问题还是什么?

I'm a fool.我是一个傻瓜。 My master page wasn't copied out to the new server.我的母版页没有复制到新服务器。 Once there, everything worked.到了那里,一切正常。

Beware that MS change LogIn for LogOn (notice the O) in RC1.请注意 MS 在 RC1 中将 LogIn 更改为 LogOn(注意 O)。

Check consistency.检查一致性。

If the file ~/Views/Account/Login.aspx exists, check that the controller there exists an action named Login in the controller Account.如果文件 ~/Views/Account/Login.aspx 存在,请检查 controller controller Account 中是否存在名为 Login 的操作。

Also you could rebuild and re-deploy your application.您也可以重建和重新部署您的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM