how set cookies? (http level)



hi guys. I have question about cookies which (IIS) send to client.
For example I use this page

The headers request and response looks like this

GET /User/Login HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:
Gecko/2009122116 Firefox/3.0.17
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: ru,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cache-Control: max-age=0

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Expires: Sun, 21 Feb 2010 12:03:33 GMT
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
Date: Sun, 21 Feb 2010 12:03:32 GMT
Content-Length: 13295

I dont see param "set-cookie" in server response and like i see it return
html page with lenth 13295. in that html code not exist any javascript for
set cookies, but if i will check cookies i will see something like

__utmb=; __utmc=1;

where it came from? how to get those values from server response?





These cookies are AFAIK for Google Analytics. You should find that this page
refences an external js script that ultimately set those cookies... If you
want to set/retrieve them server side on an ASP.NET page you can use the
Cookies collection on the Request or Response object.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question