I have a system at sub.domain.com
When users access the system a cookie is being set using a primary domain.
cookie = new cookie("myCookie"); cookie.Domain = ".domain.com";
For some reason now I see that the users have 2 cookies:
1) myCookie for domain .domain.com
2) myCookie for domain sub.domain.com
The system was working since the beginning with the .domain.com cookie and then something happened that caused a new sub.domain.com cookie to get created.
The question is what caused the new cookie to get created?
The problem gets even more complicated because currently the problem is gone and the sub.domain.com cookie is not being created any more, so I can't debug the system and understand why the sub.domain.com cookie is created. I am left with users that have both cookies set and I need to understand what are the conditions that can case the second sub.domain.com cookie to get created instead of using the primary domain cookie as usual.