This was a great tutorial to quickly learn clean architecture with Blazor. Thank you. 👍
@Netcode-Hub11 күн бұрын
Welcome 🤗
@rahimekabore79682 ай бұрын
Hello, Thank you very much for the tutorial. Will the code work if the WebUI was a Blazor Server application? If not, what modifications would you need to make it work as a Bazor Server? Thanks in advance and thanks again.
@Netcode-Hub2 ай бұрын
Yes 👍 😃, it will work
@rahimekabore7968Ай бұрын
@@Netcode-Hub THX
@gerardhayden6568Ай бұрын
Hi Fredrick, I've reached the point just after the 2 hour mark where you are managing vehicles. The DTO approach is quite different to the queries / handlers approach in February. Is it a better approach or just different?
@Netcode-HubАй бұрын
😃 which DTO approach are you talking about? Can you provide example?
@gerardhayden6568Ай бұрын
@@Netcode-Hub This one, from the 1:50 mark where you introduced Mediar: kzbin.info/www/bejne/n2WWnYOKbbeXsJY - and the difference might be mediatr.
@gerardhayden656828 күн бұрын
Another win for this video. How to place two grids on the same row!
@Netcode-Hub28 күн бұрын
Use boost strap class flex layout
@gerardhayden656828 күн бұрын
@@Netcode-HubThere has been so much to learn from this presentation. Just Brilliant.
@Netcode-Hub28 күн бұрын
@gerardhayden6568 😆 great, all for you , enjoy 😉
@cgdou14 күн бұрын
Thank you very much for the tutorial
@Netcode-Hub4 күн бұрын
Welcome 🤗
@gerardhayden6568Ай бұрын
Very impressed by what this video teaches on the front end, but when I stick [Authorize] on the controller endpoints I get blocked on update and delete with "Authorization failed. These requirements were not met: DenyAnonymousAuthorizationRequirement: Requires an authenticated user.". Have I missed something, or is there another presentation of yours that will take me through that?
@Netcode-HubАй бұрын
Sorry for having such error, kindly register CORS if consuming in client
@gerardhayden6568Ай бұрын
@@Netcode-Hub Thanks, I'll try that
@Netcode-HubАй бұрын
@gerardhayden6568 alright , feedback me if any issue pops up
@gerardhayden6568Ай бұрын
@@Netcode-Hub I appreciate that. I only get about an hour each morning before the 'day job' starts. Today I was finishing off bringing some endpoints under the Auth remit. Tomorrow I will try test update / delete with postman. Since read is working I suspect the problem could be that I am not managing the token properly. Perhaps I also need to rewatch your discussion and use of CustomHttpHandler.
@Netcode-HubАй бұрын
@gerardhayden6568 good job 👏 keep up
@nadimkhan-zh4yr5 ай бұрын
Thanks for your contribution. I have one question in my mind blazor job market.
@Netcode-Hub5 ай бұрын
😂 what question
@gerardhayden6568Ай бұрын
Still an hour to go. Had a headscratcher this week. Role would not work registering a new user. Tried to tell me the name didn't exist on the create after doing a Find By Name to verify that it did. My role table is migrated from an older project. I left NormalizedName null and it caused chaos. Once that was corrected all was good registering a new user.
@Netcode-HubАй бұрын
😂 sorry, use FindByEmail is wiring with identity for retrieve user, try this if I get your issue well
@lukevincent43976 ай бұрын
In your demo's can you please change the component suite? No one really uses the stock standard menu. Mudblazor or Radzen would be a great choice.
@Netcode-Hub6 ай бұрын
Is open to modification so you can do so
@lukevincent43976 ай бұрын
@@Netcode-HubBut try integrate identity with these frameworks, it's not easy and you the expert 😂
@Netcode-Hub6 ай бұрын
😆, try your hands on, will be available to assist you .
@mikekearl24165 ай бұрын
I have been though this a couple of times and I dont see you update code for the following : Should be between 30:56 and 52.18 public Task CreateRoleAsync(CreateAccountDTO model) { throw new NotImplementedException(); }
@Netcode-Hub5 ай бұрын
Hy , it was implemented lately , kindly check again , 😃
@wdodard2 ай бұрын
Thanks a lot for this wonderfull work
@Netcode-Hub2 ай бұрын
Welcome 🤗
@goditto56946 ай бұрын
@24:23 I have noticed that no more blazor 8 projects don't have 'useauthentication, useauthorization' code part in any type of rendermode projects. but you put those 2 lines. may I know what differences here? (and also you used 'addauthentication' twice at time @24:23 )
@Netcode-Hub6 ай бұрын
😃
@Redman110005 ай бұрын
Thanks for the video. One question, at minute 52:21 on line 94, should not be "if (!string.IsNullOrEmpty(response))"?
@Netcode-Hub5 ай бұрын
Thanks for your comment, why do you think it should be such ?
@Redman110005 ай бұрын
@@Netcode-Hub Because the variable that is receiving the possible list of errors is response and not errors. 😀
@Netcode-Hub5 ай бұрын
@Redman11000 😃
@viosity97074 ай бұрын
I would like to buy this project, but I have a question: how many database classes does it have?
@Netcode-Hub4 ай бұрын
Hy, before you buy , kindly go through this video, I made explanation to everything. You will know everything before purchasing.
@viosity97074 ай бұрын
@@Netcode-Hub Could you describe it to me here or by e-mail? my english is not that good :(
@matteoantonini31025 ай бұрын
Hi, I have a question. At minute 1:13:08 you remove the GetRolesAsync method from the IAccountService interface, but at minute 1:45:17 you use the GetRolesAsync method in the RegisterPage. I don't understand why you took it off first and then uses it. I tried, but it gives me an error. It tells me "MethodNotAllowed". Can you give me a hand? Thanks a lot
@Netcode-Hub5 ай бұрын
You need to select role when registering thus why we need to call get roles async
@matteoantonini31025 ай бұрын
@@Netcode-Hub I understand. but my question is: why did you remove GetRolesAsync from IAccountService? To then use it in the RegisterPage. I don't understand this passage
@gr8fasushi5 ай бұрын
at timestamp 26:50 you ran update-database, that command gives me an error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server). I run into this same error in the last 3 blazor demos of yours at this step. What prerequisite am I missing?
@Netcode-Hub5 ай бұрын
Sorry for having such error, do you have MySQL installed ?
@alexandredumont12305 ай бұрын
@@Netcode-Hub In which layer do I place this dependency?
@Netcode-Hub5 ай бұрын
@alexandredumont1230 please I don’t understand the dependencies you are talking about . Throw more light on it
@gerardhayden65682 ай бұрын
I'm stuck on "Adapt" at timestamp 35:36 - await CreateRoleAsync(role.Adapt(new CreateRoleDTO())); Adapt is not available. Have I missed something along the way. Note I am trying to extend IdentityRole, so my method is using ApplicationRole which inherits from IdentityRole. This is how my context is defined: public class AppDbContext :IdentityDbContext< ApplicationUser, ApplicationRole, string> { #region PUBLIC METHODS public AppDbContext(DbContextOptions options):base(options) { } #endregion
@Netcode-Hub2 ай бұрын
Sorry for that, have you installed the Mapster package ?
@gerardhayden65682 ай бұрын
@@Netcode-Hub Thanks Frederick, I have, but maybe not everywhere. Since I am effectively retrofitting this into the project I commenced in February, I may have missed something.
@gerardhayden65682 ай бұрын
@@Netcode-Hub That is what it was, thanks.
@Netcode-Hub2 ай бұрын
Great 😊
@cherifdiallo55923 ай бұрын
First of all thank you for all our good work!
@Netcode-Hub3 ай бұрын
It’s my pleasure
@rachidbariz71686 ай бұрын
Thank you very much sir Once loggedin, i want to access userid accross all authorized pages in the application. how can I access ?
@Netcode-Hub6 ай бұрын
Retrieve the Id from user claims
@mto89xАй бұрын
The content is very good, but too many copy-paste, to follow and write code i need to stop the video every minute, anyway great example. One question: why you write all Account Repository? using Identity template will write all this stuff or am i missing something? Thanks for your time
@Netcode-HubАй бұрын
Awwww sorry, 😞 will do better next time
@gerardhayden6568Ай бұрын
@@mto89x I am only 1:50 minutes in after three weeks! But I am using the detail to retrofit into an application I began in February. Security well done is complex and code intensive.
@learncomputerprogrammingin48845 ай бұрын
Hello. Is it a good practice to reference the Application layer in a WebUI project?
@Netcode-Hub5 ай бұрын
Yes 👍
@samkimmel46434 ай бұрын
Do people using Visual Studio really manually add packages to their project files? Why not use NuGet?
@Netcode-Hub4 ай бұрын
Hy, sorry for your question. I am bit confused. Kindly throw more light to it
@dominiksteficar63414 ай бұрын
Hey, i'm trying to learn the principal of clean arhitecture, is there a point why you placed some services in the Services folder and others in the Extensions folder? Because most of them are more services than extensions, they don't exactly extend any existing class.
@Netcode-Hub4 ай бұрын
Are you taking about identity user class extension? The reason I did that was the dual usage . We need that class both in infrastructure and UI thus Blazor
@dominiksteficar63414 ай бұрын
@@Netcode-Hub Im talking about Application class library. You have a map called Extensions and map called Services. You placed account service in Services, but you placed HttpClientService and LocalStorageService in Extensions folder. I'm asking what was the reason why all services are not placed in the same root folder called Services, but rather placed in Extensions. I'm just trying to understand your principles so I can apply them properly
@Netcode-Hub4 ай бұрын
@dominiksteficar6341 no actual reason for this, organization differs , it’s good to put all services in a one place for easily identification. Httpclientservice … are extension /service . So it’s not mandatory to do that. Hope this little explanation helps. 😃
@waynehawkins6544 ай бұрын
Questions? What if a users log in and say has full admin rights. I then go and remove this rights. Will they not still have full rights. That is how do I force a remove of the JWT so they have to then sign in again. Question 2? What if I want to assigned more then one role? How can I check if they are in any role and based on this allow in parts of the web project
@Netcode-Hub4 ай бұрын
You can use signalR to notify the client and call a method to clear the LocalStorage or where ever the token is and call nav.navigateTo()
@Netcode-Hub4 ай бұрын
Then use claim-based authorization
@waynehawkins6544 ай бұрын
@@Netcode-Hub are we not already using claim-based authorization in this video? If not, do you have a URL link that shows this.
@Netcode-Hub4 ай бұрын
@waynehawkins654 assign multiple roles to user using await _userManager.AddToRoleAsync(user, "Admin"); await _userManager.AddToRoleAsync(user, "Doctor"); await _userManager.AddToRoleAsync(user, "Patient");
@waynehawkins6543 ай бұрын
@@Netcode-Hub I paid for the code. If I am to build my project into something using your NetcodeHub, can I also get the source code for this? Happy to pay for it By the way, a download of this project has a error for the @inject ToastService toastService.
@gerardhayden65682 ай бұрын
Unusual one. When my app starts it attempts to open "/account/identity/login" but the page is blank. Even after I replace all the code with some simple html to display text. If I corrupt the @page entry at the top, it defaults to "/content/home" with a "nothing at this address" message arising from not finding "/account/identity/login". There are no errors in the console, any idea what I might have missed along the way?
@Netcode-Hub2 ай бұрын
Thus default login address that you must conform with when working with cookie authentication. You can customize it though.
@gerardhayden65682 ай бұрын
@@Netcode-Hub Thanks Frederick, I will check that.
@2005Azm5 ай бұрын
Great tutorial!! by the way I am getting "The ConnectionString property has not been initialized" When I run PM> update-database
@Netcode-Hub5 ай бұрын
Thanks 😊 Kindly check your connection string wether it has all the necessary sections and service registration.
@2005Azm5 ай бұрын
@@Netcode-Hub ok thank you, I'm redoing that section
@2005Azm4 ай бұрын
I'been working on this for days!.... Not easy to follow..
@Netcode-Hub4 ай бұрын
@2005Azm thus great, I belief you are not facing any issues ? 😂
@CompTechnology5 ай бұрын
ur doing verry well if i want to use two layout one for public and one for logedin user how can i do
@Netcode-Hub5 ай бұрын
Create razor page , import from layout component base Thus all To reference it Use @layout nameOfLayout Check this project for practical example Complete Inventory Management System with .NET 8 Blazor - CRUD, Export to PDF, EXCEL, Print, etc... kzbin.info/www/bejne/gaCqe6ago7CgoJI
@elijah51766 ай бұрын
Can you do .NET 8 clean architecture CRUD with JWT authentication and authorisation in web API only. Just API with Swagger UI?
@Netcode-Hub6 ай бұрын
This video has it
@elijah51766 ай бұрын
@@Netcode-Hub Okay, thank you
@hoangthanh69946 ай бұрын
I have a case, blazor hang until browser change from loadding state to complete state when frist launch, in project starter created by visual studio, In Home component, which is launch first, , when I override OnInitializedAsync and add Task.Delay 30 seconds, blazor hang 30s utils, in this time, I can't click in another component, on function is hang utils 30s success, browser change state from loadding to complete, blazor begin work perfectly
@Netcode-Hub6 ай бұрын
Don’t use task.delay in onintialized method, thus the entry starting point , you can use task.delay in button clicked and other operations but not page lifecycles. If this sound weird to you , you can mail me for extensive explanation. 😆 hope this helps
@manhalshiha3 ай бұрын
Some operations were not shown in the video, such as display confirmation box for delete and update
@Netcode-Hub3 ай бұрын
Take your time and go through , everything is visible
@sakatwАй бұрын
@@Netcode-Hub The code of display confirmation box for delete and update is not visible
@akosimarcoantonio6 ай бұрын
Thank you this help me a lot
@Netcode-Hub6 ай бұрын
😃
@viosity97074 ай бұрын
@@Netcode-Hub I would like to buy this project, but I have a question: how many database classes does it have?
@a.g.b7398Ай бұрын
Hi, it works good, but when the token is expire it does not automatically refresh how can do that in my balzor app
@Netcode-HubАй бұрын
Creat generic method to check anytime you wanna make http call Of create a class which inherits from requestDelegate, you can also check if the http status code is 401 then you make refresh token call
@a.g.b7398Ай бұрын
@@Netcode-Hub you mean that method you have done in this video protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) but you don't use anywhere
@sebastian.cardozo5 ай бұрын
Thank you very much for your videos, no blackfriday discount? :p
@Netcode-Hub5 ай бұрын
Haha 😂 mail me
@abdusuf5235 ай бұрын
Please add tutorial for adding permission based authentication in a clean way
@Netcode-Hub5 ай бұрын
Check the playlist , have done that already
@muhanifrafiahmadi11465 күн бұрын
in the new version of toast why ToastService is not available
@Netcode-Hub5 күн бұрын
Have modified it So you don’t need to explicitly register it
@waynehawkins6545 ай бұрын
My browser show the store token. But if I close my Edge browser that stops the project running, and then re-run. The token has been lost so I have to sign in again. What am I missing? Like Visual Studio is starting fresh on each build
@Netcode-Hub5 ай бұрын
Try chrome to see.if persists, push to GitHub and send me link to review
@waynehawkins6545 ай бұрын
@@Netcode-Hub Will do but this code is a big 18 project solution with 2 years in the making so I cannot send the whole code.
@Netcode-Hub5 ай бұрын
@waynehawkins654 wow 🤩 Ohk
@juliochan103 ай бұрын
Identity in the domain layer?
@Netcode-Hub3 ай бұрын
D you have any issue with that?
@Redman110005 ай бұрын
I continue to review his code and find at 1:26:46 that injects a ToastService service into the WebUI Program, but that property does not exist in the namespace, can yo tell me why?
@Redman110005 ай бұрын
I see that version 1.0.1 of your Toast Namespace does have it, but version 1.0.4. No, Why?
@Netcode-Hub5 ай бұрын
Have updated the package, please use the version used in this video . Will update you with the latest version.
@Poeisible4 ай бұрын
@@Redman11000 I have the same problem. What's solution?
@waynehawkins6545 ай бұрын
Hi, before I buy a coffee for the code. I see a comment below that it's not current. Can you confirm?
@Netcode-Hub5 ай бұрын
Which one are you talking about?
@waynehawkins6545 ай бұрын
@@Netcode-Hub Not sure. I just got the code anyway. Happy coding.
@Netcode-Hub5 ай бұрын
@@waynehawkins654 sure, great. If anything, just mail me, thanks. Enjoy
@waynehawkins6545 ай бұрын
@@Netcode-Hub Your code, worried as I don't have control and any problems in the future I cannot fix. Do you have the source code of your add-ins so I can work with future problems if you stop supporting?
@mrt79486 ай бұрын
Thank you very much sir. Is the source code available?
@Netcode-Hub6 ай бұрын
Kindly check the video description
@mrt79486 ай бұрын
@@Netcode-Hub i am looking for async Task ConfirmDelete() . any one can help please?
@safayethossain57465 ай бұрын
@@Netcode-Hub This link is not this project's source code.
@viosity97074 ай бұрын
Does anyone know how many database classes there are? and are there one-to-many relationships?
@Netcode-Hub4 ай бұрын
Kindly go through the video.
@CulturaGamerBR2 ай бұрын
HeaderColor, HeaderFont, HeaderSize and ContentFont not working
@Netcode-Hub2 ай бұрын
Change the CSS class (bootstrap) for the table
@CulturaGamerBR2 ай бұрын
@@Netcode-Hub Hi! The problem is with the blazor variables. Where I declare thei?
@Netcode-Hub2 ай бұрын
Each component has its exposed properties for customization such as CSSClass or CustomStyle properties, you can work with these
@CulturaGamerBRАй бұрын
@@Netcode-Hub OK, I understood. I`ld like to know where I can find it on code previoulsly.
@safayethossain57465 ай бұрын
could you please gimme the Repository link bro?
@Netcode-Hub5 ай бұрын
Kindly check the video description
@safayethossain57465 ай бұрын
@@Netcode-Hub is it paid ?
@mohammadfekri49874 ай бұрын
nice video
@Netcode-Hub4 ай бұрын
Thanks 😊
@cherifdiallo55923 ай бұрын
but I have an issue with the following line of code : var response = await privateClient.GetAsync(Constant.GetRolesRoute); It says that Task does not cointain a definition for GetAsync
@Netcode-Hub3 ай бұрын
Make sure your private client return an instance of httpclient
@cherifdiallo55923 ай бұрын
@@Netcode-Hub in the Application.Extensions.HttpClientService class the function is defined as this : public async Task GetPrivateClient(). I'm doing something wrong?
@Netcode-Hub3 ай бұрын
No if the method return HttpClient. Debug this method and make sure token is added to the header.
@MihaiMoisei6 ай бұрын
Thanks a lot. Microsoft.AspNetCore.Identity is deprecated , are any other solution ?
@Netcode-Hub6 ай бұрын
Will find out
@flobuilds6 ай бұрын
A really good alternativ would be identity server. This can be combined with blazor but takes over the complete handling of account features. It is a fully featured sso service and supports oidc/oauth2. Can be run completly seperate or included in the same codebase. You can also edit all the needed pages for it.
@bocarmg38326 ай бұрын
It's only the package not the functionality
@wokoalex46584 ай бұрын
how do i resolve this "Error: One or more errors occurred. (Cannot provide a value for property 'AuthStateProvider' on type 'Demo.WebUI.App'. There is no registered service of type 'Application.Extensions.CustomAuthenticationStateProvider'.) at Jn (marshal-to-js.ts:349:18) at Tl (marshal-to-js.ts:306:28) at 00b2193a:0x1fa90 at 00b2193a:0x1bf5b at 00b2193a:0xf142 at 00b2193a:0x1e7aa at 00b2193a:0x1efa0 at 00b2193a:0xcfbc at 00b2193a:0x44130 at e. (cwraps.ts:338:24)"
@Netcode-Hub4 ай бұрын
You haven’t created dependency injection with the authentication state provider. Do that in the Program.cs class