[coldbox:25639] Coldbox 4+ IIS 8 on separate website & pool not working

If you remove your / mapping and dump out expandPath( “/” ) what do you get?

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

Brad,
I did dump out expandPath( “/” ) after removing the mapping and I got c:\inetpub\wwwroot\

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: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

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

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

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

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.

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

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

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.

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 :slight_smile:

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.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

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