title: .Net System.Net.HttpWebRequest & Authentication Cookies
body: <p>I would like to know if the following is possible:</p>
  
  <p>As part of the PageLoad of an ASP.Net page request:</p>
  
  <ul>
  <li>Use HttpWebRequest (POST) to make a request to a forms authentication
  webpage of a different web application</li>
  <li>Examine the response to see if the authentication succeeded (identifiable if an authentication cookie has been set)</li>
  <li>If it fails, then finish the ASP.Net page request, which will display a message saying "couldn't auto-login" or some such thing</li>
  <li>If success, then instead of completing the ASP.Net page lifecycle, use "Response.Write" to send the response from the HttpWebRequest back to the browser (thus essentially displaying the webpage from the HttpWebRequest)</li>
  </ul>
  
  <p>If the above is possible, then, is there also a way to transfer the authentication cookie from the HttpWebResponse to the requesting browser? My gut feeling is probably not - but if this is the case, then how do proxy servers handle such things? Is that not essentially what they are doing?</p>
  
  <p>Thanks for any help</p>