Pete,

Make sure the APPLICATION NAME  (this.name declared at the top along with
the session stuff and timeouts etc.) is different for each domain. This can
be done by using the URL itself as the application name. If the names are
different then each "site" will be it's own application with it's own scope
(and hence it's own application.applicationname

-Mark


Mark A. Kruger, MCSE, CFG
(402) 408-3733 ext 105
Skype: markakruger
www.cfwebtools.com
www.coldfusionmuse.com
www.necfug.com



-----Original Message-----
From: Pete Ruckelshaus [mailto:[email protected]] 
Sent: Tuesday, February 08, 2011 7:16 PM
To: cf-talk
Subject: Multiple applications with a single codebase issues


I'm having a bit of an issue here.

Over time, I have developed a CF web-based content management system (hey,
who hasn't?).  The software is currently running a handful of sites, all on
different web hosts.  It works fine in this mode.

Recently, I realized that I could get a VPS for less money than the several
web hosting accounts I'm using; this would have the added benefit of
allowing me to update the core software in one location rather than in
several.

I have it set up so that IIS sees the root directory of the CMS software as
each web sites' root, and then I set up a virtual directory to the
site-specific content for each domain.  For instance,
c:\inetpub\wwwroot\app\core is set as the root directory; in it, I have an
application.cfc file that sets up variables, security, etc.  For
site-specific stuff in the application.cfc, I am including a file that sets
the app name, etc. before the onApplicationStart() runs.

I then have the site-specific stuff (templates, config files, etc.) in
separate directory paths, each set up mapped to /site as virtual directories
for their respective web sites.

The problem I am having is that application.applicationname is being set to
whatever site loads first; i.e., I have SiteA and SiteB set up in IIS,
restart CF, and if I load SiteB first, then SiteA has SiteB's
application.applicationname value.

This is a problem.

Has anyone here tried to do this and succeeded?  Or do I need to rethink how
I have this site architected?

Thanks,

Pete




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342028
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to