IE6 loose cookies when return to .aspx from .asp web page (works in firefox)

Discussion in 'ASP .Net' started by stillworkingfortheman, Oct 19, 2006.

  1. I'm loosing cookies in IE6 (works okay with firefox) with the following
    steps...

    step 1. set a cookie in one domain, in an .aspx.cs codebehind...
    in www.domain.com/subdomain1/page1.aspx
    HttpContext.Current.Response.Cookies.domain = "domain.com";
    HttpContext.Current.Response.Cookies.Add(cookie);

    step 2. Form post (using javascript submit) to an asp page in another
    subdomain..www.domain.com/subdomain2/page2.asp

    step 3. From www.domain.com/subdomain2/page2.asp, post form values back
    to
    www.domain.com/subdomain1/page1.aspx

    step 4. Try to access cookie from step one but cookie is lost/null, so
    following line causes 'object reference not found error'.

    string string1 =
    HttpContext.Current.Request.Cookies["cookiename"].value;

    I already checked to make sure all urls are http, not https. Also,
    have IE6 privacy setting to allow session cookies and security setting
    for testsite is low.

    Does anybody know why this works in firefox, but not IE6?

    Also, works in IE if running project locally...
    form post from localhost/subdomain1/page1.aspx to
    www.domain.com/subdomain1/page2.aspx, then formpost back to
    localhost/subdomain1/page1.aspx.

    Thanks!
     
    stillworkingfortheman, Oct 19, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Ter-Saakov

    If i am changing aspx file will i loose session?

    George Ter-Saakov, Aug 14, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    432
    Krissy
    Aug 15, 2003
  2. SStory
    Replies:
    2
    Views:
    356
    SStory
    Oct 16, 2003
  3. Hope Paka
    Replies:
    3
    Views:
    563
    Hope Paka
    Jun 10, 2005
  4. Ivor O'Connor
    Replies:
    4
    Views:
    879
    Isofarro
    Nov 25, 2003
  5. PeterKellner
    Replies:
    0
    Views:
    606
    PeterKellner
    Jun 1, 2006
Loading...

Share This Page