Posts

Blazor Authentication and Authorization

Image
Authentication and Authorization in Blazor can be broken down into 2 parts, the normal ASP.Net Core authentication and authorization, token based, cookies, Active directory and even 3 rd party.   The Blazor specific authentication and authorization that is focused on managing the UI based on whether the    user is logged in, what roles and policies need to be applied.   We will be looking at the Blazor side. To get started we will be creating a Blazor Server project and changing the authentication to Individual Accounts: Once we have the project created, we need to run the command to create the data store for the user accounts:      PM> Update-Database Run the application and create a user account with a password.   For our application we used:            1.        User Name: BlaozrAuth@everywherec.com             ...

Blazor Toast Application

Any application that does any interactions work with a user needs to provide some form of user feedback to them to let the user know the application is busy doing work, running a log process like uploading a file or that action succeeded or failed.   Every UI framework has some form of feedback from a simple alert box to styled message boxes to toasts.   Like them or not, toast popups are a nice way to let the user when something happens, warn them about an action they are about to perform or when an error happened. As with many things with Blazor, there is a component for that.  All the free UI frameworks, Blazorise  , Radzen  or any of the paid for packages, Telerik , DevExpress and SyncFusion contain toast messages.   I found a nice one from Chris Sainty .   It is a toast without any JavaScript, just C#, HTML and CSS.   Which means you can restyle it to anything you would like.   We will be exploring how to implement Chris’s ...

Blazor Weather Demo Application Edit modal

I wanted to add modal support to my Blazor applications.  As with many of the things I have found with Blazor this is a lot easier than I had thought it would have been. Now there are several CSS frameworks for Blazor that have modals built in, such as Blazorise, MatBlazor, Telerik and SyncFusion.  These are nice, but I was looking for just the model and with having to use Java script.  I was lucky to find one here   from Chris Sainty  .   Chris has a lot of good Blazor stuff. I will be covering my implementation of the Blazored Modal by adding additional functionality to my Weather Demo Application we started with the Form Validation post.   This modal is very clean and simple.   Once you add the project and add your references, it is easy to execute.   One key part of the modal is that you must pass in a razor component, this allows for a flexible implementation. Configuration     1.    ...