Online courses in ASP.NET MVC / Core, jQuery, Angular, and Design Patterns conducted by Bipin Joshi. Read more...

ASP.NET Core

123
Create Custom Exception Filter in ASP.NET Core
In my previous article I explained how errors in an ASP.NET Core web application can be dealt with using middleware. I also mentioned that time that you can also use exception filters to handle errors. In this article I will explain how to do just that. In ASP.NET MVC 5 you used the [HandleError] attribute and OnException() controller method to deal with exceptions that arise in the actions of a controller. In ASP.NET Core the process is bit different but the overall concept is still the same.
Posted On : 16 Jan 2017
Five Methods to Deal with Errors in ASP.NET Core
Error handling is a common practice in any real-world web application. In ASP.NET Web Forms you used certain events and custom error pages to deal with them. In ASP.NET MVC you used [HandleError] attribute, exception filters and custom error pages to deal with them. In ASP.NET Core you have a set of methods and, of course, exception filters at your disposal. In this article I will discuss five methods that are used in connection with error handling.
Posted On : 02 Jan 2017
ASP.NET Core - Old Solution Structure Vs. New Solution Structure
Recently one of the reader, who was quite new to ASP.NET Core, asked this question - "I am following your instructions to create a working example based on your article. After creating the project my solution explorer looks different than your screen shots. Why is so? Am I missing something?" In this short post I am explaining why you see two different solution structures in Visual Studio 2015.
Posted On : 06 Dec 2016
Consume ASP.NET Core Web API using HttpClient
In the previous article you learnt to consume a Web API created in ASP.NET Core using jQuery client. Although local clients are quite common in Ajax rich applications, many real-world situations require that you call a Web API from a different application. Thus the client application and the Web API application are different and you can't use JavaScript to call the Web API (due to default browser settings). Moreover, if you wish to call a Web API from a desktop application JavaScript is not an option. In such cases you can use HttpClient to call the Web API. This article tells you how.
Posted On : 14 Nov 2016
Consume ASP.NET Core Web API using jQuery
In the previous article you learnt to create a Web API using ASP.NET Core. A Web API can be consumed by local clients or remote clients. Local clients are the clients that are housed in the same web application as the Web API. Remote clients are the clients that are not part of the Web API application. As far as web applications are concerned a typical local client takes a form of jQuery (or JavaScript) Ajax driven user interface that consumes the Web API.
Posted On : 07 Nov 2016
Create Web API in ASP.NET Core
Creating Web API in ASP.NET Core is similar to creating Web API in ASP.NET MVC with a few differences. In this article you will learn to build a simple REST style Web API that performs CRUD operations on the Customers table of the Northwind database.
Posted On : 31 Oct 2016
Highlight Keywords From Response Using ASP.NET Core Middleware
Recently I needed to search for certain keywords from the response body and then highlight them with different color. In ASP.NET Web Forms you would have created an HTTP module to achieve this. In ASP.NET MVC you would have written a custom filter to accomplish this task. In ASP.NET Core you can write a custom middleware to do the same. The remainder of this article shows how.
Posted On : 10 Oct 2016
Prepare ASP.NET MVC / ASP.NET Core Projects to use Angular 2 in 10 Easy Steps
Now that Angular 2 is finally available, it would be good to try your hands on this new framework. If you are an absolute beginner in Angular 2 you may find preparing your ASP.NET projects a bit confusing. That's because you need to take quite a few steps before you actually start your Angular 2 development. Angular 2 documentation already have two great articles available here and here that guide you to the whole process. In this article I am going to discuss how you can prepare your ASP.NET MVC and ASP.NET Core projects to use Angular 2. I expect that you are already familiar with ASP.NET MVC / ASP.NET Core. Although you are not expected to have Angular 2 experience, a basic idea about what it does would be helpful. This article won't go into too much of the syntax level detailing. My aim here is to show you how and ASP.NET MVC and ASP.NET Core projects can be prepared to use this new framework.
Posted On : 26 Sep 2016
ASP.NET Core Identity - Allow Password Reset
In the previous two article (Part 1 and Part 2) you learnt to implement the ASP.NET Core identity in your web applications and also to add email verification support. In this article you will learn to enable password reset so that users can reset their passwords and specify a new password.
Posted On : 12 Sep 2016
ASP.NET Core Identity - Add Email Confirmation
In the previous article you learnt to implement the ASP.NET Core identity in your web applications. In most of the real world cases you would like to confirm that the email address entered by the user at the time of creating the account genuinely belongs to him. So, verifying the user's email address becomes important. Luckily, ASP.NET Core provides an easy way to do just that. In this article you will modify the application developed earlier to add email verification step.
Posted On : 29 Aug 2016
123