This post explains how to release a Debug version of a Roslyn code generator, and have the Visual Studio debugger open when you run dotnet build.
Author:Peter Morris
Avoid returning index.html for API calls
While writing an asp.net hosted Blazor WASM app, I’ve noticed that when I call an API on my server I receive the contents of index.html when I am expecting a 404 error. TL;DR Explanation When you first request a URL from the host and nothing is found at that address, the server will serve the …
Continue reading Avoid returning index.html for API calls
Azure Active Directory multitenant integration with Blazor WASM – Part 2
Creating a multitenant Azure Active Directory for authenticating users.
Azure Active Directory multitenant integration with Blazor WASM – Part 1
Creating a multitenant Azure Active Directory for authenticating users.
Making microservice console windows easy to identify
Running multiple apps in console windows can make it difficult to see which window is which app. Luckily, changing the title of your console app is easy.
Detect if the other end of a WebSocket has disconnected
If you need to immediately know if the other end of your WebSocket has unexpectedly disconnected, this is a solution.
Detect if the other end of a TcpClient has disconnected
A simple but effective way of checking if the other end of a TcpClient socket has disconnected.
Stop customer firewalls blocking your Blazor WASM DLLs
Enterprise companies often have strict firewall rules that can block Blazor WASM apps from downloading their required DLLs.
Here is a simple fix!
Viewing Blazor auto-generated code
When you build an app with a .razor component in it, the compiler will auto-generate code to build the render tree. If you want to see the generated code you can edit your .csproj file and add the following to your <PropertyGroup> node. After you build your application, look in the obj folder that is …
Continue reading Viewing Blazor auto-generated code
Click to confirm
If you need a validation attribute on your input object that simply requires the user to tick a box to confirm something, you can use the following The class is then consumed like so This will work with any app that uses Data Annotations as a form of validation, such as ASP.NET MVC apps or …
Continue reading Click to confirm