【发布时间】:2016-06-20 06:52:09
【问题描述】:
我创建了一个引导网站,其中包含一个简单的管理页面,用于显示主页的一些结果。 在 FireFox 和 Chrome 上一切正常,但是当我尝试通过 Internet Explorer 登录时,每次输入凭据并单击登录按钮时,我都会不断被重定向到登录页面。
Web.config:
<!-- Authentication -->
<authentication mode="Forms">
<forms loginUrl="~/beheer/login.aspx" name=".ASPXFORMSAUTH" defaultUrl="~/beheer/default.aspx" path="beheer">
<credentials passwordFormat="Clear">
<!-- Login en wachtwoord -->
<user name="beheerder" password="beheerder"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="*" />
<deny users="?" />
</authorization>
</system.web>
<!-- Toegangscontrole beheer overzicht -->
<location path="beheer">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
全球.asax:
static void RegisterRoutes(RouteCollection routes) {
routes.MapPageRoute("beheer", "beheer", "~/beheer/default.aspx");
} /* RegisterRoutes */
登录.aspx.cs:
protected void LoginButton_Click(object sender, EventArgs e) {
String LoginGebruikersnaam = NameTextBox.Text;
String LoginPaswoord = PasswordTextBox.Text;
if (FormsAuthentication.Authenticate(LoginGebruikersnaam, LoginPaswoord)) {
FormsAuthentication.RedirectFromLoginPage(LoginGebruikersnaam, this.RememberMeCheckBox.Checked);
} else {
this.FoutmeldingPlaceHolder.Visible = true;
}
} /* LoginButton_Click */
有人知道这个问题的答案吗?
【问题讨论】:
-
可能重复:stackoverflow.com/questions/22053394/…。你的IE版本登录测试是否与现有问题匹配?
-
我在每个 IE 版本(Edge,10,9,8,7,5)上都有它。
-
也许 IE 会以兼容模式呈现您的网站?
-
@TasosK。不,它没有
-
你检查过这个post吗?似乎有一些不错的答案
标签: c# asp.net internet-explorer authentication