We help IT Professionals succeed at work.

Get Custom 404 HTML using httpwebrequest and httpwebresponse

mxpoint asked
Last Modified: 2013-11-06
I am downloading pages using httpwebrequest and httpwebresponse. If the url I request return a 404, httpwebrequest throws an exception and httpwebresponse object won't get filled with data.  I want to get the html that was returned with 404. How can I make the httpwebrequest fill the httpwebresponse without throwing the error?   If this is not possible does any other built in asp.net components allow this?
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.