79491012

Date: 2025-03-07 00:58:16
Score: 0.5
Natty:
Report link

I have a thought - can it be deploy Blazor and Web Api on the same host problem? To deploy both applications on the same host I copy wwwroot directory from Blazor's publish directory to WebApi's publish directory. Also I add

app.UseStaticFiles();app.MapFallbackToFile("index.html");

lines to the WebApi's Program.cs file.

But in the Blazor's publish directory, there are 3 files besides the wwwroot directory.

BlazorFrontEnd.staticwebassets.endpoints.json

emcc-props.json

web.config

I tried to add 2 first files to the host and added web.config Blazor's instructions to the existing (WebApi) web.config.

After this, I got the error:

Failed to load config file ./blazor.boot.json SyntaxError: Failed to execute 'json' on 'Response': Unexpected end of JSON input SyntaxError: Unexpected end of JSON input

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: max