Triage and Remediation
Remediation
Using Console
Using Console
To remediate the issue of an App Service not using the latest programming language version in AZURE, you can follow the below steps using the AZURE console:
- Log in to the AZURE portal (https://portal.azure.com/).
- Navigate to the App Service that needs to be updated.
- Click on the “Configuration” option from the left-hand menu.
- Scroll down to the “General settings” section and locate the “Stack settings” option.
- Click on the “Stack settings” option and select the latest version of the programming language from the dropdown list.
- Click on the “Save” button to apply the changes.
- Restart the App Service to ensure that the changes take effect.
- Verify that the App Service is now using the latest version of the programming language by checking the application logs.
Using CLI
Using CLI
To remediate the issue of App Service not using the latest programming language version on Azure using Azure CLI, you can follow the below steps:Replace This will show the current runtime stack version of the web app.By following these steps, you can remediate the issue of App Service not using the latest programming language version on Azure using Azure CLI.
- Open the Azure CLI on your local machine or Azure Cloud Shell.
- Run the following command to set the subscription where the App Service is located:
- Run the following command to list all the web apps in the subscription:
- Identify the web app that has the outdated programming language version and note down its name.
- Run the following command to update the web app’s runtime stack version:
<app_name>
with the name of the web app identified in step 4 and <resource_group_name>
with the name of the resource group where the web app is located.-
Replace
<runtime_stack>
with the name of the runtime stack that you want to use (e.g., “PHP”, “Python”, “Node”, etc.) and<version>
with the latest version of the runtime stack. - Run the following command to verify that the web app is now using the latest programming language version:
Using Python
Using Python
To remediate the issue of an App Service not using the latest programming language version for Python in Azure, you can follow these steps:
- Log in to the Azure portal and navigate to the App Service that is using an outdated version of Python.
- Click on the “Configuration” tab in the left-hand menu.
- Scroll down to the “General settings” section and locate the “Python version” setting.
- Check the current version of Python that is being used by the App Service.
- If the current version is outdated, select the latest version of Python from the drop-down menu.
- Click on the “Save” button to apply the changes.
- Once the changes are saved, restart the App Service to ensure that the latest version of Python is being used.
- To verify that the latest version of Python is being used, you can navigate to the “Advanced Tools” section in the left-hand menu and open the “Debug Console” tab.
- In the Debug Console, navigate to the “site” directory and open the “wwwroot” folder.
- Create a new file named “test.py” and add the following code:
- Save the file and navigate to https://your_app_service_name.azurewebsites.net/test.py in a web browser.
- The output should display the version of Python that is being used by the App Service. If the latest version is displayed, then the remediation process is complete.