Saturday, June 16, 2007

Changing From CF8 to CF7 on the Fly with IIS

Hello again, this is a follow up to my previous post on installing CF8 on an Existing CF7 Multi Server Setup. After you implement your CF8 site and CF7 site with the "Web Server Configuration Tool", open up your IIS Manager and right click on each of the sites to open up their properties (click on sample picture below).

Once you have both sites up click on the "Home Directory" tab, go to the bottom of the panel and click on the "Configuration" button to open up the Application Settings for each site (click on sample picture below).

As you will notice in the pictures (or your own properties panel - if following along), in the Application extensions on both sites all file extensions will point to the jrun_iis6.dll in your JRun\lib\wsconfig folder. But if you notice in the bottom section for Wildcard application maps, each site will point to a separate subfolder inside your JRun\lib\wsconfig folder. Basing this on my images, my CF7 server points to 1\jrun_iis6_wildcard.dll and my CF8 server points to 2\jrun_iis6_wildcard.dll, yours may look different, if you have configured more sites.

This was something I figured out just by trying it, but if you click on Edit and change this values from 1 to 2 or vice-versa on these servers, you will automatically change what CF engine it is using. One more thing, you don't even have to restart the webserver, just make the change, OK your way out and refresh your browser and Bam! Change Done! I tested this using a simple <cfdump var="#server#" /> to see the changes.

Anyways, I though this was pretty cool if you want to jump back and forth between versions. Alternatively, you can just create 2 IIS sites that point to the same directory, with one using 7 and the other using 8 and either use host headers or different IPs to differentiate. That is how I have it setup but I still wanted to share this little simple trick I figured out.

Until next time...

Post a Comment