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. How to remove a domain cookie ?

How to remove a domain cookie ?

Scheduled Pinned Locked Moved ASP.NET
questionhelptutorialcom
3 Posts 3 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.
  • R Offline
    R Offline
    Ridge Howison
    wrote on last edited by
    #1

    Hi ! Thank you for reading this. Here is my problem. Iam creating a domain cookie so, other sites in my app can read values. How can i delete the cookie from the other site??? For example.. lets say my main site is www.abc.com, when user logs in, i create a domain level cookie like this Dim cookie1 As HttpCookie = New HttpCookie("Cookie",1234567) cookie1.Domain = ".abc.com" cookie1.expires=datetime.now.addminutes(30d) Response.Cookies.Add(cookie1) this creates my domain cookie. my other site(lets say test.abc.com) reads this cookie...now i want to delete the domain cookie from test.abc.com. How do i do it? All help and code example are much appreciated. Thanks RH

    F C 2 Replies Last reply
    0
    • R Ridge Howison

      Hi ! Thank you for reading this. Here is my problem. Iam creating a domain cookie so, other sites in my app can read values. How can i delete the cookie from the other site??? For example.. lets say my main site is www.abc.com, when user logs in, i create a domain level cookie like this Dim cookie1 As HttpCookie = New HttpCookie("Cookie",1234567) cookie1.Domain = ".abc.com" cookie1.expires=datetime.now.addminutes(30d) Response.Cookies.Add(cookie1) this creates my domain cookie. my other site(lets say test.abc.com) reads this cookie...now i want to delete the domain cookie from test.abc.com. How do i do it? All help and code example are much appreciated. Thanks RH

      F Offline
      F Offline
      Fred_Smith
      wrote on last edited by
      #2

      set its "expires" property to a date in the past. If you want to do this across domains though, you may find that the user has set their browser security settings to prohibit you from doing this. Nothing you can do about that.

      1 Reply Last reply
      0
      • R Ridge Howison

        Hi ! Thank you for reading this. Here is my problem. Iam creating a domain cookie so, other sites in my app can read values. How can i delete the cookie from the other site??? For example.. lets say my main site is www.abc.com, when user logs in, i create a domain level cookie like this Dim cookie1 As HttpCookie = New HttpCookie("Cookie",1234567) cookie1.Domain = ".abc.com" cookie1.expires=datetime.now.addminutes(30d) Response.Cookies.Add(cookie1) this creates my domain cookie. my other site(lets say test.abc.com) reads this cookie...now i want to delete the domain cookie from test.abc.com. How do i do it? All help and code example are much appreciated. Thanks RH

        C Offline
        C Offline
        chand10
        wrote on last edited by
        #3

        Hi When u r entering to other site, u first check for that cookie and remove it.

        I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison Thank u Chandu

        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