cookies problem

Discussion in 'ASP General' started by xarrisx, Mar 9, 2005.

  1. xarrisx

    xarrisx Guest

    Here is my problem!

    I have page1.asp in webserver1 with this code

    ----------Page1 in webserver1
    <script src=webserver2/page2.asp >
    </script>

    <script>
    document.write("<iframe src=webserver2/page3.asp></iframe>")
    </script>
    --------------


    My other two pages in webserver2 look like this

    ----------Page2.asp in webserver2-------
    response.Cookies("USR")="user1"
    response.Cookies("USR").expires=cdate("1/1/2009")
    //some javascript here
    ---------------------------------------------------


    ----------Page3.asp in webserver2-------
    response.write(request.Cookies("USR"))
    ---------------------------------------------------


    ===========================================================

    I open internet explorer and request webserver1\page1.asp

    1)the first problem is that page1.asp finishes loading but there is no
    cookie in my temporary internet files( i thought that there should be since
    webserver1\page1.asp calls the webserver2\page2.asp ).

    2) the second problem is that even if there were a cookie in my temporary
    internet files set from webserver2\page2.asp then the webserver2\page3.asp
    wouldn't get it when it is called through webserver1\page1.asp(<iframe> tag)

    If i directly request webserver2\page2.asp from IE then the cookie is set
    If the cookie is set and request webserver2\page3.asp directly from IE then
    the cookie is found!


    Anybody knows why this happens or any info about that!!

    Thanks in advance
    xarrisx, Mar 9, 2005
    #1
    1. Advertising

  2. Cookies are not crossdomaine if you don't changes the setting of MSIE.
    See Internet-Options, Security, Level, and than Iframe and Sharing between
    ... or something like that (my MSIE is in non-english)
    Gérard Leclercq, Mar 9, 2005
    #2
    1. Advertising

  3. xarrisx

    Evertjan. Guest

    xarrisx wrote on 09 mrt 2005 in microsoft.public.inetserver.asp.general:

    > Here is my problem!
    >
    > I have page1.asp in webserver1 with this code
    >
    > ----------Page1 in webserver1
    > <script src=webserver2/page2.asp >
    > </script>
    >
    > <script>
    > document.write("<iframe src=webserver2/page3.asp></iframe>")
    > </script>
    > --------------
    >
    >
    > My other two pages in webserver2 look like this
    >
    > ----------Page2.asp in webserver2-------
    > response.Cookies("USR")="user1"
    > response.Cookies("USR").expires=cdate("1/1/2009")
    > //some javascript here
    > ---------------------------------------------------
    >
    >
    > ----------Page3.asp in webserver2-------
    > response.write(request.Cookies("USR"))
    > ---------------------------------------------------
    >


    This could work:

    ----------Page2.asp in webserver2-------
    <%
    response.Cookies("USR")="user1"
    response.Cookies("USR").expires=cdate("2009/2/28")
    %>
    alert('found some javascript here');
    ----------------------------------------

    ----------Page3.asp in webserver2-------
    <%
    response.write request.Cookies("USR")
    %>
    ----------------------------------------


    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Mar 9, 2005
    #3
    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. Alex Nitulescu

    Response.Cookies vs Request.Cookies

    Alex Nitulescu, Feb 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    8,456
    Hans Kesting
    Feb 3, 2005
  2. Andy Fish
    Replies:
    3
    Views:
    6,505
    Fredrik Lindner
    Nov 6, 2003
  3. user
    Replies:
    3
    Views:
    648
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Mar 31, 2007
  4. archana
    Replies:
    1
    Views:
    499
  5. _Who
    Replies:
    7
    Views:
    2,634
Loading...

Share This Page