我有一个 MVC4 Web 应用程序,可以使用本地 IIS Express 服务器在 Visual Studio 2012 上正常运行。当我将应用程序发布到在 Windows 2012 上运行的 IIS 8 Web 服务器时,初始登录页面会正确显示。但是,使用远程调试时,我发现当我使用以下行检查凭据时:
if (ModelState.IsValid && WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe))
I get the error shown in the figure below:
(source: usf.edu http://www.ismlab.usf.edu/capture.jpg)
解决方案 - 将引用复制到本地
- 右键单击引用 System.Web.Helpers 并选择属性
- 将复制本地更改为 true。
- 构建解决方案
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)