Blazor WebAssembly ASP.NET Core Hosted in .NET 8 🔥

  Рет қаралды 24,683

Patrick God

Patrick God

Күн бұрын

Пікірлер: 82
@joker-im7bl
@joker-im7bl Жыл бұрын
This is exactly what I have been trying to do for the last couple days. Thanks for posting this!
@divanvanzyl7545
@divanvanzyl7545 Жыл бұрын
Thanks Patrick. Idk why MS can't release proper guides when they make changes to their product. I would have been lost if it wasnt for your videos.
@iroelperez3813
@iroelperez3813 11 ай бұрын
Thanks a lot Patrick, you saved me from a lot of pain with this one!!
@TheMezanine
@TheMezanine Ай бұрын
Thank a lot Patrick!!!
@nagendravc
@nagendravc 9 ай бұрын
Wow! This was again the most required demo! Thanks!
@mtranchi
@mtranchi Жыл бұрын
Thank you! Loved seeing how that all works. Now how about exporting the three projects into a template for future use?
@herewegotoday
@herewegotoday 7 ай бұрын
Just started using blazer 8 and it’s been driving me crazy. This is exactly what I needed. Thank you sir
@stephenshillitoe817
@stephenshillitoe817 6 ай бұрын
Thank you Patrick for another very helpful and well presented video.
@PatrickGod
@PatrickGod 6 ай бұрын
Very welcome! 😊
@LashithB
@LashithB 3 ай бұрын
Thank you so much for this. Very clear and helped me a lot.
@purplepixeleater
@purplepixeleater Жыл бұрын
can't be more perfectly timed :) thank you!
@friendlyfox2189
@friendlyfox2189 2 ай бұрын
Thank you, you are the best!
@Caphalem
@Caphalem 7 ай бұрын
Thank (Patrick) God this video exists! The Blazor App template was driving me insane. Never been so happy to click that counter "Click Me!" button while getting my 50 degrees Celsius weather reports! Restructured my whole project using this. I will sleep soundly today knowing my client side and server side have clear separation :)
@sokoo1978
@sokoo1978 Жыл бұрын
I tried to update my hosted wasm app to the new fancy WebApp to be able to enable AutoRender and use the new Auth stuff, but failed utterly :P It would be nice, if you could make a tutorial with one of your old .NET 7 app, hosted wasm, EF, and the old JWT auth you made, like maybe the Webshop app.
@stevenharris3419
@stevenharris3419 5 ай бұрын
Awesome Video. Thank you Patrick.
@etiennehublet3034
@etiennehublet3034 11 ай бұрын
Thank you Patrick, very helpful ;-)
@PatrickGod
@PatrickGod 11 ай бұрын
Very welcome 😁
@kimwingco
@kimwingco 9 ай бұрын
Thanks, Patrick!! I can't count the times you've saved my ass! :) this video was just what I needed
@nickvar4167
@nickvar4167 3 ай бұрын
Thank you so much!
@davidpccode
@davidpccode 11 ай бұрын
Hi Patrick. Tks for such amazing content. One question. Something seems strange to me. Do I necessarily have to create this reference between the client and my API? What happens if I have an API that is used for many more things and also to be the backend of my wasm? Can't I just do normal http requests? This linking of projects seems tangled and unnecessary to me or what is the purpose?
@kell7689
@kell7689 10 ай бұрын
Also wondering this... Can't really think of the reason for the reference. EDIT: AH, it's necessary for you to be able to launch the WASM client app when running the Server project. When you set the `inspectUri` in the `launchSettings.json` file, it won't take effect if the Server isn't referencing the client.
@sharonroy9877
@sharonroy9877 8 ай бұрын
Thanks, this video really helped me.
@kuper1346
@kuper1346 Жыл бұрын
So why doesn't dotnet8 have this template again? I understand this (united) template which does make certain things easier for sure. But for certain use cases, what am I supposed to use? Lets say I have a complex commercial app with a lot of server logic, automation and data persistance (database) on one hand and complex frontend with diagrams and a lot of menus on the other. I can't think of how this united template could statisfy this scenario, you do need both aspects which you connect with webapi calls. So thank you for the video, but why? Why does this template not exist? Why was this video needed in the first place?
@varinator3176
@varinator3176 Жыл бұрын
Because Microsoft and .NET team are completely detached from reality and keep going in circles, trying to catch up to established front-end frameworks, while not being able to do anything better than those frameworks.
@arminodobasic2428
@arminodobasic2428 11 ай бұрын
I was wondering about the same thing. A couple of months ago I started a small project in .NET 7 using the WebAssembly Hosted architecture, but now that everything started shifting in .NET 8, I don't feel extremely confident about the future. I am actually considering shifting to a .NET + React stack while it still isn't too much work.
@jasondmace
@jasondmace Жыл бұрын
Hi, Patrick. Thank you for the video. What would be the end result difference between this approach vs. upgrading a solution that was created in .NET7? (If any?)
@bennyadiwijaya1606
@bennyadiwijaya1606 Жыл бұрын
I also want to know,, is there any pros and cons between these two? @Patrick God
@bakpinar1905
@bakpinar1905 3 ай бұрын
Thanks Patrick
@JackNotJack
@JackNotJack Жыл бұрын
Brilliant. Thanks Patrick.
@MojtabaPanjali
@MojtabaPanjali 6 ай бұрын
👍it's very good
@joseisrael2946
@joseisrael2946 11 ай бұрын
Hi I'm new to .NET and this setup got me confused. I was looking for a similar structure to Node applications, with a standalone Front, Back and Library. The Library feeds both, and the Front makes API calls to the Back. But here It seems you are using the Blazor app as a... UI library? And serving It by the Server? What benefits does It have against just deploying both entities separately and making them talk via REST API calls? Edit: thanks for all the content! I'm learning a lot.
@dennisbriese8052
@dennisbriese8052 Ай бұрын
I came to the same question as you had. Why not create api and blazor wasm and let them Talk with Rest api (i did this in the past for all dotnet Version) Did. you found the answer why he did like this?
@saddlebear
@saddlebear 11 ай бұрын
Very helpful, thank you. I was missing one line in the Program.cs.
@brankogojkovic8600
@brankogojkovic8600 2 ай бұрын
Great video, thanks a lot Patrick. Maybe in a future video you can explain how to host this application as a Windows service
@LerivangohHannibalLeckterMx
@LerivangohHannibalLeckterMx Жыл бұрын
awesome dude!, I love old architecture, i don't know why to remove it, but anyway, thanks
@cchiarelli
@cchiarelli Жыл бұрын
Thank you Patrick for your detailed explanation. Looks like .NET 8 version of Blazor is two steps forward one step back. Lots of hoops to go through to create a simple Core Hosted Site. I agree with mtranchi, hopefully someone will create an add-on template to make this much easier.
@LeonardoPerez-yv6hf
@LeonardoPerez-yv6hf 3 ай бұрын
It is possible to deploy a . Net 8 Blazor Web Assembly application on IIS, if it is possible to do this, can you make a video with the explanation?
@mohammed2709
@mohammed2709 10 ай бұрын
how can i deploy this incleded 2 projects ?
@muzammilghani2492
@muzammilghani2492 28 күн бұрын
Just deploy Server App.
7 ай бұрын
Hi, we also can change the .net version after we create the project with net7. Is there any reason not to use this approach? Is it possible do make a video about adding an identity mechanism to a hosted app from scratch? Since .net7 still creates the app with 3th party session package which need licence, some people may need this tutorial. Thanks .
@eddyelamin9015
@eddyelamin9015 6 ай бұрын
Thanks for the tutorial bro. Really sucks that Microsoft ditched this awesome architecture.
@renatomedeiros4364
@renatomedeiros4364 Жыл бұрын
What's the value for inspectUri ????
@anonymous-ek7eb
@anonymous-ek7eb 9 ай бұрын
do you know what is that?
@mikkirefur
@mikkirefur Жыл бұрын
Thanks this is interesting while we are considering an upgrade to .net 8 but not sure if we want to migrate into new rendering paradigms. Is that the basic premise and use-case for this video ? I am wondering what microsofts new blazor 8 design pattern / rendering mode is that replaces this specific scenario ?
@kis.stupid
@kis.stupid Жыл бұрын
Most these rendering paradigms are optional / possibilities for niche cases. Or to gradually migrate from an MVC or Razor Pages to Blazor Server-side. Maybe for when you don't want to go all the way or if you have niche requirements. Explore them at your own pace ;). For the most part you can just work as you were before .NET 8.
@kell7689
@kell7689 10 ай бұрын
That's basically it. The new Web App template seems to just allow you to switch rendering modes at will. It strangely allows you to select a single render mode globally though, and if you were to select WebAssembly, it would create both a Client and Server project where UI concerns could be mixed between the two (making a bit of a mess). Seems like the only benefit of that route is so you have the option of switching on the fly.
@robertrobert2954
@robertrobert2954 Жыл бұрын
Can you still somehow take advantage of new auto interactivity render mode with this approach?
@saeedfathi9758
@saeedfathi9758 Жыл бұрын
Thank you for your amazing tutorial! What about Microsoft Identity for user management?
@RickGraner
@RickGraner Жыл бұрын
I'd also be interested in hearing how to add Identity + PWA
@dennisbriese8052
@dennisbriese8052 Ай бұрын
Hi, can u explain why the server lib Import was needed? In my point of View, you can create simply api and a Blazor wasm and you have to start Both. Then in your wasm Call api with http calls. I would be really interested to know about the fact why you imported that Server lib. Thanks a lot
@SharifYazdian
@SharifYazdian 11 ай бұрын
How sweet it is to find EXACTLY what you're looking for. Thanks!! one question: Why didn't you bring app.UseRouting(); in to Program.cs from .net 7 ?
@deltaHawck6625
@deltaHawck6625 4 ай бұрын
I suspect I have found a bug when using "inspectUri" on the property page , mentioned by you, with this arquitecture. The bug stops stripe payment from working when using this line of code,, and when its withuot, it goes back to its normal state.
@jonymontana8948
@jonymontana8948 6 ай бұрын
Thank
@neilthompson1050
@neilthompson1050 9 ай бұрын
Can you send us a example docker file to build this image? Thanks Seem to have some issues with that
@5peakcodesamples726
@5peakcodesamples726 11 ай бұрын
Excellent!, Thanks But what about publishing and deploy process ? It would be interesting!
@kittkillward9014
@kittkillward9014 11 ай бұрын
Cant understand why they removed template with api controllers for server and blazor for client-side rendering. It seems like fully dumb decision from Microsoft.
@kell7689
@kell7689 10 ай бұрын
It is a bad decision. The new template feels like it's trying to be a jack of all trades.
@vraja6812
@vraja6812 5 ай бұрын
It is because we have interactivity modes in 8.0. This template is more suited for web assembly alone. If you want to take the new aspects of blazer 8.0 this will not woek
@broadshare
@broadshare Жыл бұрын
If you are trying to do this after .NET 8 release and getting error in program.cs after adding UseWebAssemblyDebugging & blazorframework files just add nuget package Microsoft.AspNetCore.Components.WebAssembly.Server to server project which is not added by default in web api project in .NET 8
@molesox
@molesox 2 ай бұрын
I have the package and still the error ... :(
@unjordi
@unjordi Жыл бұрын
I exactly want to build the projects separately to host the wasm app in a static host and just have the webapi and the DB costing money and maintenance
@kis.stupid
@kis.stupid Жыл бұрын
That's still possible to deploy a Blazor WASM (Standalone) as a Static Web App and the API separately to an App Service, the database to "SQL database" managed service of Azure.
@alirezakarimi8685
@alirezakarimi8685 9 ай бұрын
Please help me Patrick. How we can publish this project to IIS server?
@christiantricarico
@christiantricarico 11 ай бұрын
Great. So, does it mean that we can migrate an existing .NET 7 WebAssembly hosted application simply changing the target framework version in all the 3 projects?
@mikkirefur
@mikkirefur Жыл бұрын
When using a shared library and also Azure Github ci/cd for Web API and Blazor Client, how can we include the Shared Library in the ci/cd build ? a) That is assuming 2 different repositories that have a shared library / project. I am thinking in Github actions we are able to copy in the Shared Library ? b) When having everything in 1 Solution, is there a way that only the API/Shared, vs Client/Share projects are included in the Azure App Service ? i am new to this space so excuse me if i too simple or wrong perspective. We currently have our shared models in the Web API, that get packaged in nuget(), but that prevents a coder from adding back-end features and front-end at the same time (nuget built during dev push/merge)
@kis.stupid
@kis.stupid Жыл бұрын
a) Shared libraries are just built with the project that implements it at the build step of a pipeline. You don't have to do anything extra there (if I understood your question). b) I'd recommend to work with the release branch principle. That way you can prefix the branches that have to deploy to the API & use another branch prefix for anything that needs to be deployed to the environment of the client-side project. You could deploy your WASM as a Static Web App (free) and your API to an App Service. You do have to enable CORS on your API than. In this way, you have 2 separate GitHub workflows to split deployments like mentioned above. Or did you mean to deploy both WASM and API onto one App Service? Than, I don't think you can split anything.
@m4r10x2
@m4r10x2 Жыл бұрын
Do you mean having different git repos? Or different .net projects/slns in a single git repo?
@mikkirefur
@mikkirefur Жыл бұрын
@@m4r10x2 currently we have separate repos. But considering changing into 1 repo. So either to answer question
@Marcos2009DF
@Marcos2009DF Жыл бұрын
Hi @Patrick God and everyone I would like to know your opinion since I have finished the course, which is actually very good, I learned and reaffirmed many things. Now I have a modified version that I had in production for a year with Azure but the promotion has ended and now I have to pay. In Azure, maintaining my Web app is very expensive, I already investigated other sites but the cost is similar. Here is my question; Do you know of any place where hosting my Blazor web app is cheaper?
@bennyadiwijaya1606
@bennyadiwijaya1606 Жыл бұрын
Hi, what if we use Blazor web app with webassembly global, where server as web API, so we just add one project shared. what do you think?
@blackpaw29
@blackpaw29 7 ай бұрын
Thankyou! Have been driving myself nuts trying to figure this out. I don't understand Microsofts reasoning here, pure WASM apps are toys without access to a server apie.
@ChrisDomino-o3s
@ChrisDomino-o3s Жыл бұрын
Hi Friends! I have tried this approach AND upgrading an existing .NET 7 WASM+API project, and unfortunately WASM debugging doesn't work in either case; the breakpoints are left unbound. I didn't see it in the video, but does WASM debugging *actually* work here? Thanks Patrick!
@AndrewStevens-o6n
@AndrewStevens-o6n 7 ай бұрын
I need help doing route sub path hosting of blazor webbassembly applications for dotnet 8.0
@manojnaik5643
@manojnaik5643 11 ай бұрын
Hi Patrick, need urgent help on publish same application, I did not find razor pages after publish locally, Is .net 8 does not place physical pages there at publish time, my published directory contains only dlls and client webasembly exe
@adammajid9308
@adammajid9308 8 ай бұрын
somebody please help. do i add individual accounts/Identity framework into the client or the server. and also where would i create my models folder
@HernanIannella
@HernanIannella 8 ай бұрын
The "shared" library project os completely optional and doesn't affect functionality.
@OurWorldIsBroken
@OurWorldIsBroken Жыл бұрын
Patrick God vs Microsoft : 1-0
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
I Built a Web Scraper Using Python....
10:07
Cyb3rMaddy
Рет қаралды 6 М.
ASP.NET Core 8 Options Pattern: Simplify Configurations Easily
13:13
Marko Code Academy
Рет қаралды 113
How to Become a Highly Employable C# Developer in 2025
20:10
Gavin Lon
Рет қаралды 3,5 М.
Building Beautiful Blazor Websites in .NET 8
1:01:47
Devessence
Рет қаралды 19 М.
Blazor in 100 Seconds
2:33
Fireship
Рет қаралды 611 М.
Blazor Web App & Web API in REAL project (.NET 8) - Part 1
27:35
Code Overdose
Рет қаралды 11 М.
Forget Controllers and Minimal APIs in .NET!
14:07
Nick Chapsas
Рет қаралды 81 М.
Build This UNIQUE Chart with me | Power BI
14:53
How to Power BI
Рет қаралды 14 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 306 М.
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН