0

I am creating an Azure Web App via Bicep to host an ASP.NET Core 7.0 Website. My Bicep contains:

    netFrameworkVersion:  'v7.0'
    requestTracingEnabled: true
    remoteDebuggingEnabled: true
    remoteDebuggingVersion: 'VS2022'
    httpLoggingEnabled: true
    use32BitWorkerProcess: false
    ftpsState: 'FtpsOnly'
    managedPipelineMode: 'Integrated'

But when I deploy the Bicep it is not being set to .NET 7 and the settings look like below:

enter image description here

I found some posts on SO that suggests some solution for metadata but I am not sure how and if this solution apply to .NET 7.

Are you aware of any missing setting that I need to add to have this set to the picture below:

enter image description here

Adam
  • 3,872
  • 6
  • 36
  • 66
  • are you using windows or linux app service plan ? the solution using specific metadatas should work for net7 as well, give it a try tbh. – Thomas Jan 16 '23 at 20:55
  • Windows. I have added this: resource website_config_metadata 'Microsoft.Web/sites/config@2022-03-01' = { name: 'metadata' parent: website properties: { CURRENT_STACK : 'dotnet' } } And it worked! – Adam Jan 16 '23 at 21:18

1 Answers1

1

If you want to deploy Linux web app, use linuxFxVersion parameter:

linuxFxVersion: 'DOTNETCORE|7.0'

For windows deployment, use the following parameters:

metadata :[
        {
          name:'CURRENT_STACK'
          value:'dotnet'
        }
      ]
netFrameworkVersion:'v7.0'

Full bicep available in this question

Nikita
  • 61
  • 8