I have a custom error page. It works on my production server, but not on my dev machine. It's Windows 7, IIS 7.5.
I cannot get it to actually execute my custom page, although I can get it to respect detailed-local vs custom always. It just doesn't actually hand over to my custom error page and instead gives me the generic "Runtime Error" page for the remote mode.
Facts that might be relevant: it's an application mounted under a different app pool and web.config, this one is .NET 4.0, Integrated.
I was able to get it working, once, with "Response.TrySkipIisCustomErrors = true;" - but it did a redirect instead of an execute so I lost the error context which of course is the whole point - and in trying to change the redirect mode I was unable to get it to work again.
I've tried using both customErrors and httpErrors in all the documented/standard ways, but no combination works. Again, I have had this working correctly elsewhere.
The above is a normal response - if your error page is itself generating an exception.
It turned out the same code causing the original error was in the execution of the error page.
Related
Recently I started getting The connection was reset. error message (error code is ERR_CONNECTION_RESET) when I open one of my websites. This has nothing to do with application(node.js) level afaik as no changes or deploys were made in the application. To add to this, there were no error logs so I am assuming the request did not even receive the node app. The website is hosted on godaddy and its backend is a elastic beanstalk application. How do I fix this? On the web browser, in the second attempt it automatically loads correctly. But in a iframe which embeds my website, this has become a nasty issue as the browser does not even retry. I did the DNS analysis using dig command and all that but could not find anything relevant. Interesting part is this only happens after some interval (it does not happen continuously). On reload it works without fail.
I know CF 10 has a number of issues surrounding 404 handling. This seems to be different from the other reports. Details:
Win2k8 R2/64 and IIS7.5
Upgrading from identical config on separate server. Only difference is CF9 -> CF 10. All works fine on CF9. Adobe CF9 Lockdown implemented on original server, CF10 Lockdown implemented on this server.
missing template handler set in CF Admin as /404.cfm, which should translate to the Cfusion root (c:\ColdFusion10\cfusion\wwwroot).
IIS has been config'd to trace failed 404 requests
IIS 404 handling is default (originally executed a CF URL but removed to simplify debug).
Coldfusion webroot where missing template handler resides is default install location
IIS site root is entirely different: c:\Other\Place\SiteRoot\
A sitewide error handler is also set in CF Admin in the same ColdFusion webroot and works as expected.
404.cfm is very simple:
<cfheader
statuscode="404"
statustext="Not Found">
<h1>404</h1><p>Page not found</p>
<cfoutput>#now()#</cfoutput>
Inputting the bad url [domain]/foo.cfm should display the above template. Instead I get an IIS error screen. The CF missing template handler is ignored. The IIS failed request trace says the url is
http://[mydomain]:80/jakarta/isapi_redirect.dll
and a detail view shows at Step 1
RequestURL="http://[mydomain]:80/foo.cfm
I've seen plenty of issues surrounding CF10 and 404's, but never that the missing template handler assignment is completely ignored. In CF9 this will generate output as expected. Anyone seen anything like this?
EDIT:
I have also tried config'ing this to match a different CF9 server I have running: Added a CF mapping to the web root of the site. Then placed the missing template handler in the web site's root rather than the CF default web root, lastly in cfadmin pointed to the missing template handler in the web site's root using the mapped folder. Same problem. Works fine in CF9 and not at all using CF10.
EDIT2:
As Miguel F pointed out in the comments, you can shut off HTML error codes in CF Admin and this will let the Missing Template Handler fire... BUT you get a 200 header to go with it. Apparently cfheader statements are ignored as I have tried placing the cfheader at the beginning and end of the template... still yields a 200. Visually fine but insofar as SEO is concerned thats a disaster. Just looked and my CF9 servers do not require this setting to be unchecked for their handlers to work.
EDIT3
Dana Kowalski's solution displays detailed IIS errors to the public, so for a 404 on, say, a made-up extension (foo.xyz), the screen will show file paths. Default behavior is to NOT display detailed errors except when running templates locally, and display custom error pages to visitors. The CF error template should work fine with that setting.
POSSIBLE SOLUTION
I stepped back to ColdFusion 9 as part of debugging this problem, and may have discovered the solution while debugging a separate related issue.
In the IIS Manager, click on the site in question. Select the Error Pages option. Select the 'Edit Feature Settings' link on the right side. Check that the 'Detailed Errors' option is selected.
If you have either of the other two selected, there are times IIS 7.x will take over and not let ColdFusion handle it.
I am trying to run class asp site in iis 7.5, I have verified that asp feature is turned on. I have read on other question that running aspnet_regiis.exe will solve. But how. I run this and got information about command.
try with add handler mapping with
request Path = *.asp
Executable = C:\Windows\System32\inetsrv\asp.dll
Hope this will work
We're running ASP.Net (1.1) on a server with Windows Server 2003 R2 (Service Pack 2). We have an application (http://newserver.yourdomain.com/someapp) that performs a relatively basic process of taking the user-entered input and populates the data into the database. If there is a problem with the INSERT/UPDATE, a TRY...CATCH block will trap the error and redirect the user to a centralized "Error Handler" application (http://newserver.yourdomain.com/ErrorHandler) that displays a more user-friendly error screen and log all the relevant information. The Error Handler resides on the same server and runs ASP.Net (1.1) as well.
This has been working for years, but we're upgrading the servers and replicating all the same applications from the old server (http://oldserver.yourdomain.com) to the new server. For some reason, now when the application is attempting to redirect the user to the Error handler (via Response.Redirect), we're running into a "The page cannot be displayed" error (aka "Action Cancelled" error). I assume it's a configuration setting, but I can't think of what it might be.
To make things stranger, this happens in IE6 and IE7, but not in Chrome 12. Also, we can avigate directly the Error Handler URL without a problem. The issue seems to center around the need to redirect to that location.
Also, if I set up the old server (http://oldserver.yourdomain.com) to point to the new Error Handler (http://newserver.yourdomain.com/ErrorHandler), it works fine. The redirection seems to only be an issue on this new server.
Can you think of what the issue(s) might be?
I have a web site with a child directory set up as an application. I set up the application to use a custom 404 page. When I navigate to the url and put in a non existent page I get the following error message. Any other asp page in the application works fine. There isn't even any script in the 404 page... just plain html so I'm not sure what is causing this. I've tried creating an application pool specifically for this application but that didn't help. Thanks.
Error message: The specified request cannot be executed from current Application Pool
Try to create a registry key with the name IgnoreAppPoolForCustomErrors (type DWORD, value 1) in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\
See http://blogs.msdn.com/rakkimk/archive/2006/09/01/735684.aspx or http://www.yanghengfei.com/show-131-1.html for more information - seems to be a not so uncommon problem.