asp.net 在框架集中时不重定向

发布于 2024-08-28 05:04:27 字数 960 浏览 7 评论 0原文

我在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉风有信 2024-09-04 05:04:27

我发现这是 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\"");

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文