-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Add API to System.Web adapters to enable explicitly mapping Blazor pages #46170
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
Comments
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
A) match the name and parameters of the .NET 8 API and then exclude the SystemWeb version for the .NET 8 TFM. This allows a silent swap. Too much magic? |
These APIs shouldn't be added to the System.Web adapters repository. We can ship docs that users can use for now and add these in .NET 8 in the right place. |
@davidfowl Delivering this support in .NET 8 is certainly the plan. But .NET 8 won't ship for almost a year. To enable incremental migration to Blazor sooner we'd like to deliver this API as part of the System.Web Adapters and then transition users to the .NET 8 API once it is released. |
Then it would need to be exposed as a flag instead of an API within the System.Web adapters instead of an API |
We've decided to just add docs for migration that will include a working snippet instead and point people to the .NET 8 API when available. @davidfowl out of curiosity what do you mean by "exposed as a flag"? |
I was just saying that if we wanted to expose this feature in the System.Web.Adapters that we woud not expose it as a top level API call, instead that would be internal and there would be a top level flag that could enable or disable the mapping blazor pages. That would allow us to keep the flag and change the underlying implementation without exposing these APIs from the wrong place. |
@davidfowl, @twsouthwick it's not clear whether there is still any work you need from Blazor as part of this issue or not? If not, can you please close this? Thanks! |
I think this is still valuable to add to the framework. |
@davidfowl agree it should be in .NET 8. I chatted with @javiercn and he is planning on doing that and I'm assuming will drive any API changes |
Background and Motivation
We created a set of adapters and guidance (https://github.com/dotnet/systemweb-adapters) to simplify the migration process from ASP.NET to ASP.NET Core. As part of this, we have recommended people set up a ASP.NET Core application that will attempt to serve requests and fallback to the original ASP.NET framework application via YARP. This works well for many things, but it fails when trying to use Blazor. This is because currently both Blazor and YARP are fallback endpoints and this conflicts with each other.
See #42003 for an existing issue on dotnet/aspnetcore that is tracking the need for this.
Proposed API
For the dotnet/systemweb-adapters, I have implemented an extension method that will accomplish this need. However, as this is a feature planned for .NET 8, I want to ensure we have identified a few things:
Here is the public API for this that we are currently exposing on the Microsoft.AspNetCore.SystemWebAdapters package:
Usage Examples
An example usage would be:
Risks
The text was updated successfully, but these errors were encountered: