asp.net 在框架集中时不重定向
我在asp.net上开发了一个应用程序。我把它上传到我的主机上。 可以说 http://myhost/app。我的经理将此地址包装到 http://anotherhost/somename 上的空框架集中,并将框架的 src 设置为 http://myhost/ap。所以没有人可以登录。当按下按钮时,它会发回(浏览器加载内容,进度条填满并结束),但什么也没有发生。不重定向。
(我已将 IE 设置为alwaysAllowCookies,它现在可以工作,但其他人仍然不能)
我认为我对框架集和 ASP.NET 一无所知
ps:我从不使用框架,但无法说服我的经理这样做。他喜欢在头版进行开发:)
发生了什么?
提前谢谢
protected void btnLogin_Click(object sender, ImageClickEventArgs e)
{
Member member = Logic.DoLogin(txtUsername.Text.Trim(), txtPassword.Text.Trim());
if (null == member) {
lblError.Text = "Invalid Login !"; return;
}
CurrentMember = member; ///CurrentMember is an inherited property that accesses Session["member"] = member
Response.Redirect("Default.aspx");
}
I have developed an application on asp.net. I uploaded it to my host.
lets say http://myhost/app. My manager wrapped this address into an empty frameset on http://anotherhost/somename and sets the src of frame to http://myhost/ap. And so nobody can login. When the button is hit, it posts back (browser loads stuff, progress bar fills up and ends) but nothing happens. Does not redirect.
(I have set IE to alwaysAllowCookies and it now does work, but other people still cannot)
I think there is something that I have no clue about framesets and ASP.NET
ps: I never use frames but could not convince my manager in doing so. He likes to develop in front page :)
Whatz happening?
Thx in advance
protected void btnLogin_Click(object sender, ImageClickEventArgs e)
{
Member member = Logic.DoLogin(txtUsername.Text.Trim(), txtPassword.Text.Trim());
if (null == member) {
lblError.Text = "Invalid Login !"; return;
}
CurrentMember = member; ///CurrentMember is an inherited property that accesses Session["member"] = member
Response.Redirect("Default.aspx");
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现这是 IE 支持的新标准。它称为 P3P,可以阻止来自其他域的 cookie。
我已将此代码添加到我的页面类构造函数中
HttpContext.Current.Response.AddHeader("p3p", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
I've discovered that it's a new standart that IE gets to support. Its called P3P and that blocks cookies from other domains.
I've added this code to my page class constructor
HttpContext.Current.Response.AddHeader("p3p", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");