-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
As described in #17334
WASM Blazor apps have an issue with routing paths with 'dots' in them.
This is not a problem with Blazor itself though as it handles 'dots' in routes just fine, but it is a problem with the Kestrel server when running in Visual Studio locally. There is no way to change the rewrite rules with Kestrel that I can see.
If you write a simple web.config with rewrite rules, you can get around this limitation of Kestrel by using IIS Express profile.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to Single Page">
<match url="^fetchdata/.*" />
<action type="Rewrite" url="/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</location>
</configuration>You can also get around this issue in Azure static apps with a config file.
Describe the solution you'd like
I would like to be able to configure the WebHost run when debugging a client side Blazor WASM so that I can use 'dots' in URL's.
Additional context
No response
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components