Azure App Service AlwaysOn Request - 401 Unauthorized

asked 2021-11-10T07:20:54.75+00:00
Cosmin Stirbu 146 Reputation points


I have an Azure App Service (a ASP.NET Core 5 Web API) that has Always On set to true.
I noticed however in the IIIS logs that the Always On request performed every 5 minutes on the root URL receives a 401 Unauthorized:

#Software: Microsoft Internet Information Services 8.0
#Fields: date time s-sitename cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2021-11-02 06:53:12 MY-API-DEV-APP GET / X-ARR-LOG-ID=fff28b17-7e6f-4150-ab1e-9fa594f283e8 80 - AlwaysOn ARRAffinity=a12d7eecbf2f9c32ace9bad91b055b759e4e2fdbe58b5717d0f872881913dfd0 - 401 71 2147500037 686 821 15

I believe this is a problem because I have notice "cold starts" now and then and I believe this is because the Always On request receives a 401.

The App Service has Azure Active Directory authentication / authorization integration enabled, however I would expect that the Always On requests performed by the load balancer to bypass authentication.

Thank you,

Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,302 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,560 questions
1 vote