Latest Posts On Code Maze

Password Reset with ASP.NET Core Identity

Password Reset with ASP.NET Core Identity

One of the common practices in user account management is to provide a possibility for the users to change their passwords if they forget it. The password reset process shouldn’t involve application administrators because the users themselves should be able to go...

Authentication With ASP.NET Core Identity

Authentication With ASP.NET Core Identity

Authentication is the process of confirming a user’s identity. It is a set of actions, we use to verify the user’s credentials against the ones in the database. For the user to be able to provide credentials, our application requires a Login page with a set of fields...

OWASP Top 10 – Injection

OWASP Top 10 – Injection

The injection attack is the most critical web application security threat as per OWASP Top 10 list. In this article, we are going to look at the Injection attack in detail. To download the source code for this article, visit the OWASP - Injection GitHub Repo. To see...

User Registration with ASP.NET Core Identity

User Registration with ASP.NET Core Identity

With ASP.NET Core Identity fully registered we can learn how to perform user registration actions in our project. User registration is the process of registering users in our application by saving their credentials in the database. So, in this article, we are going to...

Introducing Identity to the ASP.NET Core Project

Introducing Identity to the ASP.NET Core Project

In this article, we are going to learn about ASP.NET Core Identity implementation in the ASP.NET Core project. ASP.NET Core Identity is the membership system for web applications that includes membership, login and user data. But, it is not just a user store, it is...

How to Send an Email in ASP.NET Core

How to Send an Email in ASP.NET Core

In this article, we are going to learn how to send an email in ASP.NET Core. We are going to start with simple project creation and creating a basic email configuration. Once we are finished with that, we are going to install the required MailKit library and create...

Implementing HATEOAS in ASP.NET Core Web API

Implementing HATEOAS in ASP.NET Core Web API

In this article, we are going to talk about one of the most important concepts in building RESTful APIs - HATEOAS and learn how to implement HATEOAS in ASP.NET Core Web API. This article relies heavily on the concepts we've implemented so far in paging, filtering,...

Data Shaping in ASP.NET Core Web API

Data Shaping in ASP.NET Core Web API

In this article, we are going to talk about a neat concept called data shaping and how to implement it in ASP.NET Core Web API. To achieve that, we are going to use similar tools as we did in the sorting article. Data shaping is not something that every API needs, but...

How to Implement Sorting in ASP.NET Core Web API

How to Implement Sorting in ASP.NET Core Web API

In this article, we're going to talk about sorting in ASP.NET Core Web API. Sorting is a commonly used mechanism, that every API should implement. Implementing it in ASP.NET Core is not difficult due to the flexibility of LINQ and good integration with EF Core. [sc...

Searching in ASP.NET Core Web API

Searching in ASP.NET Core Web API

In this article, we're going to tackle the topic of searching in ASP.NET Core Web API. Searching is one of those functionalities that can make or break your API, and the level of difficulty when implementing it can vary greatly depending on your specifications. If you...

Filtering in ASP.NET Core Web API

Filtering in ASP.NET Core Web API

In this article, we will cover filtering in ASP.NET Core Web API. We'll learn what filtering is, how it's different from searching, and how to implement it in a real-world project. While not as critical as paging, filtering is still an important part of a flexible...

Protecting Data with IDataProtector in ASP.NET Core

Protecting Data with IDataProtector in ASP.NET Core

In this article, we are going to learn about the ASP.NET Core built-in data protection mechanism, IDataProtector, which we can use to encrypt and decrypt our sensitive data. Encryption and decryption are not the only features we are going to cover. We will also show...

Paging in ASP.NET Core Web API

Paging in ASP.NET Core Web API

In this article, we're going to learn how to implement paging in ASP.NET Core Web API. Paging (pagination) is one of the most important concepts in building RESTful APIs. We don't want to return a collection of all resources when querying our API. That can cause...

System Testing a REST API using C# and DalSoft Rest Client

System Testing a REST API using C# and DalSoft Rest Client

In this post, we're going to cover the recent extensions to the DalSoft RestClient library which allows you to easily test a REST API using C#. This post is aimed at anyone (devs, testers, etc) who tests REST APIs and is suitable for all levels. If you haven’t written...

Getting Started with AutoMapper in ASP.NET Core

Getting Started with AutoMapper in ASP.NET Core

In this article, we are going to learn how to use AutoMapper in an ASP.NET Core application. We are going to start by looking into what AutoMapper is and what problem it solves. Then, we are going to explain how we can use AutoMapper in our MVC application. After...

Differences Between .NET Framework, .NET Core, and .NET Standard

Differences Between .NET Framework, .NET Core, and .NET Standard

Since the birth of various .NET implementations and .NET Standard, there has been a lot of confusion regarding these topics in the development community. We will try to eliminate that confusion by explaining these topics in a simple and understandable way. Let's start...

Automated UI Tests with Selenium and ASP.NET Core

Automated UI Tests with Selenium and ASP.NET Core

Selenium is a library that helps us automate browser behavior. We can use it for different purposes, but its primary use is for automated UI testing of web applications. In this article, we are going to use Selenium to write automated UI tests and with that finish our...

How to Include AntiForgeryToken for MVC Integration Testing

How to Include AntiForgeryToken for MVC Integration Testing

In the previous article, we have learned how to write integration tests for different actions (Index and Create), but while we were testing the Create (POST) action, we faced a problem with AntiForgeryToken validation. We skipped that problem by commenting out that...

Integration Testing in ASP.NET Core

Integration Testing in ASP.NET Core

In this article, we will learn about Integration Testing in ASP.NET Core. Additionally, we will prepare an in-memory database so we don’t have to use the real SQL server during integration tests. For that purpose, we will use the WebApplicationFactory class. [sc...