21 Essential Tips for Writing Clean Code in C# (.NET)

21 Essential Tips for Writing Clean Code in C# .NET

Clean code is the cornerstone of maintainable and scalable software. As developers, we strive to write code that’s not only functional but also readable and efficient. In this blog post, we’ll explore 21 essential tips for writing clean code in C# (.NET), ranging from basic principles to more advanced practices. Let’s dive in! 1. Use … Read more

Understanding Entity, Model, ViewModel, and DTO, in C#

Contents Quick Reference Detailed Breakdown 1. Entities – Database Models in Entity Framework Core 2. Models – C# Business Logic Implementation 3. ViewModels – ASP.NET MVC and Blazor Data Presentation 4. DTOs – .NET Microservices and API Communication Common Pitfalls and Best Practices Real-World Example: Building a .NET Enterprise Blog System Best Practices Summary Key … Read more

KMAC: The Modern Heavyweight in Cryptographic Authentication

A complete developer guide for implementing Keccak Message Authentication Code (KMAC) in .NET applications. This guide covers everything from basic concepts to advanced implementation patterns, security considerations, and performance optimization techniques. Ideal for developers working with cryptographic authentication in .NET 9 and later versions. Quick Summary (TL;DR ): KMAC (Keccak Message Authentication Code) is a NIST-standardized … Read more

Key Vault – Failed to sync the certificate.: The service does not have access to ‘*’ Key Vault

TLDR; How to fix Failed to sync the certificate.: The service does not have access to ‘*’ Key Vault Hello! You may want to read this post if you have come across one of the following errors related to Key Vault: Failed to update all the resources with the latest certificate Failed to sync the … Read more

Error CS0234: The type or namespace name ‘HelloWorld.Core’ does not exist in the namespace ‘HelloWorld’

Warning MSB3245: Could not resolve this reference. Could not locate the assembly “HelloWorld.Core”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. Error CS0234: The type or namespace name ‘Core’ does not exist in the namespace ‘Document360’ (are you missing an assembly … Read more

How to Run Console Applications in Azure DevOps Pipelines (Step-by-Step Guide)

Learn how to run console apps on Azure DevOps without hosting! I came across multiple similar questions on StackOverflow for running a Console Application on Microsoft Azure. Answers mostly suggesting running the console app on WebJobs. Here I’m sharing another way of running console apps on Microsoft Azure DevOps, with Azure Pipelines. [Azure]: Run your … Read more

How to fix window.open(url) opening two tabs

#javascript #tip: How to fix window.open(url) opening two tabs window.open(‘url’) may open double tabs when clicked in IE/FF/etc. Google Chrome is superior and is the first one to bring the latest updates from the W3C announcements, in my opinion! Browsers may behave differently for “window” functions.Prefix “javascript:” for getting standard implementation output. use javascript:window:open(‘url’) instead

ssh: connect to host x.x.x.x port 22: Connection timed out

aah-connection-timeout-port-22

Did you just change some network configuration on your Ubuntu virtual machine and now you’re not able to connect? Here’s how you can fix the ssh connection. how to fix – ssh: connect to host x.x.x.x port 22: Connection timed out Background I spinned up an Ubuntu (18.04.3 LTS, Bionic Beaver) virtual machine on Azure … Read more

HTTP Error 500.0 – ANCM In-Process Handler Load Failure

With ASP.NET Core 2.2 support added to Azure Web Apps – it’s a bit tricky to host multiple applications using Virtual Directories. If you just publish your web apps using Visual Studio on different virtual, directories – not more than one will work at the time I’m writing this. You need to make certain changes … Read more