Multi mode context settings not working in Lucee 6 on Windows 11 IIS

OS: Windows 11 Pro
Java Version: 21.0.6 (Eclipse Adoptium) 64bit
Tomcat Version: Apache Tomcat/10.1.36
Lucee Version: 6.2.0.321
Web Server: IIS

Last year, I posted about an issue I was having with Multi Mode when upgrading from 5.4 to 6 ( Attempting to Update Lucee from 5.4.3.2 or 5.4.5.23 to 6.0.1.83 results in error - support - Lucee Dev ). With the impending end to LTS for 5.4 at the end of the year, I had to tackle this again, and, again, I am facing the same problem I was at the end of that post: context settings not getting saved. In order to troubleshoot this, I did a fresh install of Windows 11 and a fresh install of IIS & Lucee 6 (no 5.4 involved). The problem remains. Here are the steps I took:

  1. Installed Windows
  2. Installed IIS
  3. Installed Lucee 6.2.0.321
  4. Visited http://127.0.0.1:8888/index.cfm (welcome page worked fine)
  5. Visited IIS default local site (The Lucee welcome page initially errored out, but replacing it with basic cfoutput of Now() proved Lucee was connected.)
  6. Opened Lucee admin
  7. Switched to Multi Mode
  8. Added “C:\inetpub\wwwroot” individual context for IIS default local site
  9. Made changes
  10. Saved changes
  11. Reopened individual context settings: No changes saved
  12. Restarted Lucee
  13. Visited IIS default local site to trigger Lucee admin to recognize the context

Result: Configured context no longer listed under “specific web contexts”, but had returned to “create new web context” drop down.

It appears as though, even on a fresh install, Lucee isn’t saving individual context settings. Other oddities I’ve noted:

All changes are saved to “C:\lucee\tomcat\lucee-server\context.CFConfig.json”, but the admin doesn’t display or enforce them.

The default Lucee welcome page did eventually load via IIS, but gave this message: “Warning, if you can see this message, your webserver webroot is not mapped to [C:\inetpub\wwwroot]. This means Lucee is only configured to handle .cfm and .cfc and other files like css, js and images won’t load properly.” This happened regardless of whether or not I had defined that context, but I think that’s more about assets not being copied alongside the index.cfm than a context configuration issue.

If I change the General context settings, those settings will be applied to any new specific context that I create. Security settings made this way will be enforced in the specific context, even if the General context setting is changed, but they cannot be modified. Restarting Lucee resets enforcement to whatever the General context is set to. So, it appears to acknowledge the context, without allowing further modifications, but only until a service restart.

If I switch the General context to “Local” and add an external folder, it will also automatically add C:\Lucee\tomcat\Lucee-server\context\temp.

Is no one else running into this?

I can’t dig into all your questions, but:

Not loading static files through a fronted web server is well know and default behavior, what has nothing to do with web contexts, its simply that only .cfc/.cfm files are redirected to Tomcat and static files not. You need to add the web app root that is served by Tomcat to be served also by IIS as well, otherwise IIS won’t know from where to get those static files. It will look for those in the iIS webroot, where they are not placed.

Makes sense. Having originally come from the world of ACF where the IIS connector makes all those virtual directories for the user, I wasn’t sure if this was an error in the Lucee IIS connector, or just an assumption that the user would be the one to take care of that.