TekOnline

Category: .net core

  • Database Targeting Debugging in ASP.NET Core

    Overview We tracked down a user-role issue that looked like a permissions problem, but the real cause was database targeting. One user could sign in and get roles. Another user with apparently similar data could sign in but did not get the expected roles. At first glance this looked like: Those were all worth checking,…

  • Connection String FAQ

    This page explains a common ASP.NET Core pattern where the app does not keep its main database connection string in appsettings.json. Instead, startup code retrieves the value from Azure Key Vault and inserts it into the normal .NET configuration tree before the rest of the app runs. What does the startup code actually look like? The…

  • Multiple selections (multi cursor) in Visual Studio 2022 and VS Code

    Multiple selections (multi cursor) in Visual Studio 2022 and VS Code

    For a while I thought it was only available in vs code until I found this stackoverflow post! 🥳

  • How to add bearer token authentication to NSwag api.

    NSwag is a game changer for working with Angular and Net Core, you write your endpoint code, and swashbuckler generates your swagger docs. You can find more info on swashbuckler here: https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle?view=aspnetcore-6.0&tabs=visual-studio Where NSwag helps, is that it looks at the swagger document and generates all the typescript code, which includes the models, the functions…