Handling CORS in .NET Framework and ASP.NET Core with DeveloperSharp
Cross-Origin Resource Sharing (CORS) restrictions typically surface when browser-based clients initiate HTTP requests to backend APIs. The browser enforces security policies that differentiate between standard requests and preflighted (complex) requests, the latter triggering an OPTIONS call before the actual payload transmission. Many traditio ...
Posted on Thu, 17 Sep 2026 16:25:01 +0000 by cainscripter
Integrating NLog in a .NET Core Web API
1. Installing the NLog Packages
Add the following NuGet packages to your project:
NLog
NLog.Web.AspNetCore
These can be installed via the Package Manager Console or the .NET CLI.
2. Configuring NLog
Create an NLog.config XML file in the project root. Set its Build Action to Content and Copy to Output Directory to Copy if newer. Below is a sam ...
Posted on Thu, 03 Sep 2026 16:41:06 +0000 by mgzee
Understanding IActionFilter in ASP.NET Core Web API
This article provides an overview of IActionFilter in ASP.NET Core Web API, focusing on its execution order, attribute usage, and registration methods. The environment used is VS2019 with ASP.NET Core 3.1.
Execution Order of IActionFilter
The filter is called after the controller's constructor is executed.
The OnActionExecuting method of IAct ...
Posted on Tue, 25 Aug 2026 16:21:48 +0000 by Xurion
XMLHttpRequest: Complete Technical Reference
XMLHttpRequest Overview
XMLHttpRequest provides a JavaScript API for making HTTP requests directly from the browser. It enables dynamic page updates without full page reloads, allowing applications to exchange data with servers in the background.
Request Lifecycle
Sending GET Requests
// Create a new XHR instance
const request = new XMLHttpRequ ...
Posted on Sun, 23 Aug 2026 16:15:26 +0000 by PhilGDUK
Integrating SuperSocket WebSocket Server in ASP.NET Core Web API
To build a WebSocket server using SuperSocket in an ASP.NET Core Web API project, install the SuperSocket.WebSocket.Server NuGet package (referred to here as SuperWebSocket). This guide demonstrates how to embed and manage a WebSocket server within a .NET 5+ Web API application using version 2.0.0-beta.10 of the library.
The approach assumes fa ...
Posted on Sun, 09 Aug 2026 16:53:19 +0000 by edwin_h
Getting Started with Ocelot: A Simple API Gateway Implementation
Ocelot is a popular API gateway solution for .NET developers. In this guide, I'll walk you through a basic implementation to get you started with Ocelot.Before beginning, ensure you have .NET Core installed. For this example, I'm using .NET Core 3.1 with Ocelot package version 16.0.1. Start by creating a new Web API project and installing the O ...
Posted on Thu, 02 Jul 2026 16:45:39 +0000 by rawky
Implementing JWT Authentication in ASP.NET Core Web API: Building an Authentication Center
This series provides a concise guide on using JWT (JSON Web Tokens) to create tokens for authentication in an ASP.NET Core Web API.
1. Create a ASP.NET Core Web API Project
We'll be using Visual Studio 2019 with .NET Core 3.1.
2. Add JWT Services
2.1 Install the NuGet Package
Install System.IdentityModel.Tokens.Jwt via NuGet Package Manager.
2. ...
Posted on Sun, 07 Jun 2026 18:09:41 +0000 by kitcorsa
Configuring Swagger Documentation for ASP.NET Core Web APIs
Project Initialization
To begin, launch Visual Studio and create a new project using the "ASP.NET Core Web Application" template. After naming the solution and selecting a location, choose the API template targeting .NET Core (specifically version 3.1). For simplicity in local testing, you may uncheck the "Configure for HTTPS" option found in t ...
Posted on Sat, 09 May 2026 01:36:54 +0000 by mjm