fadishouha
29 Oct 2010, 10:20 AM
Hi,
I've created a website in .NET/C#
I'm using the WebRequest class to send an HTTP request to a remote server. It's working fine on my PC (locally), but when I upload and test my site on the hosting server it throws this exception:
The remote name could not be resolved: remote_server_name
Here is my source code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(query);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream receiveStream = response.GetResponseStream();
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
string responseText = readStream.ReadToEnd();
response.Close();
readStream.Close();
please.. anyone can help ??
I've created a website in .NET/C#
I'm using the WebRequest class to send an HTTP request to a remote server. It's working fine on my PC (locally), but when I upload and test my site on the hosting server it throws this exception:
The remote name could not be resolved: remote_server_name
Here is my source code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(query);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream receiveStream = response.GetResponseStream();
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
string responseText = readStream.ReadToEnd();
response.Close();
readStream.Close();
please.. anyone can help ??