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
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