Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

System.Net.WebException: The remote server returned an error: (404) Not Found.

Hi,

I am trying to get a response from a URL using the HttpWebRequest
object. this is my code below.
httpRequest = (HttpWebRequest) WebRequest.Create(myurl);
httpRequest.Method = "GET";
httpRequest.Timeout = 90000;
httpResponse = httpRequest.GetResponse();
..............

Before it was working fine. Then suddenly we got an error. This is the
details of the error I got. The url exists coz we are able to access it
using a regular browser.

System.Net.WebException: The remote server returned an error: (404) Not
Found.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult
asyncResult)
at System.Net.HttpWebRequest.GetResponse()
at MobileClientInstall.AppMain.submitHTTPRequest(String serverName,
String resource, String queryString)

Thanks,
Baldwin
[932 byte] By [ibaldwinjr] at [2007-11-11 9:53:13]
# 1 Re: System.Net.WebException: The remote server returned an error: (404) Not Found.
What changed between when it worked and when it stopped working? Did you install any new software, such as a firewall? Did you change the network settings on the PC?
Phil Weber at 2007-11-11 21:45:09 >
# 2 Re: System.Net.WebException: The remote server returned an error: (404) Not Found.
It worked fine in our environment. But in our clients, it didnt work. We asked them if they did some updates or anything but they said they didnt do anything. So now we are like shooting in the dark. What do you think are the possible causes of this problem? We are thinking about proxy or firewall but they say they are no updates related to that or anything. Basically they didnt do anything and suddenly our application doesnt work.
ibaldwinjr at 2007-11-11 21:46:20 >