rylek90 rylek90 - 10 months ago 209
ASP.NET (C#) Question

Configuration of ASP.NET Core 1.0 web Kestrel application on Azure

I am trying to deploy aspnetcore application through git on Azure. I've done everything directly as shown in https://docs.asp.net/en/latest/tutorials/your-first-mac-aspnet.html

Later on I even follow steps defined in Problems with deploy ASP.NET 5 (ASP.NET Core) app to Azure and deployed plain project from https://github.com/bigfont/WebNotWar
In both cases everything I've got is only a message

You do not have permission to view this directory or page..

When I try to access any controller the response is

The resource you are looking for has been removed, had its name
changed, or is temporarily unavailable.

I am pretty sure the deployment itself is fine because I've tried to break a code and it has reacted properly.


Azure App Service no longer supports pre-RTM ASP.NET Core

...ASP.NET 5, Core RC1 or RC2 is no longer supported on Azure App Service. The only supported ASP.NET Core stack is RTM on Azure App Service. (emphasis added).

Existing RC1 apps currently continue to work. If we deployed an ASP.NET Core RC1 application to an Azure App Service before Azure dropped support, then that application will continue to work and so will its continuous deployment.

ASP.NET Core IIS integration has changed

Changes to web.config

The ASP.NET Core Module has replaced the HttpPlatformHandler.

<?xml version="1.0" encoding="utf-8"?>

    // Use the ASP.NET Core Module
      <add name="aspNetCore" path="*" verb="*"
        modules="AspNetCoreModule" resourceType="Unspecified" />
    <aspNetCore processPath="..\MySite.exe" arguments="" 
      stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout" />

    // Remove the HTTP Platform Handler
    // <handlers>
    //   <add name="httpPlatformHandler" path="*" verb="*"
    //     modules="httpPlatformHandler" resourceType="Unspecified"/>
    // </handlers>
    // <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%"
    //   stdoutLogEnabled="false" startupTimeLimit="3600" />


Changes to Startup

public void Configure(IApplicationBuilder app)
    // Remove call to app.UseIISPlatformHandler(); 
    // Remove call to app.UseForwardedHeaders(); 
    // Both are handled by UseIISIntegration in Main.

public static void Main(string[] args)
    var host = new WebHostBuilder()
        .UseIISIntegration() // Replace UseIISPlatformHandlerUrl()