I need to pass all my current page cookies to other server with request:
string url = "http://www.someserver.com/page1.aspx"; // Create a request for the URL. WebRequest request = WebRequest.Create(url); // If required by the server, set the credentials. request.Credentials = CredentialCache.DefaultCredentials; // Get the response. WebResponse response = request.GetResponse(); // Display the status. //Console.WriteLine(((HttpWebResponse)response).StatusDescription); // Get the stream containing content returned by the server. Stream dataStream = response.GetResponseStream(); // Open the stream using a StreamReader for easy access. StreamReader reader = new StreamReader(dataStream); // Read the content. string responseFromServer = reader.ReadToEnd(); // Display the content. Console.WriteLine(responseFromServer); // Clean up the streams and the response. reader.Close(); response.Close(); What should I add to this code to read current cookies and pass them to http://www.someserver.com/page1.aspx
Thanks