how can combining Blazor WebAssembly or server with ASP.NET Core to building web app and using .NET MAUI for mobile app all within the same solution - asp.net-core

I have project that i want to build web app and mobile app using NET CORE
after research i just want to confirm the architecture=>> Blazor client side + asp core server side + NET MAUI for mobile.
i can build with these three projects in the same solution an apllication interact such as reading and writing information from and to the Mobile and web app
My question i can use Blazor WebAssembly for client-side web applications and ASP.NET Core for handling database interactions, APIs, and server-side processing. And, i can also use .NET MAUI for building mobile app all within the same solution.

Related

How do I open the Blazor application after succeeded login from asp.net core (twilio)

I am developing blazor applications vs 2022 .net 7 (mostly CRUD-operations). Now I need to have 2fa to secure the applications.
I have a working twilio example with asp.net core 3.1.
My question is: How do I open the Blazor application after succeeded login from asp.net core (twilio).
I have been searching on the net for quite a while, but haven’t found a good answer
Searching the net for solutions

.NET MAUI Blazor - What to incorporate to it, Blazor Server or Blazor WASM as best practice?

Good Day Everyone
I'm currently checking .NET MAUI Blazor App, and according to some tutorials, you can incorporate existing Blazor applications, currently, I have 2 different apps, one is made in Blazor Server and the other one is made in Blazor WASM, If I'm incorporating my apps to .NET MAUI Blazor what is the best practice to incorporate to it, Server or the WASM? sorry for the questions, I actually getting confused if .NET MAUI Blazor is a client app or a server-side app.
Thanks and regards
Maybe this could help you? They are talking about Blazor Hybrid, it is not Server nor Wasm. It runs natively using a webview for the razor pages. Its a third kind.
Microsoft presentation of Blazor Hybrid
https://learn.microsoft.com/en-us/learn/modules/build-blazor-hybrid/

Blazor WebAssembly - how to securely consume private/restricted API?

I want to build 2 apps.
Private API in .NET that takes care of database access / processing of data.
Blazor WebAssembly app which will connect to this API securely, to search data.
Since Blazor WebAssembly DLLs can be decompiled, I can't use any private/secret keys in the APP.
I don't want anyone being able to use the API if they discover the endpoints. Only the Blazor APP can use the API (and any other app I might build in the future).
How should I approach this? Is it even possible to do it securely or should I go Server Side?
Secure ASP.NET Core Blazor WebAssembly explains how to secure a Blazor WASM app
Blazor WebAssembly 3.2.0 Preview 2 release now available explains how to use IAccessTokenProvider to get the access token to authentify your applicaton on API.

Blazor - WebAssemby ASP.NET Core hosted model

There seems to be little documentation on the new WebAssembly ASP.NET Core hosted model. I realise that Blazer WebAssembly model is in preview until May 2020, however, once the latest preview template is installed in Visual Studio 2019, there is the option to use ASP.NET Core hosted.
From what I can gather, this model appears to be a hybrid between the Blazor Server App and the Blazor WebAssembly App hosting models in that in addition to using the client to render in WebAssembly, also employs server technology, e.g. SignalR.
What would be the benefits of using this hosting model?
What would be the benefits of using this hosting model?
In the hosted model, the server will:
serve the client (wasm) Blazor application
typically provide APIs that will be consumed by the client application
In the hosted model, you do not need SignalR to get the Blazor app working

Running ASP.NET Core within/alongside an existing ASP.NET WebForms project in Visual Studio and IIS Express

I have a large Visual Studio solution with several ASP.NET web sites with a mix of WebForms, MVC and WebAPI. What I'd like to be able to do is add an ASP.NET Core project to this solution to provide MVC, Razor Pages, WebAPI and SPA (Vue.JS in this case) facilities. The plan is to take each WebForms page at a time and convert to the new framework.
I'll target .NET Framework and the Core site will share some assemblies from the WebForms - but no state is shared except a session cookie and any state stored in the database.
I specifically want to be able to serve the new framework from IIS Express on the same port. So for example, an old page such as http://localhost:1234/page1.aspx will be converted to http://localhost:1234/core/page1. However, I'm unable to simply change the Core project to be hosted on IIS Express and change the path to http://localhost:1234/core. I have managed by following instructions to host in IIS but this has several disadvantages for development. I've also tried adding <urlRewrite> configuration to the WebForms site to forward requests to Core running on a different port but I wasn't very successful and I believe POST request are not supported which renders it fairly useless!