简体   繁体   English

在Internet Explorer 10中上载项目时无法登录

[英]cant login when the project is uploaded in internet explorer 10

I have a problem with the internet explorer browser when I try to log in. The code works fine on localhost and that's the most irritating thing because then I can't locate the error by debugging. 尝试登录时,Internet Explorer浏览器出现问题。代码在localhost上运行良好,这是最令人讨厌的事情,因为那样我无法通过调试找到错误。

This is the login method 这是登录方法

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);
}

When the page redirects to the login url it just returns to the default page and not to the failed login page. 当页面重定向到登录URL时,它仅返回默认页面,而不返回失败的登录页面。 That means it comes through the login without problems, but will still not have access. 这意味着它可以通过登录顺利进行,但是仍然没有访问权限。

Hope someone can help me, thanks. 希望有人可以帮助我,谢谢。

We had another problem with some javascript and when we solved that, we also solved our login as here there was also used javascript we expected in the beginning just not that it was the same error. 我们在使用某些javascript时遇到了另一个问题,当我们解决了该问题时,我们也解决了登录问题,因为此处还使用了我们一开始就希望使用的javascript,但这并不是相同的错误。 but here was the fix. 但是这里解决了。 just if any one else shuld have an error with javascript in internet exploere 10 pparently microsoft made a bug in there browser so now you have to install a fix if your web-hotel haven't done it on the server. 即使其他任何人都应该在Internet exploere 10中出现javascript错误,显然微软在该浏览器中发生了一个错误,因此如果您的网络酒店未在服务器上完成安装,则现在您必须安装一个修复程序。

IE10 SCRIPT5009: '__doPostBack' is undefined IE10 SCRIPT5009:'__doPostBack'未定义

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

相关问题 MVC / Internet Explorer 10默认为“兼容性视图”吗? - MVC / Internet Explorer 10 defaults to Compatibility View? 在Internet Explorer 10中无法将字符串识别为有效的DateTime - String was not recognized as a valid DateTime in Internet Explorer 10 asp.net 用Internet Explorer登录控制 - asp.net login control with internet explorer 调用文件URL以通过Internet Explorer下载时,如何包含登录凭据? - How can I include login credentials when invoking a file URL to download via Internet Explorer? 仅在Internet Explorer版本10或更高版本中支持在64位Internet Explorer中测试Web应用程序 - Testing web applications in 64-bit Internet Explorer is only supported on Internet Explorer versions 10 or later Windows 10中Internet Explorer弹出消息被截断 - Internet Explorer pop up message truncated in Windows 10 如何使用 Selenium Webdriver 和 Internet Explorer 10 处理 Windows 身份验证? - How to handle Windows Authentication with Selenium Webdriver and Internet Explorer 10? 调试停止时Internet Explorer没有关闭 - Internet Explorer not closing when debugging stops Internet Explorer获得焦点时如何通知 - How to be notified when Internet Explorer gets focus MVC 3表单身份验证在Internet Explorer中不起作用会保持重定向到登录页面 - MVC 3 Forms Authentication not working in Internet Explorer keeps redirecting to login page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM