Blazor WebAssembly Lazy Loading Changes from .NET 7 to .NET 8
Allen Conway's .NET Weblog
by
4M ago
Lazy Loading is an essential tool used in web client development to defer loading of resources until requested by the user, as opposed to loading everything up-front which is expensive. Blazor has had the ability to lazy load Razor Class Libraries for the last several versions of .NET, but there are some updates in .NET 8 that aren't well documented. To not be completely repetitive, here are the basic steps for implementing lazy loading in your Blazor WebAssembly application direct from the Microsoft docs: Lazy load assemblies in ASP.NET Core Blazor WebAssembly The issue is the Project ..read more
Visit website
Dealing with Time Skew and SAS Azure Blob Token Generation: 403 Failed to Authenticate Error
Allen Conway's .NET Weblog
by
5M ago
If you're working with the Azure.Storage.Blobs SDK in .NET and generating SAS tokens, you might come across an error like the following when making a call to GetUserDelegationKeyAsync(): Status 403: The request is not authorized to perform this operation using this permission Here is a sample of code that might throw this error in which the startsOn value is set to the current time: Before you start double checking all of the user permissions in Azure and going through all the Access Control and Role Assignments in Blob Storage (assuming you do have them configured correctly), this might be ..read more
Visit website
Fixing PowerShell Scripting Error in C# Code: "Exception calling ""ToString"" with ""0"" argument(s). There is no Runspace available to run scripts in this thread."
Allen Conway's .NET Weblog
by
5M ago
A bit of a niche post here, but maybe someone is searching the interwebs and this will help save some time. When running a PowerShell script in C# leveraging the System.Management.Automation library, you might run into some neuanced issues that behave differently than when running PowerShell commands directly via the command line. Here is one instance, take the following PowerShell command to install a new Windows Service: New-Service -Name "MyWindowsService" -BinaryPathName "C:\SomePath\1.0.1\MyWindowsService.exe" When running this in a PowerShell terminal, it will generate the following ou ..read more
Visit website
How to Disable Either Classic or YAML Pipelines in Azure DevOps (ADO)
Allen Conway's .NET Weblog
by
6M ago
If you have pipelines in Azure DevOps that you don't want to trigger automatically either because they are legacy and remain for reference, not currently being used, or just need to temporarily disable, there are different ways to accomplish this based on the type of pipeline. Classic Pipelines Select the Classic Pipeline and press the 'Edit' button Select 'Triggers' Uncheck the box for 'Enable Continuous Integration' Save the Pipeline YAML Pipelines Select the Classic Pipeline and press the 'Edit' button Select the ellipsis (3 dots) in the top-right hand ..read more
Visit website
Leveraging IntelliSense for Azure DevOps YAML Pipelines in Visual Studio Code
Allen Conway's .NET Weblog
by
6M ago
If you're building out YAML pipelines for Azure DevOps (ADO) and don't wish to hand roll them in the online editor provided, you can instead build them in Visual Studio Code. The 1st thing you'll be hunting down though is IntelliSense and auto-complete assistance for your .yml pipeline code. Out-of-the-box, VSC doesn't have this support other than generic YAML language services so you'll want an extension. There is an extension for this and name of it is simply, 'Azure Pipelines' which can be found in the Marketplace.  The issue is the Microsoft extension for the ADO pipelines is ..read more
Visit website
Reading Environment Variables, AppSettings, LocalSettings, and User Secrets Seamlessly Across Environments in ASP.NET
Allen Conway's .NET Weblog
by
8M ago
One of the biggest challenges we face in modern cloud solutions is making it so sensitive configuration data can be read seamlessly across all environments from the local dev environment all the way to production. This isn't really a new issue, but one that has multiple ways to accomplish some easier than others. For a sample use case, we might have a database connection string with sensitive information that needs to work seamlessly in code for local, Dev, QA, Stage, Prod, etc. without a lot of special hooks or handling in code. One way to handle this in the cloud regardless of deployment ..read more
Visit website
How to Reorder the Profiles in the Windows Command Prompt / Terminal
Allen Conway's .NET Weblog
by
10M ago
The Windows Command Prompt / Terminal tool has gotten more robust over the years, and makes using a tool like ConEmu (that I used for years), less of a pressing need. That's because the tabbed profiles are available, and makes selecting new tabs for different profile types (Bash, PowerShell, Azure Cloud Shell) a breeze. However there isn't a configured setting option for reordering for those of us that like to organize this sort of thing (i.e. making the ones I use the most at the top of the list). There is a feature enhancement on GitHub (Profile reordering for Settings UI), but for now there ..read more
Visit website
The State of JavaScript and Modern Web Client Development
Allen Conway's .NET Weblog
by
1y ago
Here is a link to a white paper I wrote named, 'The State of JavaScript and Modern Web Client Development.' If you need help navigating the waters at a high-level in the modern web landscape, make sure to check out the article. The State of JavaScript and Modern Web Client Development ..read more
Visit website
Overloaded Methods in TypeScript
Allen Conway's .NET Weblog
by
1y ago
If you've ever worked with a language like C# or Java you're probably often using overloaded method signatures to provide callers with an opportunity to have a similar outcome by passing a different number or type of parameters. However in TypeScript which is just a superset of JavaScript and adhering to all things JS under the covers, method overloading doesn't work the same with identical method names and parameter signature because there are no types to differentiate between. If you have (2) identical methods in JS being called the latter defined method on the prototype will be called, and ..read more
Visit website
The Absence of Pattern Thinking for Web Client Code
Allen Conway's .NET Weblog
by
3y ago
With 20 years of experience as a software engineer moving through the stack and using a lot of different languages throughout the years, I've seen a lot of good and conversely poor development implementations. I've also had the privilege of being able to work with languages (like C#) that placed a heavy emphasis as a community in  enterprise development around the mindset of using patterns and practices to make code more readable, reusable, and easier to communicate redundant and repeatable ways of creating applications and services. This has helped me immensely and provided me with a min ..read more
Visit website

Follow Allen Conway's .NET Weblog on FeedSpot

Continue with Google
Continue with Apple
OR