471,317 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

Passing cookies from client to webrequest host

Hi all,

I have to screen scrape a site to put into our templates. (We have the site
owners permission).

The site has a login screen, and I can successfully post credentials using
HttpWebRequest. This is not a problem.

The site then send a cookie with a sessionid. What I want to do is instead
of saving it locally on the server, is to pass the cookie onto the client,
then when another call is requested to the app host, I read the cookie from
my client and send to the host.

Any ideas as to how I can achieve this?

I am using the CookieContainer, but having never used it before, I don't
know what I am doing with it. I can get the session ID string out of the
cookie. I will assume that I do something like the old ASP, response.cookies
to send the cookie to the client. Reading the cookie should also be pretty
straightforward, something like request.cookies but then putting that cookie
back into the request to the host, how do I do that?


Best regards,
Dave Colliver.
http://www.FOCUSPortals.com - Local franchises available
Feb 8 '06 #1
0 1229

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Paul | last post: by
1 post views Thread by Paul | last post: by
6 posts views Thread by Tom | last post: by
reply views Thread by Pat Allan | last post: by
6 posts views Thread by sd | last post: by
7 posts views Thread by Wade Wegner | last post: by
1 post views Thread by Prasanna Padmanabhan | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.