Code Maze Author

Marinko Spasojević

Hi, my name is Marinko Spasojevic. Currently, I work as a full-time .NET developer and my passion is web application development. Just getting something to work is not enough for me. To make it just how I like it, it must be readable, reusable, and easy to maintain. Prior to being an author on the CodeMaze blog, I had been working as a professor of Computer Science for several years. So, sharing knowledge while working as a full-time developer comes naturally to me.
Also find me here:


MY ARTICLES:

IdentityServer4 UI and Web API Basic Security

We have set up our identity server but we lack UI for the users to enter their credentials. We’ve shown how we can retrieve our token but for better user experience, we have to add UI to our Authorization Server. So, adding IdentityServer4 UI is our goal for this...

IdentityServer4 Integration with ASP.NET Core

In this article, we are going to learn about IdentityServer4 Integration with the ASP.NET Core project. We are going to start with some explanations related to JWT, OAuth, OpenIdConnect, and Endpoints, to get familiar with the basics. After the theory part, we are...

Two-Step Verification with ASP.NET Core Identity

The two-step verification is a process where a user enters credentials, and after successful password validation,  receives an OTP (one-time-password) via email or SMS. Then, they enter that OTP in the Two-Step Verification form on our site to log in successfully. We...

User Lockout with ASP.NET Core Identity

The user lockout feature is the way to improve application security by locking out a user that enters a password incorrectly several times. This technique can help us in protecting against brute force attacks, where an attacker repeatedly tries to guess a password. In...

Email Confirmation with ASP.NET Core Identity

Email Confirmation is quite an important part of the user registration process. It allows us to verify the registered user is indeed an owner of the provided email. But why is this important? Well, let's imagine a scenario where two users with similar email addresses...

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 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...

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

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

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...

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...

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

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

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

Testing Controllers with Unit Tests and Moq in ASP.NET Core

In the previous article, we learned how to write Unit Tests by using the xUnit and the different attributes that xUnit provides for us. We've also seen how to test validation rules inside a single validation class. But what about controllers and all the actions...

Unit Testing with xUnit in ASP.NET Core

This is the first article from the series where we are going to present different topics related to unit testing with xUnit in ASP.NET Core. Before we start with unit testing with xUnit, we are going to give a brief overview of the xUnit tool and our starting project....

Modifying Data with Entity Famework Core

Until now, we have talked about the EF Core integration into the ASP.NET Core app, how to configure nonrelational properties and how to create relationships in EF Core. Additionally, we talked about migrations and the way to use queries to fetch the data from the...

Database Queries in Entity Framework Core

In this chapter, we are going to talk about Queries in Entity Framework Core. In previous articles, we have already created and prepared the database with the required configuration. So, in this one, we are going to populate our additional tables with data and start...