i've setup custom errors for all non .NET pages using the IIS error pages module and those work fine.
i have added the tag to the web.config file for all the .net application folders. this should handle any error that is encountered when a user tries to open a .net (.aspx) page within that folder. It seems simple to setup, and it was working when i first set it up. Now, after a server reboot, it won't work anymore.
The web.config file is:
i have also tried a hard-coded path in the web.config.
The folder is setup as a .net application folder with the application pool = ASP.NET v4.0
I can browse directly to the error.aspx and 404.aspx files and open them successfully from the browser window.
www.mydomain.com/testingDotNet/404.aspx and www.mydomain.com/testingDotNet/error.aspx will load fine with no errors.
But when I try to open a non-existent page:
www.mydomain.com//testingDotNet/nopage.aspx ==> this should call 404.aspx but instead i get the .net 404 page:
The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /testingDotNet/nopage.aspx
I ran a failed request trace, but i can't really decipher anything from that. The results, with code section just before error display are: Failure Reason STATUS_CODE Trigger Status 404 Final Status 404 131. NOTIFY_MODULE_START
ModuleName="CustomErrorModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false"
ModuleName="CustomErrorModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE"
134. i HTTPSYS_CACHEABLE
HttpsysCacheable="false", Reason="NO_PIPELINE_ENABLE", CachePolicy="NO_CACHE", TimeToLive="0"
135. i GENERAL_FLUSH_RESPONSE_START
19:30:02.278 136. i GENERAL_RESPONSE_HEADERS
Headers="Cache-Control: private Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET "
Buffer=" The resource cannot be found.
I get this same response page whether i make a call to the page remotely or on the server itself. i would expect the custom page to show up on the call from a remote machine, since the customerror mode is set to "RemoteOnly". But the behavior does not change, even if i turn mode to"Off".
this seems like a pretty simple task. and oddly, it worked when i first configured it, and now it won't work. i've stopped and restarted IIS, and restarted the server. it's making me think i'm crazy! any help on why this may be happening is appreciated.