Cookies problem on Win2003 Eng + IIS 6.0

Discussion in 'ASP General' started by Claudio, Jan 31, 2006.

  1. Claudio

    Claudio Guest

    I have a demo app where cookies does not work.
    The first page create a cookies. The second read the contet.
    If I browse the pages via IE6.0 the pages does not work.
    If I browse the pages via FireFox the pages work fine.


    ************ SetCookies.asp
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>ARXivar Test - Generazione Cookies</title>
    </head>

    <body>
    <form name="Test" action="./SetCookies.asp" >
    <strong>Pagina di generazione Cookies</strong><br><br>
    <input name="GeneraCookies" type="submit" value="Genera Cookies »">
    </form>
    <%
    If Request("GeneraCookies") <> "" Then
    Response.Cookies("Nome").Path = "/"
    Response.Cookies("Nome") = "Claudio"
    Response.Cookies("Nome").Expires = DateAdd("h", 4, now) 'Date + 1

    Response.Cookies("Cognome").Path = "/"
    Response.Cookies("Cognome") = "Maccari"
    Response.Cookies("Cognome").Expires = DateAdd("h", 4, now) 'Date + 1

    Response.Write("Cookies generati")
    Response.Write("<br><br><a href='./GetCookies.asp'>Clicca qui per leggere
    il contenuto dei cookies</a>")
    End If
    %>
    </body>
    </html>


    ************ GetCookies.asp<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>ARXivar Test - Lettura Cookies</title>
    </head>

    <body>
    <strong>Contenuto dei cookies:</strong><br><br>
    Nome: <%=Request.Cookies("Nome")%>
    <br>
    Cognome: <%=Request.Cookies("Cognome")%>
    </body>
    </html>
     
    Claudio, Jan 31, 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. =?Utf-8?B?TWFyZWsgRw==?=

    Win2003 IIS and webforms

    =?Utf-8?B?TWFyZWsgRw==?=, Jan 20, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    526
    =?Utf-8?B?TWFyZWsgRw==?=
    Jan 26, 2006
  2. dgk
    Replies:
    2
    Views:
    522
  3. Brent White
    Replies:
    8
    Views:
    333
    Cowboy \(Gregory A. Beamer\)
    Nov 9, 2007
  4. Rbrt
    Replies:
    0
    Views:
    699
  5. _Who
    Replies:
    7
    Views:
    2,685
Loading...

Share This Page