The underlying connection was closed: Unable to connect to the remote server

I

Ilya

These code generates the error:

WebRequest request = WebRequest.Create("http://www.yahoo.com");
WebResponse response = request.GetResponse();

Here is the stack trace for the error:

WebException: The underlying connection was closed: Unable to connect to the
remote server.]
System.Net.HttpWebRequest.CheckFinalStatus() +673
System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) +140
System.Net.HttpWebRequest.GetResponse() +147
ASP.WebRequest_aspx.Page_Load(Object sender, EventArgs e) in


This worked fine on .Net 1.0 but stopped working when upgraded to .Net 1.1 .

Any help on this will be greatly appreciated.

thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top