-
Create Solutions & Class Diagrams with SolutionUtil (slnutil)
New features in SolutionUtil! 1) Create entire solutions (including MAUI with xUnit Tests) and 2) UML class diagrams from .NET Assemblies
-
How to Add Performance Counters to your .NET Core Application
The post discusses ways to monitor the performance of .NET Core applications for DevOps observability and for performance tuning. We start by explaining how to implement performance metrics in .NET Core applications using System.Diagnostics.Metrics. We wrap up by showing you how to use a tool called dotnet-counters to view the live performance data.
-
Fix: Azure App Services Log Stream is Empty for .NET Core App
When you’re trying to debug your .NET Core app that’s running on an Azure App Service, the Log Stream is an essential tool. So how do you connect the console logs from your .NET Core app to the Log Stream output?
-
Angular WebAPI Project using .NET Core gets ‘404 Not Found’ or runs on wrong port
My Angular / WebAPI application suddenly stopped working from Visual Studio and VSCode. Turned out that I was missing an environment variable.
-
3 Common Problems with ClaimsIdentity and ClaimsPrincipal in ASP.NET Core
In .NET Core, the ClaimsIdentity class represents a user in your application. It helps describe who they are and helps manage the list of claims which describe what they can do. But if you use the wrong constructor on ClaimsIdentity or provide the subtly wrong information to that constructor, you might see some strange behavior. …
-
ASP.NET Core Integration Tests with Selenium & WebApplicationFactory
WebApplicationFactory<T> is one of those awesome features in ASP.NET Core that practically nobody knows about. WebApplicationFactory<T> lets you quickly and easily run integration tests against your ASP.NET Core MVC or Web API application without having to deploy the app to an actual server like Kestrel or IIS. Instead of running in a “real” server, your…
-
Configure VSCode debugging to use ASP.NET Core MVC ‘watch’ auto-recompile of C# classes and cshtml views
So there’s VSCode (aka. Visual Studio Code) and there’s Visual Studio 2019. If you’re developing an ASP.NET Core MVC application using Visual Studio 2019, when you’re running the application in debug mode, if you modify one of your cshtml views, your application that’s running in the browser automatically picks up the change. Without having to…
-
WebApi Core / Swagger: “failed to load API definition” error
I was working with some ASP.NET WebApi code and needed to test something using the Swagger UI. Usually, it’s just a matter of starting the project and going to your /swagger directory. Unfortunately, in this case, I went to my swagger URL and got an error saying “Failed to load API definition — Fetch error…
-
GitHub Actions for Building, Testing, and Deploying .NET Core & ASP.NET Core Apps
Seems like there’s a lot of action(s) happening over on GitHub. How do I get a piece of that action(s)? Wheee! Puns! (I’ve been cooped up in my house too long.) So if you’re a .NET Core developer or an ASP.NET Core developer who maybe uses Entity Framework Core (EF Core), how do you deploy your apps using GitHub…
-
Some Model Properties Not Binding in ASP.NET MVC Core
[TL/DR? – skip to the bottom] I ran into a problem with an ASP.NET MVC Core app today and it took me a while to figure it out. Here’s the problem: on an extremely simple and straightforward form, I couldn’t get a field in my model to POST back to the server. Every time that…