Multisite Azure Application Gateway App Service MVC configuration issue - 502 error

Lance Keay asked on November 6, 2018 14:52

We have a MVC Kentico 11 MVC site. It hosts multiple websites. We are trying to set up an Azure Application Gateway that points to two App Services, one MVC, one for Kentico admin.

So far I have the Kentico admin working properly - multiple domains can all access the CMSDesk via the Application Gateway. However, the MVC site is problematic. I can only get the default domain for the App Service to work. All other domains show a 502 error.

I'm thinking that the 'default' domain of the App Service works properly because the Application Gateway isn't forwarding the domain properly to the App Service, but I don't know how to verify this. And it's just my latest theory.

It seems that the "502 - Web server received an invalid response while acting as a gateway or proxy server" message is served up by the Application Gateway for any 5.xx error generated by the App Service, essentially hiding details of any Server Errors issues that may arise. eg: The Kentico license error generates a 503 that is preseneted as a problem with this module: "PageHandlerFactory-Integrated-4.0", rather than the obvious 'invalid license' screen that you normally see when Kentico is hosted on a normal server.

Does anyone have any tricks or tips to help me get this working?

Recent Answers


Lance Keay answered on November 7, 2018 15:05

FYI - I've also opened a StackOverflow question for this: https://stackoverflow.com/questions/53187048/kentico-multisite-azure-application-gateway-app-service-mvc-configuration-issue

It'd be nice from someone on the dev team to explain why a 503 error is used for the licensing fail, and how to get around the Application Gateway limitiation in that it does not forward on requests with HTTP status codes >399.

0 votesVote for this answer Mark as a Correct answer

Mananu Gunawardana answered on February 7, 2019 18:44

Where you able to get this resolved. Does Kentico work well behind the Application gateway?

0 votesVote for this answer Mark as a Correct answer

Aleksey Vekla answered on February 8, 2019 00:50 (last edited on February 8, 2019 00:53)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.