Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • well, this has no advantage over the standard <customerrors> way, since here you are specifying different paths for each distinct http status code. I can do the same with "customerrors". What I want... is a single view to handle different http status codes. Commented Mar 11, 2015 at 16:07
  • edited - you can just add a default path to the "httpErrors" node. Also "httperrrors" is the correct one to use for current IIS releases. Commented Mar 11, 2015 at 16:09
  • the same can be done with "customerrors" :-) and yet... the view will not know what was the http status code of the errored response. Commented Mar 11, 2015 at 16:10
  • customerrors is a legacy element. You're right though...no way of knowing which code is relevant. Couldn't you do it as I 1st said and in the controller handle the code and return a single error View for all controller Actions?? Commented Mar 11, 2015 at 16:12
  • you mean... in the controller handle each different path/error code - but use the same view... hmm, well that's what I was trying to do with "custom errors", but the http code was always 200 because I was always "inside" a new redirect request, not in my erroneous request anymore. If you are saying that httpErrors will not make redirects... than it might be an option. I will check it and let you know. Commented Mar 11, 2015 at 16:15