473,583 Members | 3,114 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Net.WebE xception: 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.Crea te(myurl);
httpRequest.Met hod = "GET";
httpRequest.Tim eout = 90000;
httpResponse = httpRequest.Get Response();
............... ....

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.WebE xception: The remote server returned an error: (404) Not
Found.
at System.Net.Http WebRequest.Chec kFinalStatus()
at System.Net.Http WebRequest.EndG etResponse(IAsy ncResult
asyncResult)
at System.Net.Http WebRequest.GetR esponse()
at MobileClientIns tall.AppMain.su bmitHTTPRequest (String serverName,
String resource, String queryString)
Thanks,
Baldwin

Nov 20 '06 #1
1 13051
No, the url is not cached in my browser. We make sure of that.

Vadym Stetsyak wrote:
Hello, ib********@gmai l.com!

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

iHi,

iI am trying to get a response from a URL using the HttpWebRequest
iobject. this is my code below.
ihttpRequest = (HttpWebRequest ) WebRequest.Crea te(myurl);
ihttpRequest.Me thod = "GET";
ihttpRequest.Ti meout = 90000;
ihttpResponse = httpRequest.Get Response();
i.............. ....

iBefore it was working fine. Then suddenly we got an error. This is
ithe
idetails of the error I got. The url exists coz we are able to access
iit
iusing a regular browser.

iSystem.Net.Web Exception: The remote server returned an error: (404)
iNot
iFound.
i at System.Net.Http WebRequest.Chec kFinalStatus()
i at System.Net.Http WebRequest.EndG etResponse(IAsy ncResult
iasyncResult)
i at System.Net.Http WebRequest.GetR esponse()
i at MobileClientIns tall.AppMain.su bmitHTTPRequest (String
iserverName,
iString resource, String queryString)
iThanks,
iBaldwin
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Nov 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3700
by: Sean Erwin | last post by:
I am having a very frustrating intermittent problem. I am making an A2A call to a remote server and when I issue the: WebRequest.getResponse call it occasionally fails with the following error: <Error description> Exception Type: System.Net.WebException Status: ConnectFailure Response: NULL
2
16106
by: genc_ ymeri at hotmail dot com | last post by:
Hi, I'm trying to recieve the response status code rather than the message in the below code : try { responseArray = myWebClient.UploadValues(uriString,"POST",myNameValueCollection); } catch (System.Net.WebException ex)
0
2150
by: TonyR | last post by:
Can anyone help? I am writing an application to upload a data file to a remote website running IIS and FP2002 extensions. If I use "My Network Places" in windows XP, I can do this with "Explorer". I assume you use WebClient to upload files to a website, but I haven't got it to work yet. When I try the following code....
1
2404
by: Chris Langston | last post by:
We are seeing a very frustrating intermittent problem. We are making Synchronious web service method calls from a .NET windows Service using the following syntax WebRequest.getResponse call it occasionally fails with the following error: 1) Exception Information ********************************************* Exception Type:...
0
8550
by: Faiyaz | last post by:
Hello to EveryBody i'm Getting this Peculiar error System.ApplicationException: The remote server returned an error (400) Bad Request. - - > System.Net.WebException: The remote server returned an error (400) Bad Request. At System.Net.HttpWebRequest.CheckFinalStatus ()
8
14066
by: Tim Reynolds | last post by:
Our .Net application calls a web method of aplpication 2 that resides on their Apache server. When I as a developer C#, Studios 2003, make the call to their web method from my desktop, I receive no exceptions - completes fine. Their web service url was added as a web reference to our project with no problem. The following was generated as part...
0
1737
by: cider123 | last post by:
This is just information to maybe help others with the problem I ran across the other day. I had a Remote Object working just fine on a 2003 Server. I wanted to try it on another 2003 Server, so we had to install IIS 6 and then installed the .NET Framework 2.0 afterwards. When I copied the same files over and attempted to try it, I ended...
4
19966
by: kuladeep.mohan | last post by:
Hi I am trying to consume a web service from asp.net web page through HTTP POST method and I am getting the following error message "System.Net.WebException: The remote server returned an error: (500) Internal Server Error." I have been searchign the web and followed all the options which worked
7
11084
by: Mark Rae | last post by:
Hi, Has anyone successfully used the FTP stuff in the System.Net namespace against a VMS FTP server? I'm trying to do this at the moment and can't even get a directory listing, although there are no problems using the Chilkat FTP component, or connecting and browsing manually with a variety of FTP clients. The code I'm using is:
0
7827
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8184
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6581
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5375
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3820
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3845
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2334
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1434
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.