2
votes

I'm trying to get an Azure Web App deployment working via Release Manager in VSTS. I know we had this in project.json prior to the migration to MSBuild for dotnet core 1.1:

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final"
  },

  "scripts": {
    "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
  }

Currently I'm using something like: dotnet publish --framework netcoreapp1.1 -c 'Release' -o 'C:\output'

The web.config produced has:

<aspNetCore processPath="dotnet" arugments=".\MyApp.Web.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />

However, when this is deployed via Kudu to the Azure Web App, I receive an "HTTP 502.5 - Process Failure" exception from IIS. I assume this is because IIS does not understand this processPath. Locally I run exclusively through Kestrel because I've got other devs not working on Windows machines.

Do I need to target the full .NET Framework on builds for deployment or is there something I'm missing to allow IIS running in Azure Web Apps to host a dotnet core 1.1 app?

1

1 Answers

2
votes

Make sure you are using "Microsoft.NET.Sdk.Web".

<Project Sdk="Microsoft.NET.Sdk.Web">
   <PropertyGroup>
      <TargetFramework>netcoreapp1.1</TargetFramework>
   </PropertyGroup>
</Project>

This should automatically take care of the IIS publishing step. If you are running into errors, try opening an issue on https://github.com/aspnet/websdk.