4
我有一个在Windows身份验证模式下运行的asp.net Web应用程序。我的要求是用户第一次请求的任何页面(网址)(会话开始),它将被重定向到LandingPage.aspx。任何人都可以建议如何使用Windows身份验证将所有初始请求重定向到特定页面(LandingPage.aspx)?使用Windows身份验证如何将所有初始请求重定向到特定页面
在此先感谢。
我有一个在Windows身份验证模式下运行的asp.net Web应用程序。我的要求是用户第一次请求的任何页面(网址)(会话开始),它将被重定向到LandingPage.aspx。任何人都可以建议如何使用Windows身份验证将所有初始请求重定向到特定页面(LandingPage.aspx)?使用Windows身份验证如何将所有初始请求重定向到特定页面
在此先感谢。
我认为你可以使用Session_Start
方法的Global.asax
文件并重定向到你的登陆页面。
void Session_Start(object sender, EventArgs e)
{
Response.Redirect("LandingPage.aspx");
}
我无法使用此功能,因为在某些页面上我禁用了会话。所以,当用户直接击中会话禁用页面此代码将无法正常工作。 – user1660592 2013-03-11 07:29:34
看看这个[Windows身份验证重定向(http://www.velocityreviews.com/forums/t765416-redirect-to-default-page-using-windows-authentication.html) – 2013-03-11 07:22:21
灿”你使用Server.Transfer还是Response.Redirect? – Alex 2013-03-11 07:22:30
我想这Web.Config中,但无法按预期工作<认证模式= “窗口”> <形式 名= “测试” loginUrl = “Landingpage.aspx” defaultUrl = “Default.aspx的” 保护= “全部” 超时= “30” 路径= “/” requireSSL = “假” slidingExpiration = “真” 无Cookie = “UseDeviceProfile” 域= “companySite” enableCrossAppRedirects = “真”> <凭证了passwordFormat =“SHA1”/> authentication> –
user1660592
2013-03-11 07:44:56