by APIJunkie
1. March 2009 22:40
When reading/reusing a cookie sent from the client do not expect the expiration date to be valid.
The following excerpt is taken from MSDN regarding cookies:
"To be clear, you can read the Expires property of a cookie that you have set in the Response object, before the cookie has been sent to the browser. However, you cannot get the expiration back in the Request object."
Here are 2 things to remember:
1. If you need to save the cookie expiration date, save it in another place besides the Expires property.
2. Remember to always set the expiration date before sending a cookie back to the client.