If the server you are accessing uses cookie-based authentication, then you must create a System.Net.CookieContainer where you store the authentication cookie. It is pretty simple:
CookieContainer container = new CookieContainer(); // Create web request request.CookieContainer = container; // Create next web request nextRequest.CookieContainer = container; // And so on ...
Just reuse the CookieContainer for all HttpWebRequest objects and store it in memory for later use.
CookieContainer is Serializable, so you can save it to disk if you need to. This will allow you to save cookies even when your user reloads your application.
Alternatively, if the page does not use cookies, but instead stores the session ID in the URL, you need to save the pass by session ID in the URL of the pages you see. Just add it to the url and it should work. :-)
source share