Instructor-led Online Courses in ASP.NET Core and Angular by Bipin Joshi. Read more...

ASP.NET Core

123456
Multiple GET and POST methods in ASP.NET Core Web API
In ASP.NET Core MVC and Web API are parts of the same unified framework. That is why an MVC controller and a Web API controller both inherit from Controller base class. Usually a Web API controller has maximum of five actions - Get(), Get(id), Post(), Put(), and Delete(). However, if required you can have additional actions in the Web API controller. This article shows how.
Posted On : 21 May 2018
Store ASP.NET Core Application Configuration in Multiple Files
ASP.NET Core applications typically store configuration information in appsettings.json file. Although this default arrangement works in many situations, at times you need to store your application configuration in multiple physical files. Luckily, storing configuration in multiple files is not a big deal since ASP.NET Core by design supports this feature. However, you need to be aware of a few things involved in the process. This article discusses just that.
Posted On : 07 May 2018
7 Things Worth Knowing About ASP.NET Core Logging
Logging is an important aspect of any professional web application. You often need to log data, information, errors, system events, and such things. ASP.NET Core comes with a set of inbuilt logging components that you can use for this purpose. To that end this article enumerates through seven things that are worth knowing about ASP.NET Core logging.
Posted On : 23 Apr 2018
Use HTML5 download attribute to download a URL
The anchor element allows you to render a hyperlink to a resource using its href attribute. There is a lesser known attribute of the anchor element - download - that can come handy in certain situations. The download attribute instructs the browser to download the resource as mentioned in the href attribute. Moreover, you can also specify the default file name for the download.
Posted On : 26 Mar 2018
Utilize Server Sent Events (SSE) in ASP.NET Core
Some web applications application need to show data in real-time. As soon as the data is made available at the server, it immediately needs to be displayed to the end user. Traditionally developers used to poll the server periodically to check if a new data is available. This approach has its own drawbacks and may prove to be unsuitable in certain cases. Wouldn't it be nice if server notifies the client of new data rather than client checking with the server periodically? That is what HTML5 Server Sent Events (SSE) allow you to do. In this article you will learn what Server Sent Events or SSEs are and how to develop a ASP.NET Core application that receives real-time data from the server.
Posted On : 12 Mar 2018
Create View Components in ASP.NET Core
ASP.NET Core offers several ways to reuse your code and UI. One of them is View Components. Simply put a view component is a bundle of C# code, Razor code, and markup that occupies some screen real-estate. Unlike partial views a view component is more like a standalone widget housed in a view.
Posted On : 05 Mar 2018
Use Cookie Authentication with Web API and HttpClient
Recently I wrote this article explaining the cookie authentication in ASP.NET Core. A reader asked whether cookie authentication can be used with ASP.NET Core Web API and that too when the Web API is being consumed using HttpClient component. This article explains a possible solution to the problem.
Posted On : 26 Feb 2018
Implement Cookie Authentication in ASP.NET Core
If you have been working with ASP.NET Core, you are probably aware of ASP.NET Core Identity. ASP.NET Core Identity is a full-fledged framework to secure your websites. It comes with a lot of features such as external logins and Json Web Tokens (JWT) support. Ay times, however, you need something that is simple and gives you total control on various aspects of implementation such as data store and account manageemnt. That is where ASP.NET Core's Cookie Authentication can come handy. In this article you will learn what Cookie Authentication is and how to configure it to secure your websites.
Posted On : 19 Feb 2018
Use Ajax to perform CRUD operations in ASP.NET Core Razor Pages
ASP.NET Core Razor Pages offer a simple page based programming model for the developers. A razor pages consists of a .cshtml files and associated page model class. The page model class can house actions to handle HTTP verbs. For example, a page model class can contain OnGet(), OnPost(), OnPut(), and OnDelete() actions to deal with GET, POST, PUT, and DELETE verbs respectively. This sounds straightforward as far as requests are initiated by a form. However, things are bit tricky while making Ajax calls to a razor page. To that end this article illustrates how to develop a razor page that performs CRUD operations using Ajax calls.
Posted On : 05 Feb 2018
Various ways of accessing DI services
ASP.NET Core provides an inbuilt Dependency Injection framework that you can utilize to register and access services. One of my earlier article explains various lifetime options that you can use while registering a service. Once a service is registered with the DI container you can get an instance of the service using what is known as constructor injection. Although constructor injection is the most common way of accessing the registered services, there are a few more options that can be used to accomplish the task. To that end this article discusses these alternatives with a simple example.
Posted On : 29 Jan 2018
123456