@Xecrets Hello! It seems like you were having trouble with a Node.js app in Azure Windows App Service with iisnode that was entering a redirect loop. I'm glad to hear that you were able to identify the root cause of the issue and find a workaround. It sounds like the problem was related to a change in Next.js 13 App routing, which caused the server to not start properly with iisnode. While Next.js may not support IIS as well as other frameworks like Nuxt.js, it is still possible to run Next.js on IIS with some effort. If you have any further questions or concerns, please don't hesitate to ask.
nodejs app in azure windows app service with iisnode enters redirect loop

After successful deploy, no code changes, the service only responds to requests handled by IIS directly, such as static .txt files. When attempting to access the site proper, the site responds with a redirect to pipe/d63ddeca-6078-4eee-bde1-d98e830f0efc, which in turn responds with an additional redirect to pipe/d63ddeca-6078-4eee-bde1-d98e830f0efc/pipe/d63ddeca-6078-4eee-bde1-d98e830f0efc etc ad inifinitum, i.e. a redirect loop, until the server says stop because the URL is too long.
It seems to be something internal to Azure is broken, but I can find no logs that says any more than what I say above. I have verified the web.config (also unchanged when the issue appeared). There is essentially little or no traffic, so it's unlikely to be a case of too many requests for node. I've checked quotas, logs, and also temporarily upgraded to S1 (it's a test site running in F1 normally), with the same problem.
Azure App Service
1 answer
Sort by: Most helpful
-
brtrach-MSFT 17,731 Reputation points Microsoft Employee Moderator
2023-09-01T02:09:51.18+00:00