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. cookie generation and locale/language settings

cookie generation and locale/language settings

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpquestion
1 Posts 1 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.
  • _ Offline
    _ Offline
    _tasleem
    wrote on last edited by
    #1

    hi all, i have strange issue and it may be dumb question, i am using below code in asp.net 1.1 to generate the cookie it is generated on some computer using locale(En-us),but cookie is not generated on some computers which have danish locale. My question "is cookie generation depend upon the locale/Regional setting/Language" below is the code to generate string strCVal="2001" + "@ENG"; for(int i=0; i<Request.Cookies.Count; i++){ Request.Cookies[i].Expires=DateTime.Now.AddYears(-30); } try { Response.Cookies["SCID"].Expires=DateTime.Now.AddDays(-3); } catch{} HttpCookie aCookie = new HttpCookie("SCID"); aCookie.Values[strCVal] = strCVal; aCookie.Expires = DateTime.Now.AddMinutes(5); Response.Cookies.Add(aCookie); that code does not throw any exception as well.

    Regards. Tasleem Arif

    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