BUG ? HttpRequest error on Win2003

L

lh

I'm getting a goofy error on a Win2003 (.net 1.1) box using the following
code. BTW: This code works on XP(.net 1.1)

retval = string.Empty;
System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)
System.Net.HttpWebRequest.Create(strSource); //The value for strSource is
http://www.insertSiteNameHere.com/content/homepage.html (this server is the
local server)

System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)
request.GetResponse();

StreamReader sr = new StreamReader(response.GetResponseStream());

retVal = sr.ReadToEnd();

The error I'm getting is this:

The underlying connection was closed: The remote name could not be resolved.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Net.WebException: The underlying connection was
closed: The remote name could not be resolved.





I've done lots of searching for the solution but i can't find anything
related. I've seen solutions for webservices, but this is not a webservice
and the code that is used to fix the webservice error is not valid in this
instance.



Thanks,

Lyndon
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top