Home All Groups Group Topic Archive Search About

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

Author
20 Nov 2006 11:15 PM
ibaldwinjr
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

Author
21 Nov 2006 8:25 AM
Vadym Stetsyak
Hello, ibaldwi***@gmail.com!

Are you sure that browser isn't using cached version of the document that you
requested by that url?

i> Hi,

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

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

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


i> Thanks,
i> Baldwin


--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Author
21 Nov 2006 3:07 PM
ibaldwinjr
No, the url is not cached in my browser. We make sure of that.

Vadym Stetsyak wrote:
Show quoteHide quote
> Hello, ibaldwi***@gmail.com!
>
> Are you sure that browser isn't using cached version of the document that you
> requested by that url?
>
>  i> Hi,
>
> i> I am trying to get a response from a URL using the HttpWebRequest
> i> object. this is my code below.
> i> httpRequest = (HttpWebRequest) WebRequest.Create(myurl);
> i> httpRequest.Method = "GET";
> i> httpRequest.Timeout = 90000;
> i> httpResponse = httpRequest.GetResponse();
> i> ..................
>
> i> Before it was working fine. Then suddenly we got an error. This is
> i> the
> i> details of the error I got. The url exists coz we are able to access
> i> it
> i> using a regular browser.
>
> i> System.Net.WebException: The remote server returned an error: (404)
> i> Not
> i> Found.
> i>    at System.Net.HttpWebRequest.CheckFinalStatus()
> i>    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult
> i> asyncResult)
> i>    at System.Net.HttpWebRequest.GetResponse()
> i>    at MobileClientInstall.AppMain.submitHTTPRequest(String
> i> serverName,
> i> String resource, String queryString)
>
>
> i> Thanks,
> i> Baldwin
>
>
> --
> Regards, Vadym Stetsyak
> www: http://vadmyst.blogspot.com