Changing default cfm handler to resourceType Unspecified?

New Here ,
May 29, 2015 May 29, 2015

Copy link to clipboard


I have a ColdFusion 10 Enterprise server setup with a number of instances and a bunch of websites all accessing a shared codebase using IIS 8.5. After running wsconfig to setup the websites for ColdFusion it adds the *.cfm handler mapping in for each instance and site just fine. I'm attempting to use the application.cfc onMissingTemplate function to implement SEO friendly URLs with ColdFusion. To this end I have added a URL Rewrite to the web.config in that folder to rewrite URLs with no ColdFusion file to map to a non-existent cfm file:

<rule name="Missing Templates" stopProcessing="true">

     <match url="^(.*)$" />


          <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />

          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />


     <action type="Rewrite" url="{R:1}-.cfm" />


This properly rewrites the URLs, however in order to make it work I have had to adjust the cfm handler on the IIS record to set the Resource Type to Unspecified. Otherwise IIS sees the file doesn't exist and does not pass it off to ColdFusion to be caught by the onMissingTemplate, and the page will not load. The issue is that when I adjust the cfm handler in IIS this updates the web config to remove the existing cfm handler and add it back in. This works great for a single website. However since I have multiple websites in IIS pointing to the same root folder this overrides the cfm handler for all of them and points at the same isapi_redirect.dll file for all of the websites, for example "C:\ColdFusion10\config\wsconfig\2\isapi_redirect.dll". So now all of the websites are using that same instance of the file instead of their own in different folders like "C:\ColdFusion10\config\wsconfig\3\isapi_redirect.dll" or "C:\ColdFusion10\config\wsconfig\4\isapi_redirect.dll" as they used to, which results in permissions issues and I'm assuming removes the benefit of multiple instances for ColdFusion or IIS to some degree.

So I'm trying to figure out if there is a way to change the "Inherited" settings on the IIS websites for the cfm handler, rather than having to remove and override those settings. If I could have it inherit the Resource Type of Unspecified then I wouldn't need to alter that shared web.config file. I can't find anywhere within IIS where these settings are inherited from, and since each site points to it's own folder I'm not sure how it could inherit them. Is there some place that I can go to adjust those settings for the handlers that are created by the wsconfig?







Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation