Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detect redirect of a WebRequest

Status
Not open for further replies.

BuGlen

MIS
Jun 16, 2000
254
0
0
US
I'm writing a console utility to download specific files from web sites. The problem I'm running into is that some web admins have taken it upon themselves to not return a 404 error of the URI of the file is incorrect. Instead they redirect the request to another page on the site to provide some instruction, and that page is then downloaded by my utility. I need to be able to only accept absolute responses and want to filter out redirected content.

Is there a method to detect when the response from a WebRequest or WebClient.Download file does not originate from the URI queried?

Any help would be much appreciated.

- Glen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top