How To

How to add security headers to an ASP.NET Core Application
By Tan Lee Published on Nov 08, 2024 636

To add security headers to your ASP.NET Core application, you can use middleware that adds the appropriate headers to HTTP responses.

How to read problem details JSON using HttpClient in C#
By Tan Lee Published on Jan 21, 2025 1.15K

Problem details (RFC7807) is a standardized format for error responses, which uses the `Content-Type` of `application/problem+json`, an appropriate HTTP status code (e.g., 400 – Bad Request), and a response body structured as follows:

How to use TLS 1.2 in C#
By Tan Lee Published on Dec 27, 2024 1.25K

.NET Framework 4.0 (and earlier versions) support SSL 3.0 and TLS 1.0, with TLS 1.0 being the successor of SSL 3.0.

How to Download ODBC Driver for SQL Server
By Tan Lee Published on Nov 26, 2024 997

The Microsoft ODBC Driver for SQL Server is a dynamic-link library that provides runtime support for applications using native-code APIs to connect to SQL Server.

How to install and uninstall Windows services
By Tan Lee Published on Nov 05, 2024 504

To install a Windows service developed with the .NET Framework, you can use the `InstallUtil.exe` command-line utility or PowerShell.

How to Initialize TagHelpers in ASP.NET Core with Shared Data
By Tan Lee Published on Apr 16, 2025 358

ASP.NET Core’s Razor engine is packed with superpowers. One of the most underrated? The ability to globally initialize TagHelpers with shared data giving you centralized control over UI behavior without repetitive markup or logic.

Creating a Numeric String Comparer with .NET 9
By Tan Lee Published on Apr 16, 2025 272

While exploring the new features in .NET 10, I noticed it finally includes a numeric string comparer a much-needed addition for developers working with string data that includes numeric values.

Essential Tips for Securing Your ASP.NET Website
By Tan Lee Published on Mar 29, 2025 414

In 2025, securing your ASP.NET website requires staying ahead of emerging threats by adopting robust security strategies and keeping up-to-date with the latest best practices.

Top Security Best Practices for ASP.NET
By Tan Lee Published on Mar 29, 2025 349

Are you looking to enhance the security and reliability of your ASP.NET applications, especially when it comes to building robust APIs.

Boost Your ASP.NET Core Website Performance with .NET Profiler
By Tan Lee Published on Mar 29, 2025 454

One of the most powerful tools for improving application performance is a .NET Profiler. A profiler helps you understand how your application behaves at runtime, allowing you to pinpoint inefficiencies and optimize code.

C# LINQ query and method syntax
By Tan Lee Published on Mar 27, 2025 292

LINQ is its flexibility, offering two distinct ways to write queries: query syntax and method syntax.

Group by in LINQ
By Tan Lee Published on Dec 10, 2024 469

In LINQ, the GroupBy method is used to group elements of a collection based on a specified key.