Custom 404 error pages
I cannot seem to get my application's custom 404 page to work properly after deployment to Apphb.
If I have this in my web.config:
<error statusCode="404" redirect="/Error/PageNotFound"/>
</customErrors>
and let's say I do this in code:
throw new HttpException((int)HttpStatusCode.NotFound, "Page not found.");
Then my custom error page should appear. This is the behaviour on my local IIS, and in every shared host I've ever deployed to.
However, here on AppHb, I keep getting the ASP.NET 404 whitescreen (not the IIS one, mind you), when again, I am expecting to get the custom redirect.
Any explanation for this?
Discussions are closed to public comments.
If you need help with AppHarbor please
start a new discussion.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
1 Posted by leedumond on 05 May, 2011 04:40 AM
Sorry guys, closing the discussion. I'm such a dork. Screwed up the Web.Release.config transform. In my defense, it's very late here. ;)
Support Staff 2 Posted by friism on 05 May, 2011 06:15 PM
That's cool, glad you worked it out. Remember that we have a web.config transform tester to help you debug the transform files.
friism closed this discussion on 05 May, 2011 06:15 PM.