Tutorials on ASP.NET Core, Blazor, jQuery, JavaScript, Entity Framework, Identity, WordPress, SQL, HTML & more


How to call a JWT secured APIs with jQuery AJAX [with source codes]

Last Updated: January 17, 2024

JWT jquery

JWT authentication is a popular standard to secure the Web API. In my last tutorial I explained in full details about ASP.NET Core JWT Authentication and Authorization of Web API, if you haven’t read it make sure you do it now.

(more…)

ASP.NET Core JWT Authentication and Authorization of Web API [Detailed]

Last Updated: January 17, 2024

JWT JSON Web Token

What is JWT in .NET - JWT which stands for "JSON Web Tokens" is an open standard method for securely transmitting information between parties as a JSON object (commonly known as ‘Token’). The token is digitally signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA. Since the token is signed with a public/private key pairs, the signature certifies that only the party holding the private key is the one that signed it. The JWT is generated by the authentication server when a client successfully logs in. This token contains the user’s identity and access rights and is then sent with every API request (which the client makes) as a bearer token in the authorization header.

(more…)

How to Install Bootstrap Package in ASP.NET Core Application in Visual Studio

Last Updated: August 6, 2022

install bootstrap visual studio

Visual Studio has many tools available that you can use to install client-side packages such as Bootstrap & JQuery. Here in this tutorial I will discuss 2 popular ones which are:

  1. LibMan (LibraryManager)
  2. Bower

I will also give you an example of this installation process. So make sure to read this tutorial on one go.

(more…)

Learn JavaScript Promise method in easiest way

Last Updated: June 3, 2021

javascript promise

The Promise is an object that may produce a value, sometime in the future, on the completion of an asynchronous operation. The produced value can be either a successful result or an error .

(more…)

What is Endpoint Routing, Implementing it from start [with codes]

Last Updated: April 29, 2022

endpoint routing

The concept of Routing is very vast and I have covered it in 6 tutorials which are:

So make sure you cover each of these one by one.

ASP.NET Core 3.0 brings a new concept of Endpoint routing which scans incoming HTTP requests and maps them to Endpoint in the application. Endpoints can be controllers, razor pages, Blazor, SignalR and gRPC. This allows different types of Dot Net apps to work together without any problem. Endpoint Routing improves the overall routing mechanism feature in Dot Net.

In Dot Net 6.0 endpoint routing middleware wraps the entire middleware pipeline, therefore there's no need to have explicit calls to endpoints methods described in this tutorial. Simply looks at my tutorial on ASP.NET Core Routing if you are using Dot Net 6. For Dot Net 5.0 and earlier kindly continue.
(more…)

How to Implement Cookie Authentication in ASP.NET Core

Last Updated: February 20, 2024

cookie authentication

Cookie Authentication in ASP.NET Core is used to implement our own Custom Authentication Logic without using ASP.NET Core Identity in any way.

(more…)

How to Enable Cross-Origin Requests (CORS) in ASP.NET Core

Last Updated: February 20, 2024

enable cors aspnet core

Browser security prevents a web page located on a domain to make requests to another web page which is located on a different domain. This restriction is called the same-origin policy. This security feature prevents malicious sites to read data from another websites.

(more…)

jQuery Interview Questions – Top 100 Answers

Last Updated: June 21, 2021

jquery interview questions

The below jQuery Interview Questions with answers will help you to succeed every job interview. These interview questions are divided into 4 parts: (more…)

How to use Select2 jQuery plugin in ASP.NET CORE

Last Updated: June 21, 2021

select2 jquery aspnet core

Select2 is a jQuery based replacement for HTML Select Control. It supports searching, remote data sets, and infinite scrolling of results. It is available in GitHub and is free to use for everyone.

(more…)

How to Call Web API from jQuery [ASP.NET Core Edition]

Last Updated: October 21, 2023

consuming aspnet core api in jquery

In my ASP.NET Core tutorial on Web API I created a REST Web API having GET, POST, PUT and DELETE methods. This API was performing CRUD operations on Reservation objects. Now in this tutorial I will Call this Web API from jQuery. I will use jQuery AJAX to pass Parameters and Credentials to the Web API. So let's get started.

Make sure to keep the Web API project in running state so that the API can be called by jQuery code.

This tutorial is a part of the ASP.NET Core Web API series which contains 5 tutorials to master this area:

(more…)