Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

publish in IIS with Development Variable #79

@Kingside88

Description

@Kingside88

I try many days to publish my application to IIS but get everytime this error:

"InvalidOperationException: The SPA default page middleware could not return the default page '/index.html' because it was not found, and no other middleware handled the request."

  • The "ASPNETCORE_ENVIRONMENT" is set to "Development".
  • As SSL Certificate I use the "IIS Express Development Certificate"
  • I tried to remove this part in the vue.config.js "devServer: {
    https: {
    [keys....]
    }
    } "
    and to recreate with mkcert.
    But nothing helps. I get this error.
    When I try to run the same application from visual studio, everything works well. I don't want to run the application as compiled in "dist" folder, but as development.

Here is my startup.cs:
endpoints.MapToVueCliProxy( pattern: "en/{*path}", options: new SpaOptions { SourcePath = "ClientApp" }, npmScript: (System.Diagnostics.Debugger.IsAttached) ? "serve" : null, port: 8080, https: true, runner: ScriptRunnerType.Npm, regex: "Compiled successfully", forceKill: true //wsl: false );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions