How can I access the cookie specific to a URI

  • Thread starter fred Oleary via .NET 247
  • Start date
F

fred Oleary via .NET 247

Hi, I'm using HTTPWebRequest/HTTPWebResponse to automate accessto a website. To bypass the authentication pages, I'd like toappend the PC stored cookie in my initial"myHttpWebRequest.GetResponse()" call. Using this I am hoping tothen directly access specific data in the website. I'm fairlynew to some of this but it seems I need to attach the cookiestored on the client PC to the HTTP GET request. (I.E. does it.Does anyone know how to programatically?)

Thanks
 
M

mikeb

fred said:
Hi, I'm using HTTPWebRequest/HTTPWebResponse to automate access to a website. To bypass the authentication pages, I'd like to append the PC stored cookie in my initial "myHttpWebRequest.GetResponse()" call. Using this I am hoping to then directly access specific data in the website. I'm fairly new to some of this but it seems I need to attach the cookie stored on the client PC to the HTTP GET request. (I.E. does it. Does anyone know how to programatically?)

You should be able to add the cookie header to the collection of HTTP
headers that you get from the HttpWebRequest.Headers properties.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top