I want two write a cookie that expires in 7 days.
But it doesn't function, I couldn't find the cookie. I found out that I had to add 103 days extra to the expire date
with this line Response.Cookies ("GUID2").Expires = DATE + 110 the cookie expires in 7 days.
The behaviour on one virtual win2012 server. I tested the code on other servers and there it works like it should. But every site on this 2012 server I have to add extra days.
This is the code:
CreateGuid = Left(CreateObject("Scriptlet.TypeLib").Guid,38)
If Request.Cookies ("GUID2") = "" or renew = true Then
Response.Cookies ("GUID2") = CreateGuid
Response.Cookies ("GUID2").Expires = DATE + 7
CreateGuidCookie = request.Cookies ("GUID2")
Response.Cookies .Expires = DATE + 7
Response.Cookies["UserSettings"]["Font"] = "Arial";
Response.Cookies["UserSettings"]["Color"] = "Blue";
Response.Cookies["UserSettings"].Expires = DateTime.Now.AddDays(1d);
So I guess I am looking for a setting on the server.. timing of the server is ok.