简体   繁体   中英

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.

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. 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. 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.

IE10 SCRIPT5009: '__doPostBack' is undefined

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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