Issue
Macromedia ColdFusion MX allows you to configure a custom missing template handler for "404 page not found" errors rather than the default page provided by IIS. However, one problem you may run into is that the page won't display.
Reason
Configuring a missing template handler requires setting a path to the Missing Template Handler on the Settings page of the ColdFusion Administrator. It must be in a relative path of the web site. The following is from the ColdFusion Administrator Help documentation:
Specify a template to execute when ColdFusion MX cannot find the requested template. This specification is relative to the web root. If the user is running Internet Explorer with "Show Friendly HTTP error messages" enabled in advanced settings (the default), Internet Explorer will only display this page if it contains more than 512 bytes.
Solution
To use the missing template handler with IIS, the Custom Error page of your website must be configured to use the page. For this example, we'll assume a directory name of /errorpages and a file named missingtemplate.cfm. Therefore, the path to the missing template handler will be /errorpages/missingtemplate.cfm.
The steps below explain how to configure IIS to use the template for the Custom Error page:
-
Right-click on the website in the IIS Management Console, then select Properties.
-
Select the Custom Errors tab.
-
Select the 404 in the HTTP Error column and click Edit Properties...
-
Select URL from the Message type dropdown and enter /errors/missingtemplate.cfm in the URL text box.
-
Click OK.
-
Right-click on the website again and select Properties.
-
Select the Home Directory tab and click the Configuration... button.
-
Select .cfm from the list and click the Edit button.
-
Check the "Check that file exists" checkbox.
-
Restart IIS and the ColdFusion Server.
If you are configuring IIS 6.0 for the Missing Template Handler, along with the above you also need to configure the following:
-
Under the properties setting for the web site, go to the Home Directory tab.
-
Click the Configuration button. Under the "Wildcard application maps (order of implementation)", select the jrun_iis6_wildcard dll.
-
Click Edit.
-
Click the "Verify that file exists" checkbox to enable it.
-
Click OK.
-
Restart IIS and the ColdFusion Server.
If you have a multihomed site, follow the steps above for each website.