-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Description
I change my base href in index.html: was href="/" has become href="/schedule/"
Also i change Configure:
app.UseStaticFiles();
app.UseStaticFiles(new StaticFileOptions()
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(),@"Schedule.Client", @"dist")),
RequestPath = new PathString("/schedule")
});
Here located my files
css, js, resources work good, but _framework which includes wasm files and doesn't work correct.
index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width">
<title>Schedule</title>
<link rel="icon" href="css/Resources/icon_title.png" />
<base href="/schedule/" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" crossorigin="anonymous">
<link href="css/site.css" rel="stylesheet" />
<link href="css/btnstyle.css" rel="stylesheet" />
<script src="js/SetScroll.js"></script>
</head>
<body>
<app>
<div id="demo" style="margin:auto; top:30px;">
<img src="css/Resources/logo-fin.png" />
<div class="circle fas fa-spinner"></div>
</div>
</app>
<script src="_framework/blazor.webassembly.js"></script>
<script defer src="https://use.fontawesome.com/releases/v5.2.0/js/all.js" crossorigin="anonymous"></script>
</body>
</html>
When I start my app, I get error
When i use href="/", all is correct
What could be wrong?
Thanks!
Update
I have found the same problem and solution, but there is used a Azure CLI:
https://anthonychu.ca/post/blazor-azure-storage-static-websites/
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components


