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

Set relative path on Blazor server application

$
0
0

I created a Blazer Server application which works fine on local host when testing from Visual Studio 2022. Now I deployed it to IIS 7 as an app within another application (path The website has a couple of applications that were developed in Blazor as well, but on .Net 6.0/ 7.0 Now I upgraded to 8.07 and after deploying the application to IIS it starts and runs, but some resources are not loaded and the application is not interactive.

Console Error

The program.cs file has the directions below - based on the application template from DevExpress. I added app.MapBlazorHub(); as in another application that runs successfully as app within a site, but that does not work in this case. When I deploy the application in the root, the CSS is loaded correctly,but the application still is not

app.UseHttpsRedirection();app.UseStaticFiles();app.UseAntiforgery();app.MapRazorComponents<App>()    .AddInteractiveServerRenderMode();app.Run();

2]2

When I put the application into the root of the site it works fine - where do I need to set the path to relative for all resources? Before the recent upgrade of the libraries of DevExpress and MS .net I never had to explicitly refer to an application path - I would deploy a new development to any app root I chose at the time of deployment.


Viewing all articles
Browse latest Browse all 4839

Trending Articles