We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I change my base href in index.html: was href="/" has become href="/schedule/"
index.html
href="/"
href="/schedule/"
Also i change Configure:
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/
The text was updated successfully, but these errors were encountered:
At the very least, you'd need to move your UseBlazor call into a block like:
UseBlazor
app.Map("/schedule", subdirApp => { subdirApp.UseBlazor<Startup>(); });
... so that the UseBlazor middleware is operating within the new root.
There might be more as well - I'm not in a position to actually test this right now. However you can find a working example of a Blazor app hosted in a subdirectory at https://github.com/aspnet/Blazor/blob/master/test/testapps/TestServer/Startup.cs#L41
Sorry, something went wrong.
@SteveSandersonMS Thank you, very much!
No branches or pull requests
I change my base href in
index.html
: washref="/"
has becomehref="/schedule/"
Also i change
Configure
:Here located my files
css, js, resources work good, but _framework which includes wasm files and doesn't work correct.
index.html:
When I start my app, I get error
When i use
href="/"
, all is correctWhat 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/
The text was updated successfully, but these errors were encountered: