Lucee REST on Windows

Just wondering if anyone has the magic bullet to get Lucee Vanilla REST working on IIS.

Would be great to add to docs in windows installation docs.

I can get it working easily direct to port 8888, but when it passes thorugh IIS it no longer passes the output. Anyone have a step by step answer to this?

  • i’m guessing websockets could be same issue - assuming something with reverse proxy, but that’s another question, but could be relevant

  • Note No I don’t want to use any other framework to do this, please don’t suggest frameworks as they are unnecessary… .just need a simple solution.

turns out it was just a quick tweak to the handlers and I was away… tried this before, but this time seems to have worked:

  1. Copy Boncode string from another Lucee handler type field
  2. Create a new ‘managed handler’ for site (or server)
  3. Set Request path to “rest/*”
  4. Set Type to same as other combat handlers (copy it) eg: "BonCodeIIS.BonCodeCallHandler,BonCodeIIS,Version=,Culture=neutral,PublicKeyToken=… "
  5. Set name to “BonCode-Tomcat-REST-Handler”
  6. Click ‘Request Restrictions’ and UNTICK “invoke handler only if erquest is mapped to:”
  7. Hit Ok… have a REST… #lol

Thanks @dawesi for taking the time to post the solution to your own question. I came here to answer this after getting the email notification, but you already took care of it. =)


+1 thanks for the step by step and escpecially how to get the boncode string. It isnt present in drop down and had me confused for a bit

May I suggest for anyone finding this who (like me) is new to IIS config, to add a few more details to the above instructions:

Add step -1:
-1. Open the IIS Manager Application and find the “Handler Mappings” item.

Change step 0:
0. Edit the “BonCode-Tomcat-CFM-Handler” item, copy the “Handler” value, and close it.

I gather (tell me if I’m wrong) that these mappings just tell IIS that when someone tries to request a page with a certain pattern, point it to a certain handler program. Files in the site root with the cfm, cfc and jsp extensions are probably already pointed to Lucee, so you are just saying to do the same for any file under the rest/* subfolder.

@fss welcome to our community!

Your assumption is correct.

Also, I’ve noted this stuff about REST as a to do’s on my list for contributions last month, because Lucee docs still lacks about the REST setup. Just hadn’t the time to do it. There is a good video about setting it up from Micha, but it doesn’t show how to connect IIS to Lucee’s rest service.