B
bag
Greetings!
I am currently creating a program that will retrieve information from a
web site based on user input. I have the system working correctly, but
am running into a problem (that I probably should have checked for in
the beginning
Summary:
Using an HTTPRequest, I want to be able to retrieve the page a server
would send with an error (like a custom 404) instead of getting a
WebException.
Detailed:
The user can determine what web page it is going to get data from. The
problem I discovered is that one of my test files has moved - making the
server return a 404.
The problem is, instead of returning the actual data from the server,
I'm getting an exception. Most servers have their own custom 404 pages,
and I would like the user to be able to see that.
Currently, the only solution I can think of is to make a general socket
stream to retrieve the web page and send the data directly (if the web
page is not found), but that will be clumsy and I would rather do it
right than a cruddy workaround.
Is there any other options? Thank you for assistance!
I am currently creating a program that will retrieve information from a
web site based on user input. I have the system working correctly, but
am running into a problem (that I probably should have checked for in
the beginning
Summary:
Using an HTTPRequest, I want to be able to retrieve the page a server
would send with an error (like a custom 404) instead of getting a
WebException.
Detailed:
The user can determine what web page it is going to get data from. The
problem I discovered is that one of my test files has moved - making the
server return a 404.
The problem is, instead of returning the actual data from the server,
I'm getting an exception. Most servers have their own custom 404 pages,
and I would like the user to be able to see that.
Currently, the only solution I can think of is to make a general socket
stream to retrieve the web page and send the data directly (if the web
page is not found), but that will be clumsy and I would rather do it
right than a cruddy workaround.
Is there any other options? Thank you for assistance!