cookies

Z

Ziphyre

Hi,

I try to get cookies from a web site. In the response header, there are
3 Set-Cookie directives, but when I query my CookieCollection with
something like:

foreach(Cookie cky in hwrsp.Cookies)
{
cookies.Items.Add(cky.Name + " = " + cky.Value); //a simple list
}

only these 2 appear in the list:
cookie_hash = 44d96e4f352434bbf4e5f5dc9b3d006a
security_hash = 323466345345


but a query to WebHeaderCollection reveals these 3:
Set-Cookie: cookie_hash=44d96e4f352434bbf4e5f5dc9b3d006a; path=/
Set-Cookie: session_id=0d4fcc6532f69bed9108d59ce7dfb71a; path=/;
domain=www.test.com

Set-Cookie: security_hash=323466345345; expires=Mon, 13-Dec-2004
11:59:18 GMT; path=/; domain=.test.com

I can't see why session_id is missing as well as other parts?

Thanks
 
S

Steven Cheng[MSFT]

Hi Ziphyre,

As for the problem you mentioned, are you using httpWebRequest class or any
other component to send request to the certain site? Also, is that site a
asp.net web application. I've done some local test which use httpwebrequest
class to request an asp.ent web page in winform client app and it can
retrieve the SessionID cookie item correctly. If you feel convenient ,
would you please provide some further code on how you request the page and
retrieve the cookie collection so that we can do some further research.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Hi Ziphyre,

Any further progress or ideas on this issue? If there're anything else we
can help, please feel free to post here.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Top