Avatar of Jesper Christensen
Jesper Christensen

asked on 

Create guid cookie in global.asa

Hi Guys.

Why do I get an error when I tryes to create my guid user cookie in global.asa?
If i paste the code to default.aspx, it works?

  void Application_Start(object sender, EventArgs e)
         if (Request.Cookies["Guid"] == null)
            Response.Cookies["Guid"].Value = System.Guid.NewGuid().ToString();
            Response.Cookies["Guid"].Expires = DateTime.Now.AddYears(2);

.NET ProgrammingC#

Avatar of undefined
Last Comment
Carlos Villegas

8/22/2022 - Mon