-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
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
UsePathBase not working for Blazor Web App NET8 with individual accounts interactivity mode server #54723
Comments
Thanks for contacting us. It looks like you've missed to set the |
Only setting app.UsePathBase("/alternate"); works in .NET6,7,8 for blazor server. Anyways, i did test with setting base in app.razor as well. Steps to repro: This workes in blazor server for .NET6,7,8 2: 3: In browser navigate to the actual "correct" destination based on the config, i.e: http://localhost:5070/alternate
In summary i am unable to run the app on a sub path using the provided template and documentation. |
Hey @jsandv - did you happen to find a solution to this? |
I'm having the same problem mentioned by @jsandv. Any updates on? |
Is there an existing issue for this?
Describe the bug
I created a new Blazor Web App with global server interactivity and individual accounts template in Visual Studio (17.9.4).
I need to run with PathBase middleware working.
i.e
Expected Behavior
I should now be able to use an url like:
https://localhost:5001/site2 as if im on https://localhost:5001
and
https://localhost:5001/site2/counter as if im on https://localhost:5001/counter
Steps To Reproduce
No response
Exceptions (if any)
if i navigate to https://localhost:5001/site2/counter in chrome/edge, it only displays "Not Found" message. If i refresh really fast i can see that the actual page is initially loaded, then im served with the "Not found" after. My guess is that when the socket attaches the blazor router does not find "/site2/counter" in this mode.
.NET Version
.NET SDK (8.0.203)
Anything else?
No response
The text was updated successfully, but these errors were encountered: