Windows Vista
Windows Forms
Game Technologies
VS Team System
Visual Studio
Windows Live
Architecture
Visual J#
SQL Server
.NET Development
Smart Device
Visual C++
VS Express Editions
Microsoft ISV
Visual C#
Software Development Network>> Visual C#>> Session Maintainence
Session Maintainence
Hot Topic
how to implement command line switches with command line arguments
Removing duplicate items from a DataTable
How can I join two image file into one file?
I ve a project which reference to others dll, i want to complie all of them into 1 dll
Voice generated based on a text
C# book for windows and database
Length of multi dimension arrays.
Editing project references in visual studio 2005 project files
C# and Lotus Notes
event declaration
Visual C#
Refactoring namespaces in vs2005
Help to get the knowledge of C#
Missing editor (I think !) for solution properties
Error executing child request
debug inside callback method
Threading in C#
GetPixel/SetPixel very very slow...
Searching a byte array for a pattern of bytes
VS Beta 2 Rename Feature is making me sick. How to turn this off?
How can I convert string representation of Color object to Color object
Session Maintainence
How to maintain Session in HttpWebRequest and HttpWebResponse without using Webservices and ASP objects
Answer this question
Session Maintainence
sptma
You will likely need to make your httpwebrequest accept and store cookies,
to mimic what your browser would typically do.
Or you can POST or the Query string to resend values.
_Ed Noepel
Hi Sande,
Already I have done this, but for session maintainence what should I do
Kailash
xhh
CookieContainer myContainer =
new
CookieContainer();
// following line will add a cookie in container, which would be for all urls on the domain myDomainstr
myContainer.Add(new Cookie("name","value","/",myDomainstr));
HttpWebRequest request1 = (HttpWebRequest) WebRequest.Create(httpUrlString);
// use this same container for all requests in your app
request1.CookieContainer = myContainer;
//you can check cookies on response.Cookies
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
More information can be found on a great blogpost that can be found here:
Establishing cookie based session with WebServices and HttpWebRequest
.
Session Maintainence
Answer this question
Session Maintainence
sptma
to mimic what your browser would typically do.
Or you can POST or the Query string to resend values.
_Ed Noepel
Already I have done this, but for session maintainence what should I do
Kailash
xhh
CookieContainer myContainer = new CookieContainer();
// following line will add a cookie in container, which would be for all urls on the domain myDomainstr
myContainer.Add(new Cookie("name","value","/",myDomainstr));
HttpWebRequest request1 = (HttpWebRequest) WebRequest.Create(httpUrlString);
// use this same container for all requests in your app
request1.CookieContainer = myContainer;
//you can check cookies on response.Cookies
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
More information can be found on a great blogpost that can be found here: Establishing cookie based session with WebServices and HttpWebRequest.