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

78 views
Skip to first unread message

Shirak Avakian

unread,
Apr 26, 2016, 5:16:02 PM4/26/16
to ColdBox Platform
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.

iis.png
wsconfig.png

Jon Clausen

unread,
Apr 26, 2016, 5:25:51 PM4/26/16
to col...@googlegroups.com

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

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/f665d335-c881-4d8f-a96b-311bc84da66b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

br...@bradwood.com

unread,
Apr 26, 2016, 5:37:14 PM4/26/16
to col...@googlegroups.com
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: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
--

Shirak Avakian

unread,
Apr 26, 2016, 5:37:28 PM4/26/16
to ColdBox Platform
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.

Shirak Avakian

unread,
Apr 26, 2016, 5:45:05 PM4/26/16
to ColdBox Platform
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

Jon Clausen

unread,
Apr 26, 2016, 5:50:50 PM4/26/16
to col...@googlegroups.com
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.

br...@bradwood.com

unread,
Apr 26, 2016, 5:58:15 PM4/26/16
to col...@googlegroups.com
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: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
Subject: Re: [coldbox:25634] Coldbox 4+ IIS 8 on separate website & pool not working
From: "Shirak Avakian" <shirak...@gmail.com>
Date: 4/26/16 4:45 pm
To: "ColdBox Platform" <col...@googlegroups.com>

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.

Shirak Avakian

unread,
Apr 26, 2016, 6:15:17 PM4/26/16
to ColdBox Platform
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
 
<link href="/includes/css/bootstrap.min.css" rel="stylesheet">

Thank you Jon & Brad

br...@bradwood.com

unread,
Apr 26, 2016, 6:18:53 PM4/26/16
to col...@googlegroups.com
> 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 <base href="http://www.yoursite.com/"/>

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

 
 
--------- Original Message ---------
Subject: Re: Re: [coldbox:25636] Coldbox 4+ IIS 8 on separate website & pool not working
From: "Shirak Avakian" <shirak...@gmail.com>
Date: 4/26/16 5:15 pm
To: "ColdBox Platform" <col...@googlegroups.com>

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.

Shirak Avakian

unread,
Apr 26, 2016, 6:26:02 PM4/26/16
to ColdBox Platform
I'm running on ACF 11,0,07,296330


On Tuesday, April 26, 2016 at 3:18:53 PM UTC-7, Brad Wood wrote:
> 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 <base href="http://www.yoursite.com/"/>

Thanks!

~Brad

Brad Wood

unread,
Apr 26, 2016, 6:35:17 PM4/26/16
to col...@googlegroups.com
If you remove your / mapping and dump out expandPath( "/" ) what do you get?



Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5


-------- Original message --------
From: Shirak Avakian <shirak...@gmail.com>
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.

Shirak Avakian

unread,
Apr 27, 2016, 11:13:23 AM4/27/16
to ColdBox Platform
Brad,
I did dump out expandPath( "/" ) after removing the mapping and I got c:\inetpub\wwwroot\

br...@bradwood.com

unread,
Apr 27, 2016, 11:23:18 AM4/27/16
to col...@googlegroups.com
Then your problem is not with ColdBox.  Something is wrong with IIS or ColdFusion.  "/" should point to your web root as defined in IIS.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Shirak Avakian

unread,
Apr 27, 2016, 11:37:51 AM4/27/16
to ColdBox Platform
Brad,
The default website bound to C:\inetpub\wwwroot\ by default, my site qbi.DMS bound to c:\inetpub\wwwroot\DMS I'm using same domain name localhost to access each website the difference is the port. Default website runs on port 80 and DMS runs on port 88 so technically I would expect expandpath('/') should show c:\inetpub\wwwroot since "/" represent the root of domain not root of website (base on my understanding I might be wrong and have to check with ACF team).

Thanks,
Shirak


On Wednesday, April 27, 2016 at 8:23:18 AM UTC-7, Brad Wood wrote:
Then your problem is not with ColdBox.  Something is wrong with IIS or ColdFusion.  "/" should point to your web root as defined in IIS.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

br...@bradwood.com

unread,
Apr 27, 2016, 11:45:17 AM4/27/16
to col...@googlegroups.com
That's not my understanding.  If you have two sites defined in IIS, their web roots are unique to each of them and passed along with the ColdFusion/IIS connector to the CF engine which is used to resolve cfm template paths.
 
Is it possible you're hitting a bug in the CF connector that never expected someone to have two sites on the same domain but with different ports??  I think there's some wires getting crossed between IIS and CF.
 
As a test, add foo.com to your hosts file and bind to that host name and see if it starts behaving as expected.
 
Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

 
 
--------- Original Message ---------
Subject: Re: Re: Re: Re: [coldbox:25643] Coldbox 4+ IIS 8 on separate website & pool not working
From: "Shirak Avakian" <shirak...@gmail.com>
Date: 4/27/16 10:37 am
To: "ColdBox Platform" <col...@googlegroups.com>

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.

Shirak Avakian

unread,
Apr 27, 2016, 12:36:54 PM4/27/16
to ColdBox Platform
Bard,
If I add host name foo.com to host file it will point to 127.0.0.1 which bound to default website I don't have static IP for local environment.On QA/Stage/Production the task will be much easy since each site will have its own IP address. When I'm adding foo.com and run it I'm getting default website when I add foo.com:88 I'm getting my websites.

br...@bradwood.com

unread,
Apr 27, 2016, 12:43:05 PM4/27/16
to col...@googlegroups.com
You don't have IIS set up correctly then.  You can bind a site in IIS either to an IP address or to a hostname.  So it's possible to have unlimited sites in IIS all coming in on the same IP (and even same port) but as long as they have a unique host name, you can bind them to separate IIS sites with separate web roots.
 
Note two limitations of IIS:
  1. IIS used to be limited on non-server PC's to only allow like 1 or 2 sites
  2. IIS doesn't support wildcard matching like Apache does for hostname binding.
Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

 
 
--------- Original Message ---------
Subject: Re: Re: Re: Re: Re: [coldbox:25645] Coldbox 4+ IIS 8 on separate website & pool not working
From: "Shirak Avakian" <shirak...@gmail.com>
Date: 4/27/16 11:36 am
To: "ColdBox Platform" <col...@googlegroups.com>

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.

Shirak Avakian

unread,
Apr 28, 2016, 12:25:33 PM4/28/16
to ColdBox Platform
Brad,
The problem with expandPath('/') always pointing to wwwroot was from ColdFusion admin mapping page. There were mapping defined their "/" bound to inetpub/wwwroot/. I removed that and no need to add this.mappings[ "/" ] = "c:/inetpub/wwwroot/DMS"; anymore (dahhh shoot me).

Thanks for your help guys.

br...@bradwood.com

unread,
Apr 28, 2016, 12:28:52 PM4/28/16
to col...@googlegroups.com
Ahh yes, that would do it!  Glad you've got it going now.  If you switch to Lucee, you can have separate mappings for each website and you won't have to worry about bleed over like that :)

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

 
 
--------- Original Message ---------
Subject: Re: Re: Re: Re: Re: Re: [coldbox:25650] Coldbox 4+ IIS 8 on separate website & pool not working
From: "Shirak Avakian" <shirak...@gmail.com>
Date: 4/28/16 11:25 am
To: "ColdBox Platform" <col...@googlegroups.com>

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.

Shirak Avakian

unread,
Apr 28, 2016, 12:33:00 PM4/28/16
to col...@googlegroups.com
Unfortunately Lucee is not an option here, ACF does support per application mapping, I'm converting legacy code to ColdBox for first time. I'm keeping my fingers crossed

You received this message because you are subscribed to a topic in the Google Groups "ColdBox Platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/coldbox/9-WwrKmtJUI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to coldbox+u...@googlegroups.com.

To post to this group, send email to col...@googlegroups.com.

Sandi Schleicher

unread,
Sep 6, 2018, 4:33:10 AM9/6/18
to ColdBox Platform
We were having a similar but different problem with two separate domains hosted on the same server.  Coldbox is setup to run for domain A but not for domain B.  Coldbox is in a sub-directory of the webroot for domain A.

It seems an old mapping for "\" in the CFIDE was causing some urls on domain B to get handled by domain A's coldbox instance.  Luckily there was nothing which depended on the "\" mapping and we were able to remove it.  That fixed our problem too.

So, if you are having problems with coldbox crossing domains or not working in the proper domain (per this original thread), I STRONGLY suggest you look for a mapping of "\" in your CF admin console.

Sandi
Reply all
Reply to author
Forward
0 new messages