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. Signout not working

Signout not working

Scheduled Pinned Locked Moved ASP.NET
4 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.
  • S Offline
    S Offline
    scotchy2hotty2k2
    wrote on last edited by
    #1

    I have created a link button as signout. On click of liink button i have done following coding FormsAuthentication.SignOut(); Response.Redirect("Login1.aspx"); This works only if i try to access any page by typing in url. but if i click on back button it permits me to visit the page.. Might be my cookies are interfering with this as i have used persistant cookie on the login page.. Please suggest a soln to this scotchy

    R 1 Reply Last reply
    0
    • S scotchy2hotty2k2

      I have created a link button as signout. On click of liink button i have done following coding FormsAuthentication.SignOut(); Response.Redirect("Login1.aspx"); This works only if i try to access any page by typing in url. but if i click on back button it permits me to visit the page.. Might be my cookies are interfering with this as i have used persistant cookie on the login page.. Please suggest a soln to this scotchy

      R Offline
      R Offline
      Rajeesh MP
      wrote on last edited by
      #2

      Hi scotchy The page is probably being cached. To turn off caching for the page, use this code:

      Response.Expires = 0
      Response.Cache.SetNoStore()
      Response.AppendHeader("Pragma", "no-cache")

      Regards Rajeesh MP

      S 1 Reply Last reply
      0
      • R Rajeesh MP

        Hi scotchy The page is probably being cached. To turn off caching for the page, use this code:

        Response.Expires = 0
        Response.Cache.SetNoStore()
        Response.AppendHeader("Pragma", "no-cache")

        Regards Rajeesh MP

        S Offline
        S Offline
        scotchy2hotty2k2
        wrote on last edited by
        #3

        Thx Rajeesh for the soln.. I dont know whether this is correct or not.. I have inserted the code in MasterPage and working for me.. just want to know whether things can be made at the Global.asax Regards scotchy

        modified on Tuesday, January 13, 2009 1:18 AM

        R 1 Reply Last reply
        0
        • S scotchy2hotty2k2

          Thx Rajeesh for the soln.. I dont know whether this is correct or not.. I have inserted the code in MasterPage and working for me.. just want to know whether things can be made at the Global.asax Regards scotchy

          modified on Tuesday, January 13, 2009 1:18 AM

          R Offline
          R Offline
          Rajeesh MP
          wrote on last edited by
          #4

          hi scotchy ha ha ha..GREAT

          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