There is a problem with ASP.NET when trying to set a cookie on subdomain1.mydomain.com to read at subdomain2.mydomain.com.
"subdomain1" is an ASP.NET application running on IIS 6. "subdomain2" is an ASP Classic application running on IIS6.
I don't understand that when I test my .NET page (below) in Firefox, it works. If I test it in IE8, the cookie does not seem to be stored / passed in subdomain2. I tried many variations of the code below, to no avail (including adding an expiration date / time):
Dim k As Guid = Guid.NewGuid
Dim c As New HttpCookie("Interstitial")
With c
.Values("a") = 1
.Values("b") = 2
.Values("c") = 3
.Values("d") = 4
.Domain = ".mydomain.com"
End With
Response.AppendCookie(c) 'Have also used Response.Cookies.Add(c)
Dim url As String = String.Format("https://subdomain2.mydomain.com/?d={0}", k.ToString)
Response.Redirect(url)
Other information that may be relevant:
- The above code is executed in response to a postback (button click)
- IE8 response.redirect(), ,
/.