Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4844

Blazor Hosted WebAssembly subpath (base-href) not working with some nuget packages

$
0
0

I have a Blazor Hosted WebAssembly which means that I have three projects, the Client, the Server and the Shared. The inter-communication happens with web-apis.

On the Client, into index.html I have the following:

<base href="/app/" />

On the Client, into Clientn.csproj I have the following:

<StaticWebAssetBasePath>app</StaticWebAssetBasePath>

On the Server, into program.cs I have the following:

app.UseBlazorFrameworkFiles("/app");app.UseStaticFiles();app.UsePathBase("/app");app.MapFallbackToFile("/app" +"/" +"index.html");

With those settings the application starts and loading but it fails to load two packages:

Blazored.ModalBlazored.TextEditor

These two packages are trying to find resources into /app/_content but the resources are not there.enter image description here

enter image description here

When the application is running without a subpath it works normallyenter image description here

Any ideas?


Viewing all articles
Browse latest Browse all 4844

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>