Missing template handlers on IIS

ColdFusion Add comments

Missing template handling seems to be a bit of a black art in Cold Fusion. By default, if you request a template that doesn’t exist CF will display it’s inbuilt ‘File Not Found’ message. There is an option in the CF Administrator for specifying a  ’missing template handler’ but to me, if you’re hosting multiple sites on a single server - I’d think a generic missing template handler could get tricky to manage.

Since IIS has the option to display custom error messages for the various error codes it makes sense to leave IIS to handle the error. To accomplish this you need to make one change to the IIS config so that it will handle missing .cfm files.

In the IIS MMC bring up the properties for a particular site, navigate to the ‘Home Directory’ tab and then click the configuration button. From the list of extensions highlight .cfm and click the edit button. At the bottom of the dialog box you’ll see a check box ‘Check File Exists’ - if you check this IIS will now handle the missing template and use your custom 404 file

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in