开发者

asp.net does not Redirect when in frameset

开发者 https://www.devze.com 2022-12-25 05:18 出处:网络
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开发

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开发者_如何学Go 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"); 
}


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\"");

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号