![](/img/trans.png)
[英]MVC / Internet Explorer 10 defaults to Compatibility View?
[英]cant login when the project is uploaded in internet explorer 10
尝试登录时,Internet Explorer浏览器出现问题。代码在localhost上运行良好,这是最令人讨厌的事情,因为那样我无法通过调试找到错误。
这是登录方法
public void LoginUser(string User, string UserPassword, Page page, string Url, string failUrl)
{
string UserName = User;
if (Membership.ValidateUser(UserName, UserPassword))
{
LoginUser(page, Url, UserName);
}
else
{
if (Membership.ValidateUser(Membership.GetUserNameByEmail(UserName), UserPassword))
{
LoginUser(page, Url, Membership.GetUserNameByEmail(UserName));
}
else
{
page.Response.Redirect(failUrl);
}
}
}
private static void LoginUser(Page page, string Url, string UserName)
{
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(UserName, true, 90);
string encTicket = FormsAuthentication.Encrypt(ticket);
page.Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encTicket));
page.Response.Redirect(Url);
}
当页面重定向到登录URL时,它仅返回默认页面,而不返回失败的登录页面。 这意味着它可以通过登录顺利进行,但是仍然没有访问权限。
希望有人可以帮助我,谢谢。
我们在使用某些javascript时遇到了另一个问题,当我们解决了该问题时,我们也解决了登录问题,因为此处还使用了我们一开始就希望使用的javascript,但这并不是相同的错误。 但是这里解决了。 即使其他任何人都应该在Internet exploere 10中出现javascript错误,显然微软在该浏览器中发生了一个错误,因此如果您的网络酒店未在服务器上完成安装,则现在您必须安装一个修复程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.