?
Solved

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

Posted on 2013-10-23
4
Medium Priority
?
897 Views
Last Modified: 2013-10-23
Hi experts
I got the error:
  "The remote server returned an error:404 Not Found" when I do "GetResponse" with the following code.

  var request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(base.Url());
  var response = (System.Net.HttpWebResponse)request.GetResponse();

Open in new window


I'd checked the content of "base.Url()" and it was fine. I could use it to access the remote file via the Internet Explorer.

Actually the code used to work but now it gave me the above error. Kindly please point to me the right direction. Thanks in Advance.
0
Comment
Question by:dominicwong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
Kamal Khaleefa earned 1600 total points
ID: 39593465
try to trace your code and check what is the value of base.url
0
 
LVL 10

Assisted Solution

by:ienaxxx
ienaxxx earned 400 total points
ID: 39595308
one example here:
string baseUrl = Request.Url.Scheme + "://" + Request.Url.Authority +
    Request.ApplicationPath.TrimEnd('/') + "/";

perhaps in the folder represented by just the base.url() there is no default page.

edit:padas
0
 

Author Comment

by:dominicwong
ID: 39595830
Thanks king2002 and ienaxxx for your prompt responses.
I'd checked the base.url as king2002 suggested. I found out that was the source of my grief.
The problem was due to upper and lower case of the file which my program was looking for.
My program was looking for "App.msi" but the file at the remote server was named "APP.msi".

I'd checked the history of my program and the naming convention of the file.
I realized that it had been like that all the way, and it was working fine. I don't know why and since when a url becomes case sensitive.
0
 

Author Closing Comment

by:dominicwong
ID: 39595833
Thank you.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to dynamically set the form action using jQuery.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question