Skip to main content

Posts

Using DotNet Watcher with ASP.NET Core 2.0 Application

This is a feature which can be used on the command line to watch our web application. Whenever a C# class is modified and saved, it automatically re-compiles and re-runs whatever command we pass into it. In other words, as soon as C# code is modified and saved, the watcher will see those changes and re-compiles the code without a need to close the running application . Let’s have a look on how it works. Step 1: Open any existing ASP.NET Core 2.0 project and open it’s project file by right clicking on project and clicking on ‘Edit XXX.csproj ‘ and add one more line as highlighted below: < ItemGroup >     < DotNetCliToolReference Include = " Microsoft.DotNet.Watcher.Tools " Version = " 2.0.2 " />     < DotNetCliToolReference Include = " Microsoft.EntityFrameworkCore.Tools.DotNet " Version = " 2.0.2 " />     < DotNetCliToolReference Include = " Microsoft.Extensions.SecretManager.Tools " Ver

Microsoft Announced Availability Of Blazor 0.5.0 Experimental Release

Microsoft announced the experimental release of Blazor 0.5.0 early last week. With this release all the UI interactions will be over SignalR.  New features which are part of this release are: Server-side Blazor Startup model aligned with ASP.NET Core JavaScript interop improvements Removed requirement to preregister JavaScript methods Invoke .NET instance method from JavaScript Pass .NET objects to JavaScript by reference Add Blazor to any HTML file using a normal script tag Render raw HTML New component parameter snippet Early support for in-browser debugging

Authentication using External Providers(Hotmail)

In my previous article, I wrote about how to authenticate by creating new user accounts. Now what if, anyone doesn’t want to add another pair of user id password to his memory and want to use the existing ones which he/she is using very frequently in his/her day-to-day life. Well, here comes the external providers in the picture. In this article, I won’t be covering the basics on how to create a website from scratch as it is already covered in an earlier article. So, let’s quickly jump on to the login screen and on right hand side, you will see the text as ‘Use another service to log in.’ . It  also provides a hyperlink, which will guide us on how to setup the authentication using external providers. What are external providers? There is a huge list of authentication providers. The most common one’s are Twitter, Facebook, Google and Microsoft. This list is not restricted till here as it can be any other custom provider. Throughout this article, I’ll be driving you to set

Received C# Corner MVP award

Today I’m so happy and excited to share with you all that I’ve received the Most valuable Professional (MVP) award from C# Corner for the second time. Last week, I received an email that I’ve been awarded this esteemed award for my community contributions.

Authentication in layman terms

Recently I met one of my readers and he asked me what is authentication and why is it required in very simple terms. So, here is the post. What is Authentication? To understand the fundamentals of authentication, let's begin by taking an easy example. You are working on some file and now you want to share that file to a person named XYZ over OneDrive. So, the purpose of authentication in this case is to make sure that only XYZ can access that document. How to achieve it? It can be achieved by setting up the authentication system and this system will tell who all can access this file based on some predefined rules. In our case, the rule is simple - none except XYZ should be able to access the file. How verification happens? Entire verification activity solely depends on our authentication system. When I'm saying authentication system, it means it is nothing but a piece of software written by someone. Now how will this piece of software validate the incoming us

Setting up Two-Factor Authentication in ASP.NET Core 2.0

In this article, I’m going to write bit about security aspects in ASP.Net Core 2.0. Whenever you create a new ASP.NET Core application, you must notice that there is an option on dialog with a button captioned as Change Authentication and once you click on that, you will land upon a dialog having below 4 options as shown below:    I’ll discuss about each of these options in detail but as of now, to get started, let’s take a high-level idea about these No Authentication – which means application is completely anonymous and open for everyone to access it. Individual User Accounts – it uses local database for storing the information related to user. Work or School Accounts – it means application will work with Office365, Active Directory, support for cloud, etc.. Windows Authentication – For internet application and uses IIS capabilities to know who has logged in. Here I’ll be choosing my option as ‘ Individual User Accounts ’ which is very easy, simplest as well