Difference between revisions of "How to Enable Robust Exceptions on a per Site basis in ColdFusion"

From Hostek.com Wiki
Jump to: navigation, search
(Remove incorrect information.)
Line 10: Line 10:
 
     <cfset this.Name = "My Application Name" />
 
     <cfset this.Name = "My Application Name" />
 
     <cfset this.EnableRobustException = "True" />
 
     <cfset this.EnableRobustException = "True" />
 +
</cfcomponent>
 +
 +
 +
Example for restricting based on IP address:
 +
 +
NOTE: Replace "123.123.123.123" with your actual IP address.
 +
 +
<cfcomponent>
 +
    <cfset this.Name = "My Application Name" />
 +
    <cfif CGI.REMOTE_ADDR == "123.123.123.123">
 +
          <cfset this.EnableRobustException = "True" />
 +
    </cfif>
 
  </cfcomponent>
 
  </cfcomponent>

Revision as of 18:20, 27 March 2018

In circumstances when you need to enable robust exceptions for a site, here are the steps needed:

You can configure this at the site level within your Application.cfc using the "this.EnableRobustException" property:

https://helpx.adobe.com/coldfusion/cfml-reference/application-cfc-reference/application-variables.html

Example "Application.cfc" file:

<cfcomponent>
    <cfset this.Name = "My Application Name" />
    <cfset this.EnableRobustException = "True" />
</cfcomponent>


Example for restricting based on IP address:

NOTE: Replace "123.123.123.123" with your actual IP address.

<cfcomponent>
    <cfset this.Name = "My Application Name" />
    <cfif CGI.REMOTE_ADDR == "123.123.123.123">
         <cfset this.EnableRobustException = "True" />
    </cfif>
</cfcomponent>