I inherited a HIPAA-secure web app built in C# MVC running on IIS (8.5.9600.16384) on a Windows Server 2012 R2, which is actually a virtual server hosted with Microsoft Azure. I have been tasked with rewriting portions of it in Lucee. Getting a port opened to TomCat is going to be a mission, so I decided to just place my Lucee site directory in C:\inetput\wwwroot\MyProductionSite\Lucee. It was running just fine yesterday, but when I woke up this morning, everything was working differently than the day before. When I use the Firefox dev inspector, I am seeing many error 302 being displayed, which is apparently due to IIS doing some kind of redirect. How do I fix this?
This is your application issue, not a lucee issue.
My suggestion is go look at your 302 errors, more than likely it was some dynamically created object now not being created due to some other code change.
Additionally to “debug” if you can access the objects via port 8888 or port 8080 depending on how you setup Lucee with Tomcat, it could be an indicator with your Vhost connector in IIS.
I respectfully disagree. It was working fine yesterday at end of day. This morning, nothing is working. I have a header.cfm file that contains the following:
The image below shows the 302 error details for the w3b.css file shown in the above.
The Location of the Response Headers is from the production MVC site.
Additionally, I didn’t do any Setup with Tomcat at all. My initial installation was with the IIS Connector. If I am using IIS, do I still need to do any configuration with Tomcat?
OK…all of a sudden, everything is working fine again, and I made no changes at all.
I would still like to know what could be causing this in case it happens again.
Well, this morning, it is happening again. I love IIS!
Look at your maxContexts settings in tomcat and pool time out settings in IIS.
The Lucee web-site is still under development, so it has zero load unless I am using it. I will check what you suggest though.
Ugh. This sounds like a hairy and annoying issue. You’d need to track the request from when it comes into your system through the different pieces (IIS initial hit, to the handers, then into Tomcat/Lucee) and see which piece (I call them “gears”) is tossing back the 301. The fact that this happens seemingly randomly makes things super-annoying. Do you have your systems configured to auto-upgrade and reboot perhaps? I know with HIPAA there are availability requirements you are required to meet, so what are the other systems involved? Load balancers maybe? Maybe you’re hitting one system and not the other?
Just a crazy guess …
I see a redirect to some type of login page.
The redirect comes from a css-file request. The IIS-handler wouldn’t pass that css-file request to tomcat. So I’m pretty sure it is not coming from tomcat/Lucee. My guess: somewhere inside IIS or before the request gets there.
I can see ASP headers and ASP session-IDs also. Why is that? Are you hosting ASP and CF together?
Could it be, that you somehow are loosing the session (maybe an IIS
asp-session), and somewhere inside that IIS application it is logging you out, and you are being redirected with a 302 to the login page?