0

I am deploying an azure webapp with the following settings:

resource functionAppName_web 'Microsoft.Web/sites/config@2021-03-01' = {
  parent: functionAppName
  name: 'web'
  properties: {
    http20Enabled: true
    use32BitWorkerProcess: false
    alwaysOn: false
    webSocketsEnabled: false
    minTlsVersion: '1.2'
    phpVersion: ''
    ftpsState: 'Disabled'
    windowsFxVersion: 'DOTNETCORE|8.0'
  }
}

As a result, the web app deployment shows a proper value in the Properties main section:

Properties section shows proper runtime stack Dotnetcore - 8.0

But if I navigate to 'Configuration (preview) > Stack settings' it is blank

Stack settings in configuration preview are blank

Does this have any impact in the runtime stack that is selected? Why is this not properly mapped? In theory 'DOTNETCORE|8.0' is the proper value for my .net8 webapp.

1 Answer 1

0

Assuming this is Web app on Windows plan you should set netFrameworkVersion to value v8.0 and metadata to [{ "name": "CURRENT_STACK", "value": "dotnet"}]. I do not think windowsFxVersion is used in that case and it should be empty string. Note that you mention web app but your code says function app so it is unclear which is it. If it is for function app the same value is for netFrameworkVersion but metadata property is not needed for functions.

Sign up to request clarification or add additional context in comments.

3 Comments

Hi Stanislav, thanks for your answer. The service is a web app even when the variable set in the bicep is called 'functionApp' as it came from previous versions of the bicep file, and you are right, it should be changed. I was using the windowsFxVersion because I was under the impression that the netFrameworkVersion was intended to be used in old .NET Framework based apps, not in .NET Core new apps. I'll try this solution, thanks!
My knowledge is netFrameworkVersion is used for Windows .net apps. For linux this is set via linuxFxVersion. As far as I know windowsFxVersion is used only if you run docker image for windows apps.
Note that even if the above code works with exception not showing the information in stack settings I am not sure if it is fully supported. The guidance I gave you should fix stack settings and set .net on windows app appropriately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.