GET https://management.azure.com/providers/Microsoft.Web/webAppStacks?stackOsType=Windows&api-version=2024-04-01
Response From that API:
displayText value minorVersions
----------- ----- -------------
.NET 9 (STS) dotnet9 {@{displayText=.NET 9 (STS); value=9; stackSettings=}}
.NET 8 (LTS) dotnet8 {@{displayText=.NET 8 (LTS); value=8; stackSettings=}}
.NET 7 (STS) dotnet7 {@{displayText=.NET 7 (STS); value=7; stackSettings=}}
.NET 6 dotnet6 {@{displayText=.NET 6 (LTS); value=6; stackSettings=}}
.NET 5 dotnet5 {@{displayText=.NET 5; value=5; stackSettings=}}
.NET Core 3 dotnetcore3 {@{displayText=.NET Core 3.1 (LTS); value=3.1; stac...
.NET Core 2 dotnetcore2 {@{displayText=.NET Core 2.2; value=2.2; stackSetti...
.NET Core 1 dotnetcore1 {@{displayText=.NET Core 1.1; value=1.1; stackSetti...
ASP.NET V4 aspdotnetv4 {@{displayText=ASP.NET V4.8; value=v4.8; stackSetti...
ASP.NET V3 aspdotnetv3 {@{displayText=ASP.NET V3.5; value=v3.5; stackSetti...
From API Response I am able to see .NET 6 Version and older versions also.
Please I need help to understand this differences
What is the approach to create WebApp with Runtime Stack .NET 6.
is it good to stay with .NET 6 Instead of latest LTS .NET 8 ?
First of all I would recommend to always go to the latest LTS version which would mean .NET 8 in your case. With the latest LTS you can be sure to have the latest stable features and security.
But if you want to stick with an older version and want to create a new webapp you have to use the Azure CLI or the Azure PowerShell which is described here.
The official docs to create a web app can be found here:
But unfortunately is .NET 6 no longer supported which can be seen when you execute the following Azure CLI command
az webapp list-runtimes
If you try to use an unsupported version you get an error that your runtime is not supported.
The only way to run .NET 6 on a web app is to host containers on your web app. But I would not recommend to use that way because .NET 6 is no longer supported by Microsoft and you don't want to use unsupported versions which are also open to the internet --> Can be a security risk.