ASP.NET Core

12345678910
Use System.Text.Json for JSON processing in ASP.NET Core
If you worked with earlier versions of ASP.NET MVC and ASP.NET Core, you are probably aware that these versions use Json.NET library for the sake of JSON processing. In ASP.NET Core 3 Microsoft has provided in-built support for JSON serialization and deserialization. That means you no longer need to depend on Json.NET library. The good part is, you can still use Json.NET if you so wish. So, you have two options now as far as JSON processing is concerned - either use in-built JSON API or use Json.NET. The in-built support for JSON serialization and deserialization comes from System.Text.Json namespace. In this article you will learn to use the System.Text.Json for serializing and deserializing JSON data during Web API communication.
Posted On : 24 Jun 2019
Create and Use User Secrets in ASP.NET Core
While developing an ASP.NET Core web application you often come across pieces of information that you wouldn't like to share with others. Consider, for example, a database connection string that contains a user ID and password. You typically store it in appsettings.json file. But when you share your project code with others (say through a version control system) those details are also shared with others. Another example could be access keys or API keys. You might not want to share these details with others. Luckily, ASP.NET Core and Visual Studio provide an easy way to deal with this requirement through what is known as User Secrets.
Posted On : 10 Jun 2019
Understand InProcess and OutOfProcess Hosting Model in ASP.NET Core
Once you finish developing an ASP.NET Core web application, you need to deploy it on a server so that end users can start using it. When it comes to deployment to IIS, ASP.NET Core offers two hosting models namely InProcess and OutOfProcess. In this article you learn about these hosting models and how to configure them.
Posted On : 03 Jun 2019
Multiple implementations of an interface in ASP.NET Core DI container
If you worked with ASP.NET Core before chances are you used ASP.NET Core's dependency injection features. Most commonly you register a single implementation of an interface as a service type. However, at times you may want to register multiple implementations of an interface as service types. In this article you learn how to accomplish the task.
Posted On : 27 May 2019
Dealing with MongoDB DateTime in ASP.NET Core
MongoDB is one of the popular NoSQL databases available today. You can use MongoDB database in your ASP.NET Core applications using MongoDB.Driver NuGet package. I discussed the basics of MongoDB including CRUD operations here and here. Document databases such as MongoDB store data as JSON documents. Although JSON supports basic data types such as string, number, and boolean JSON doesn't support DateTime. So, date-time values are stored as string. In this article we will discuss a few things that you need to take into account while storing date-time values.
Posted On : 20 May 2019
Create AutoPostBack tag helper in ASP.NET Core
In one of my past articles I explained how autopostback can be implemented in ASP.NET Core. If you find yourself using autopostback at many places, you can create a custom tag helper that does the job for you. To that end this article explains how that can be done. This article doesn't discuss the basics of custom tag helpers. If you are not familiar with creating your own tag helpers read this article go get some understanding.
Posted On : 13 May 2019
Store and retrieve files from Azure blob storage
ASP.NET Core web applications often need to store files on the server. One of the approaches to storing files on the server side is to store them into Azure blob storage. For example, you can store documents, audio files, video files, and images into Azure blob storage. This article shows you how to add, download, and remove files from Azure blob storage.
Posted On : 06 May 2019
Load Partial Views using Ajax in ASP.NET Core MVC and Razor Pages
In the previous article we discussed how to use partial views in ASP.NET Core MVC and Razor Pages. Although many a times you would place a partial view on a page at development time, it is also possible to load a partial view programmatically through Ajax. To that end this article shows how that can be done.
Posted On : 29 Apr 2019
Reuse UI with Partial Views in ASP.NET Core MVC and Razor Pages
While developing ASP.NET Core web applications you often need to reuse parts of the user interface across many view or razor pages. There are multiple options to address this requirement simplest being Partial Views. In this article you will learn what partial views are and how to use them in ASP.NET Core MVC and Razor Pages applications.
Posted On : 22 Apr 2019
Use Cache and Distributed Cache Tag Helpers in ASP.NET Core
Web developers often look for opportunities to boost the performance of their web applications. ASP.NET Core provides server side caching in the form of in-memory and distributed cache implementation. Moreover, it offers two Tag Helpers to implement cache HTML content of razor views or razor pages - Cache and Distributed Cache. To that end this article discusses these Tag Helpers in brief.
Posted On : 08 Apr 2019
12345678910


Subscribe to our newsletter

Get monthly email updates about new articles, tutorials, code samples, and how-tos getting added to our knowledge base.

  

Receive Weekly Updates