Coldbox 4+ IIS 8 on separate website & pool not working

Good day,
Since I’m totally new to Coldbox framework pardon if my question is stupid.

I’m using IIS 8.5.9600.16384. I have converted CFWheels framework application to Coldbox. The application works fine if I run it under default website c:\inetpub\wwroot\DMS when I moved it to its own site under inetpub\wwwroot\DMS (see attachement iis.png) I got below error

Error building: interceptor-SES -> Error loading UDF library: /includes/helpers/ApplicationHelper.cfm The UDF library was not found. Please make sure you verify the file location. with constructor arguments: {controller={[(Component=coldbox.system.web.Controller)]},properties={{}}}

I have reconfigured the connector (see attachment wsconfig)

I tried to add ‘DMS’ to COLDBOX_APP_MAPPING did not help got another error. I also moved ColdBox core framework inside the application inetpub\wwwroot\DMS\coldbox and added the mapping in application.cfc this.mappings[ “/coldbox” ] = “c:\inetpub\wwwroot\DMS\coldbox”; with no luck

I also tried to setup completely new coldbox application without logic running on its own site got same error.

Any help is appreciated from Coldbox champions.

wsconfig.png

Shirak,

What is the error you received, when you set the COLDBOX_APP_MAPPING to /DMS ?

You also may need to change the config path to DMS.config.Coldbox if you change that mapping, along with any root-relative paths in your Coldbox.cfc config file. You shouldn’t need to (leaving it empty defaults to the current directory), but it can save some troubleshooting down the road by configuring the path mappings.

You will need to change some of your config paths. Unless you map the /includes directory in your App.cfc, that UDF file config path will also have to become /DMS/includes/ApplicationHelper.cfm in your Coldbox config file.

Basically, you need to check that file to make sure all of the paths now match to the current mapping of the site.

HTH,

Jon

Hi Shirak, when you say in “its own site” do you mean a site configured in IIS, or just a sub folder of the default site?

My first thought is that you’ve just moved the code into a sub-folder, in which you might need to simply remove the “/” from your applicationHelper setting so it’s relative and not absolute.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Jon,
Appreciate you prompt reply, question: On IIS when we create new website/pool with physical binding to c:\inetpub\wwwroot\DMS shouldn’t that become the root of the application? in this case ColdBox app is sitting under DMS!

What is the error you received, when you set the COLDBOX_APP_MAPPING to /DMS ?

im getting this error

Error building: interceptor-SES -> Could not find the included template includes/helpers/ApplicationHelper.cfm. Note: If you wish to use an absolute template path (for example, template="/mypath/index.cfm") with include, you must create a mapping for the path using the ColdFusion Administrator. Or, you can use per-application settings to specify mappings specific to this application by specifying a mappings struct to THIS.mappings in Application.cfc.

Using relative paths (for example, template=“index.cfm” or template="…/index.cfm") does not require the creation of any special mappings. It is therefore recommended that you use relative paths with include whenever possible. with constructor arguments: {controller={[(Component=coldbox.system.web.Controller)]},properties={{}}}

when I add DMS to applicationHelper = “DMS/includes/helpers/ApplicationHelper.cfm”,
getting different error

Error importing routes configuration file: Could not find the included template config/Routes.cfm. Note: If you wish to use an absolute template path (for example, template="/mypath/index.cfm") with include, you must create a mapping for the path using the ColdFusion Administrator. Or, you can use per-application settings to specify mappings specific to this application by specifying a mappings struct to THIS.mappings in Application.cfc.

Using relative paths (for example, template=“index.cfm” or template="…/index.cfm") does not require the creation of any special mappings. It is therefore recommended that you use relative paths with include whenever possible.

Hi Brad,
I mean a site configured on IIS bound to sub folder on wwwroot\DMS. I have attached screen shot of my IIS setup. (iis.png)

Thanks,
Shirak

Maybe I’m not following correctly. All of the errors you are receiving have to do with the mapping of different templates and objects from the root of your site, based on your Coldbox configuration in App.cfc and Coldbox.config. If your site is running at “/“ in relation to the domain, then you are mapped as root and don’t need any additional configuration options, other than the Coldbox defaults of “” for most of those App.cfc settings.

That said, have you cycled the server or tried changing the application name? Since the default Coldbox App.cfc uses getCurrentTemplatePath() as part of it’s application name, it’s quite possible that your Application scope is out of sync with your current root path, as you haven’t changed the template path but have changed the url path through which you are accessing the app.

Ahh, sorry I missed those attachments.

I guess the next obvious question is, “Does this file exist?”

/includes/helpers/ApplicationHelper.cfm

Like Jon said, if the ColdBox framework and app are in the web root, then no special setup should be needed. It should just all work out of the box.

To rule out any craziness with IIS or Adobe CF, you could grab CommandBox, CD into your web root and run the “start” command and see if the site runs on Lucee.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Brad,
Yes, the file exist.

I have added this.mappings[ “/” ] = “c:/inetpub/wwwroot/DMS”;
COLDBOX_APP_MAPPING = “”; in application.cfc and the website start working again. another thing to mention all included javascript and css files need have '/ 'before the include

Thank you Jon & Brad

> I have added this.mappings[ “/” ] = “c:/inetpub/wwwroot/DMS”;

Hmm, I’ve never needed to do that. In fact, a “/” mapping is generally not recommended. What version of ColdFusion is this on?

> all included javascript and css files need have '/ 'before the include

Yes, this is true if you are using SES URLs since the browser can’t tell what the real web root is. Alternatively, you can set a

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I’m running on ACF 11,0,07,296330