Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在internet explorer 10中上载项目时无法登录_C#_Internet Explorer_Cookies_Login_Form Authentication - Fatal编程技术网

C# 在internet explorer 10中上载项目时无法登录

C# 在internet explorer 10中上载项目时无法登录,c#,internet-explorer,cookies,login,form-authentication,C#,Internet Explorer,Cookies,Login,Form Authentication,尝试登录时,internet explorer浏览器出现问题。 代码在localhost上运行良好,这是最令人恼火的事情,因为这样我就无法通过调试找到错误 这是登录方法 public void LoginUser(string User, string UserPassword, Page page, string Url, string failUrl) { string UserName = User; if (Membership.ValidateUser(UserNam

尝试登录时,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 Explore 10中的javascript出现错误,很明显microsoft在浏览器中出现了一个错误,因此如果您的web酒店没有在服务器上安装修复程序,那么现在您必须安装修复程序


所有“Membership.ValidateUser”等的代码在哪里?你确定所讨论的服务器配置了相同的用户帐户等吗?它可以在其他浏览器中工作,这是个大谜团