Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Output Cache, cookie save and page expiry

Output Cache, cookie save and page expiry

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-net
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    misha_grewal
    wrote on last edited by
    #1

    Hi, I am absolutely new to Web programming, so pardon me if I write something stupid in between.. And Thanks for reading the question, any pointers are most welcome The website is in ASP.NET 2.0 / IE 6.0, 7.0 We store login details in a cookie via HTTPCookie class, when user says "Remember Me" in the login page. Now, if he doesn't log out and starts the same website via favourites (The login page loads again), the cookie doesn't get detected and he has to enter his credentials again. If he closes the page and loads the browser again, the cookie does get detected. We have added following values in the login.aspx page, which should take care of reloading the page < OutputCache Duration="1" VaryByParam="none" Location="None" NoStore="true" > It seems, either cookie doesn't get stored until the page is detected or the page is not getting reloaded. Any ideas about it? If the question is not clear, please let me know.. Thanks in advance Misha

    Evil triumphs when good people sit quiet...

    B 1 Reply Last reply
    0
    • M misha_grewal

      Hi, I am absolutely new to Web programming, so pardon me if I write something stupid in between.. And Thanks for reading the question, any pointers are most welcome The website is in ASP.NET 2.0 / IE 6.0, 7.0 We store login details in a cookie via HTTPCookie class, when user says "Remember Me" in the login page. Now, if he doesn't log out and starts the same website via favourites (The login page loads again), the cookie doesn't get detected and he has to enter his credentials again. If he closes the page and loads the browser again, the cookie does get detected. We have added following values in the login.aspx page, which should take care of reloading the page < OutputCache Duration="1" VaryByParam="none" Location="None" NoStore="true" > It seems, either cookie doesn't get stored until the page is detected or the page is not getting reloaded. Any ideas about it? If the question is not clear, please let me know.. Thanks in advance Misha

      Evil triumphs when good people sit quiet...

      B Offline
      B Offline
      Brij
      wrote on last edited by
      #2

      Are your login details are saved in cookies.If yes,then when next time user ligins,read the cookie for credential and authenticate the user and send him to next page.If cookie is not found then again ask the user to give the credentials.

      Cheers!! Brij

      M 1 Reply Last reply
      0
      • B Brij

        Are your login details are saved in cookies.If yes,then when next time user ligins,read the cookie for credential and authenticate the user and send him to next page.If cookie is not found then again ask the user to give the credentials.

        Cheers!! Brij

        M Offline
        M Offline
        misha_grewal
        wrote on last edited by
        #3

        Thanks so much, It seems the query is not clear. I store the credentials in the cookie. The logic is simple, if cookie found, redirect to next page, else ask for credentials. The problem is that the cookie detection is not working when I do not close the browser and again open the login page in a new browser - via clicking favourites. However, if I close the browser and open the link again, the cookie gets detected. The outputcache tag resolves the problem in some sense, that it forces the page to refresh explicitly, so that the cookie is detected once it is stored. I hope it's understandable now. :confused: Thanks

        Evil triumphs when good people sit quiet...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups