Skip to content
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

The Blazor Web App template in .Net 8 RC2 does not offer equivalent functionality to the previous Blazor hosted WASM template #51281

Closed
AlbertoPa opened this issue Oct 11, 2023 · 8 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components Docs This issue tracks updating documentation ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@AlbertoPa
Copy link

AlbertoPa commented Oct 11, 2023

The Blazor Web App template shipped in .Net 8 RC2 does not provide equivalent functionality to the previous Blazor Hosted WASM template: no API is created to retrieve data from the server, leaving the configuration to the user, even if it is necessary in nearly any non-trivial application. The consequence of this is that no auth for the API is set up either, requiring a significant amount of work to just get started with a basic app with some form of auth. The scenario is also not currently documented.

In issue #49798 it was said that the hosted WASM template would have still been available, however, the RC2 release ( https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-rc-2/#blazor ) indicates to use the "Blazor Web App" template with "WebAssemly" interactivity mode. This does not lead to an equivalent configuration to the previous "Hosted Blazor WebAssembly" application.

Also, what discussed in issue #50433 (root level interactivity) addresses what requested in issue #49798 only in part.

I suggest adding an option generating an app with a configuration closer to what the Hosted Blazor WebAssembly used to offer.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Oct 11, 2023
@marinasundstrom
Copy link

Perhaps an option for generating sample controller and OpenAPI in combination with Interactive WebAssembly? With WeatherForecast being generated in the Client project.

Just wonder how complex the template will be, if to include it in the new Blazor app template.

@AlbertoPa
Copy link
Author

That would work, but I don't know about the complexity of the template with that addition.

@codemonkeh-dave
Copy link

I too am keen to see API controllers in the template with a client fetch example (especially the authenticated scenario). None of the new templates appear to create the typical WeatherForecastController example that we get in the .Net 7 templates and I have spent a number of hours trying to get it working to no avail.

I should be able to use cookie auth on both server side pages and api calls with the same authorize attribute.

If anyone knows of any examples ^^, it would be greatly appreciated! I genuinely love the new features coming and as a C# developer can move away from React front-end to something that has been designed with ease-of-use and good consideration for modern SSR and hybrid (stream rendering) scenarios. Keep up the great work @danroth27 and team!

@mkArtakMSFT mkArtakMSFT added this to the .NET 8: Documentation milestone Oct 19, 2023
@mkArtakMSFT mkArtakMSFT added the Docs This issue tracks updating documentation label Oct 19, 2023
@Stamo-Gochev
Copy link

@danroth27 Can you add the necessary changes to the sample project that you have started in https://github.com/danroth27/Net8BlazorWebAssembly/#blazor-webassembly-in-net-8, so that the Blazor Wasm Hosted app is updated to .NET 8.0?

I see that you have done that on Oct 26, 2023 for the Blazor Server project in danroth27/Net8BlazorServer@b880f6e, but it will be helpful to me to see the equivalent update for Blazor Wasm Hosted app in https://github.com/danroth27/Net8BlazorWebAssembly/#blazor-webassembly-in-net-8.

I am in the process of updating Blazor Wasm apps that target .NET 6 and 7 and the new .NET 8.0 default template is rather different, so having this before the official release of .NET 8.0 will be highly appreciated.

@AlbertoPa
Copy link
Author

This scenario is still missing in the final .Net 8 templates, and there is no documentation for hosted Blazor WASM apps concerning the use of Microsoft Identity Platform (only available for standalone WASM, no coverage for hosted WASM nor Auto mode).

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@Laftek
Copy link

Laftek commented May 29, 2024

any updates?

@martinRocks
Copy link

any updates on this? I really want the 3 project template back. The current project template 'Blazor Web App' doesn't create a web assembly that hits the web api.

@danroth27 danroth27 added enhancement This issue represents an ask for new feature or an enhancement to an existing one Docs This issue tracks updating documentation and removed Docs This issue tracks updating documentation enhancement This issue represents an ask for new feature or an enhancement to an existing one labels Jun 25, 2024
@danroth27
Copy link
Member

danroth27 commented Jun 25, 2024

This work is now being tracked by #55307. See the discussion there for the latest status.

@danroth27 danroth27 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 25, 2024
@danroth27 danroth27 added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components Docs This issue tracks updating documentation ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

9 participants