Skip to content

Visual Studio Publish command creates corrupt web.config when publishing to an Azure VM #16181

@masonwheeler

Description

@masonwheeler

Repro steps:

  1. Set up an Azure VM running Windows (not an Azure web app instance--this might work as well, but this is the way I know will work)
  2. Configure IIS on the VM, including installing the rewrite module, and follow all other steps necessary to prepare it to receive web updates via Visual Studio's Publish command. Also install the .Net Core Preview version Blazor needs.
  3. Create a Blazor project in Visual Studio.
  4. Use Visual Studio's Publish command to publish the Blazor project to your Azure VM
  5. Use your browser to attempt to access the Blazor project from your dev PC.

Expected: The project loads in your browser
Observed: IIS 500 error page

Publish is screwing up here, by publishing a web.config (or is it config.web? I'm not at the relevant computer at the moment) file that tries to treat the Blazor project as an ASP.Net server project, rather than as static content that's intended to run in the browser. (After deleting the relevant lines from the config file, I was able to get it working.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions