Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   HttpWebRequest with session cookies (http://www.velocityreviews.com/forums/t119245-httpwebrequest-with-session-cookies.html)

=?Utf-8?B?am9obiBjb253ZWxs?= 02-09-2006 12:18 AM

HttpWebRequest with session cookies
 
I'm trying to programatically mine newsgroups like yahoo (among others), but
need to be able to sign into the site first. my assumption is that when i
sign in, a session cookie is created and is used to verify my identity for
each http request after that.

Does anyone have an example of using the HttpWebRequest with a URL that
requires a logon web page first, before accessing the content pages?

Thanks

Scott Allen 02-09-2006 02:20 PM

Re: HttpWebRequest with session cookies
 

On Wed, 8 Feb 2006 16:18:27 -0800, john conwell
<johnconwell@discussions.microsoft.com> wrote:

>
>Does anyone have an example of using the HttpWebRequest with a URL that
>requires a logon web page first, before accessing the content pages?
>


You'll need a CookieContainer object around, and attach the
CookieContainer object to your HttpWebRequest objects to send and save
cookies.

This might help, too:
http://odetocode.com/Articles/162.aspx

--
Scott
http://www.OdeToCode.com/blogs/scott/


All times are GMT. The time now is 01:00 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.