ASP Session lost in IFRAME?

Discussion in 'ASP General' started by zzzbla@gmail.com, Jul 16, 2006.

  1. Guest

    Hello,

    I have a project in which I'm trying to embed one site, that uses
    session stored variables, inside an IFRAME in another site (which for
    that matter doesn't even use sessions).

    Problem is, that it doesn't always save the session. When I try to
    access it from some computers, I have no problem, the session variable
    is stored and I can browse the site in the IFRAME and everything's ok,
    but on other computers, the session variable value simply disappears.

    To simulate the situation, assume that the two following html trees are
    the site that goes into the IFRAME:

    (called test.asp):

    <html><head><title>test session</title></head>
    <body>
    <%
    response.write "session var should be 123. var=" & session("var") &
    "<br/>"
    %>
    <a href="test2.asp" >blah</a>
    </body></html>

    (called test2.asp):

    <html><head><title>test session</title></head>
    <body>
    test2<br/>
    <%
    response.write "session var should be empty. var=" & session("var") &
    "<br/>"
    session("var")=123
    response.write "session var should be 123. var=" & session("var") &
    "<br/>"
    %>
    </body></html>

    The following html tree simulates the other site with the first site
    embedded in it (and they're not in the same domain...):

    <html>
    <head><body></body></head>
    <body>
    blah blah<br>
    <iframe id="InnerIframe" src="test.asp" width=600 height=400></iframe>
    <br>blah blah<br>
    </body>
    </html>

    Again - this works when I work on one machine (WinXPSP2, IE6 or
    FF1.5xx) but doesn't work on many other machines (one I tested it on -
    Win2003 server, IE6).

    Does anyone have any idea??

    Thanks in advance,
    R. Green
     
    , Jul 16, 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. Carpe Diem
    Replies:
    3
    Views:
    7,220
    Carpe Diem
    Feb 23, 2004
  2. Alvin Bruney [MVP]

    Re: lost session values, not Session

    Alvin Bruney [MVP], Mar 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    433
    Alvin Bruney [MVP]
    Mar 2, 2004
  3. sean

    session lost in iframe

    sean, Jan 24, 2005, in forum: ASP General
    Replies:
    0
    Views:
    238
  4. Replies:
    0
    Views:
    518
  5. Daedalous
    Replies:
    3
    Views:
    754
    Daedalous
    Jan 16, 2004
Loading...

Share This Page