System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly
<p>I'm am writing a .Net application which is supposed to post data to another .Net application.
I use the following code to request the login page</p>

<pre><code>WebProxy proxy = new WebProxy("http://proxy:80/", true);
HttpWebRequest webRequest = WebRequest.Create(LOGIN_URL) as HttpWebRequest;
//proxy.Credentials = new NetworkCredential("myusername", "mypassword", "domain"); 
// webRequest.Proxy = proxy;
webRequest.Proxy = WebRequest.DefaultWebProxy;

 StreamReader responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream());
string responseData = responseReader.ReadToEnd();
</code></pre>

<p>but it fails on this line with the error message :</p>

<blockquote>
  <p>System.Net.WebException: The
  underlying connection was closed: The
  connection was closed unexpectedly.</p>
</blockquote>

<pre><code>StreamReader responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream());
</code></pre>

<p>with the error</p>
