PDA

View Full Version : Response.Cookies.Add(CookieName)


StephenC
05-27-2004, 02:11 AM
Hi,

First off, I'm trying this with the default temp domain created by aspnetdiscout, as I'm not using a new domain for this app; it runs in an iframe (which may be an issue regarding domain referencing)

I'm writing a cookie to my clients using the standard asp.net vb method:

Response.Cookies.Add(CookieName)

Like so:

Dim DisplaySchemeCookie As New HttpCookie("CookieName")
DisplaySchemeCookie.Values.Add("Cache", "True")
DisplaySchemeCookie.Values.Add("bla", "True")
DisplaySchemeCookie.Expires = Now.AddDays(15)
Response.Cookies.Add(DisplaySchemeCookie)
'Response.AppendCookie(DisplaySchemeCookie)

This works in localhost and it also worked the first couple of times I tested my app on the aspnetdiscount server but now it has stopped writing the cookie to client machines.

As you can see I've also tried the append method which also fails.

There are no errors to trap in the vb.net code and I'm guessing that I would have to look at the http headers to find out more. I don't know how to look at http headers as yet, how would I do this?

Has any one had experience of this?

regards,

Stephen