Posts

Showing posts from February, 2010

An issue with HttpCookie using HasKeys property and encoded single value string

In this post I would like to share my experiance with HttpCookie object used in some e-commerce application. A web application containts the cookie implementation, which allows customers to persists thier contact details on the client's side using cookies. That code was implemented by third-party web-developers using a well-known HttpCookie class from the "System.Web" assembly. The provided functionality seemed working as expected untill some customers have sent us complains about unability to persist thier contact details for the future shopping needs. The problem was quite hard to identify. In many cases the coookie was persisted without any problem. Eventually, after digging into HttpCookie code implementation, we have found that the HasKeys property was responsible for all these troubles. The HttpCookie object, in our code, is created and stored with single value which is encoded using Base64 scheme as a standard for transmitting data on the Web. Be