How to detect what runtime is used for old Win app service based on CLI output only (az webapp config show)

Yuval Grinberg 81 Reputation points
2023-03-30T07:43:48.1133333+00:00

Hi,

When running 'az webapp config show' cli command on some old Win app services, the following both fields are populated:

  • phpVersion
  • netFrameworkVersion

I'm familiar with the fact that PHP windows app services are not supported anymore.

But for existing old win apps, in a case that both of those fields are populated - how can I determine what runtime is used for the web app?

Moreover, I know that netFrameworkVersion field is always being populated by default for every App service - which make it more difficult to detect if this is a value is by default or this app actually uses dotNet runtime.

Best Regards,

Yuval Grinberg

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,865 questions
{count} votes

Accepted answer
  1. ajkuma 22,401 Reputation points Microsoft Employee
    2023-04-04T11:42:40.6033333+00:00

    @Yuval Grinberg , Thank you for posting this good question.

    I understand you want to detect the runtime used via CLI (az webapp config show) only, would like to better understand your use-case and CLI only approach.

    How to detect what runtime is used for old Win app service based on CLI output only (az webapp config show).

    Just to highlight**,** phpVersion and netFrameworkVersion fields are populated for an Azure Web App, it means that the Web App is configured to support both PHP and .NET Framework.

    To determine which runtime is being used by the Web App, you can check the Handler Mappings section in the Configuration blade of the Web App in the Azure portal. This section lists the handlers that are configured for the Web App, including the handler for PHP and the handler for .NET Framework.

    Just as an example:

    If the Web App is using PHP, the Handler Mappings section should include a handler for PHP, such as FastCGI for PHP. If the Web App is using .NET Framework, the Handler Mappings section should include a handler for ASP.NET, such as ASPX-ISAPI-2.0.

    Regarding the netFrameworkVersion field, you are correct that it is always populated by default for every App Service. However, if the Web App is using .NET Framework, the netFrameworkVersion field should be set to the version of .NET Framework that the Web App is using, such as v4.0. If the netFrameworkVersion field is set to v2.0 or v3.5, it may indicate that the Web App is using an older version of .NET Framework.

    See #configure-handler-mappings

    Please let us know, I'll follow-up shortly.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful