Where is HttpSession ? System.net or System.web?

From: Anders Carlberg (anders.carlberg_at_infologigruppen.se)
Date: 03/13/04


Date: Sat, 13 Mar 2004 14:56:07 -0800

Hi,

I'm trying to do a http request and read a http session.
I have looked arond a bit, but I cant find any "HttpSession" object .. .

System.net:
HttpWebRequest has CookieContainer to read Cookies. .. works fine.
Source: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnethttpwebrequestclasscookiecontainertopic.asp
Where/how do I get the Session?

System.web:
I found an object called: System.Web.HttpContext and it seems to have all i need. .
But I cant instance it. The constructor takes to args: System.Web.HttpRequest and System.Web.HttpResponse.
HttpRequest is no problem i just put in the filename and url and so on..
 but HttpResponse takes a TextWriter as arg... doh! what should i put there??! and from where?

Summary: I want to a Web Client that supports: HTTPS, Cookies, Sessions... what sould I use?
So that i can create my own requests from code..

Cheers
- Anders



Relevant Pages


Loading