Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • JavaScript • Angular
Contact   •   Articles   •   Products   •   Support   •  
Ad-free experience sponsored by:
West Wind WebSurge - Http Request and Load Testing for Windows

Recent Weblog Posts

ASP.NET (265) .NET (145) JavaScript (70) Windows (67) jQuery (61) ASP.NET Core (55) Visual Studio (53) IIS (48) AJAX (45) Csharp (45) HTML (42) WPF (37) ASP.NET (34) Localization (32) LINQ (30) WCF (28) Personal (27) MVC (26) HTML5 (24) FoxPro (22) Security (22) Angular (20) .NET Core (19) CSS (19) C# (19) Web Services (19) Web Api (16) COM (16) ADO.NET (15) Vista (12) XML (11) HTTP (10) IIS7 (10) Sql Server (9) Microsoft AJAX (8) Markdown (8) IIS7 (7) West Wind Ajax Toolkit (7) Web Connection (7) WebView (6) Entity Framework (6) Internet Explorer (6) Html Help Builder (5) Markdown Monster (5) Mobile (5) Live Writer (5) OWIN (5) C++ (5) ASPNET5 (5) Software Development (5) SignalR (5) WinForms (5) Silverlight (4) Source Control (4) Westwind.Globalization (4) Cordova (4) NuGet (4) Office (3) Opinion (3) Networking (3) Help Builder (3) ISV (3) LetsEncrypt (3) Conferences (3) DataBinding (3) Web Browser Control (3) WebLog (3) Razor (3) RegEx (2) RSS (2) Speaking (2) Visual Studio Code (2) Tools (2) Dotnet (2) ASP.NET vNext (2) Bugs (2) .NET Standard (2) Addins (2) Installation (2) Help (2) Linux (2) Migration (1) Maui (1) Musings (1) Graphics (1) Hardware (1) IOS (1) iPhone (1) JSON (1) Visual Studio (1) ADO.NET (1) Authentication (1) Blazor (1) Blogging (1) Angular JavaScript (1) ASP.NET Markdown (1) Chocolatey (1) Control Development (1) Credit Card Processing (1) Cross-Platform (1) Dynamic Types (1) FireFox (1) Flexbox (1) Deployment (1) Travel (1) Typescript (1) VS Code (1) Testing (1) Threading (1) rxJs (1) RazorPages (1) SEO (1) WebSockets (1) WFH (1) WebView2 WPF (1) Web Deployment Projects (1) Web Design (1) Web Development (1) Web Assembly (1) Web (1) WSL (1) wwHoverPanel (1) Windows-Terminal (1) Windsurfing (1)

Windows Authentication with HttpClient

In this short post I review how to use HttpClient with Windows Authentication security using Negotiate or NTLM authentication schemes, which oddly is not documented in the official documentation for the `CredentialCache` class used to handle authentication header generation in HttpClient.

Back to Basics: Add an ASP.NET Runtime Information Startup Banner

In almost every .NET Core Console application I end up adding a startup banner with some basic runtime information so I can see at a glance what environment I'm running in. I also add the URLs and any other application specific information that might be useful. In this short post I show a few things I display and how I reuse this functionality since it practically goes into every application I run.

Discovering new C# String Pattern Matching Features

I admit it: I haven't been using the new C# pattern matching features a lot, but every once in a while ReSharper smacks me in the head and points out a good pattern that not only makes the code more compact, but also makes it more readable. In this post I talk about a few patterns that help with null and string casting and with comparing values in a more natural way.

WebView2 Flashing when changing TabControl Tabs

I've been running into major issues with the WebView control and TabControls in WPF where switching between tabs that contain WebView controls causes a very annoying white flash. In this post I demonstrate the problem and provide an arcane fix that works around this frustrating issue.

Launching Visual Studio Code cleanly from a .NET Application

Visual Studio Code has become the mainstay editor for many developers. If you have developer focused applications and you need to externally display text or code content, it would be very useful to pop open VS Code to display external text/code content. This sounds simple enough, but Code both on Windows and Mac has some peculiar launch behaviors that make this a little more tricky than you might think, especially if you need to make sure that you can do it across platforms.

Using the WebView control to capture HTTP Request Content

Need to capture requests when navigating the new Edge WebView2 control? The control supports this but the way that you do this is a little less obvious than you might be used to from other browser controls. Here's how to do it.

WebView and Modal Dialogs in WPF Async Code

Another day another problem with the WebView control - this time dealing with certain Windows dialogs crashing the WebView control and making it unresponsive so that the control has to be reloaded or - more commonly the application has to be restarted.

Markdown Monster 2.0 is here

It's been a long slow road but Markdown Monster 2.0 is finally here. This update features a number of internal updates to facilitate future development improvements. In this post I go over some of the changes in the new release and some of the challenges that had to be worked through to get here.

Thoughts on Async/Await Conversion in a Desktop App

I spent the last month or so working through Markdown Monster's code to switch from mostly sync code to async code. This change was forced on me by an Async Cascade triggered by a third party dependency of a component (the WebView2 control) and ended up requiring massive changes throughout the app. In this post I go over some of the issues I ran into converting from sync to async along with some thoughts on the pitfalls.

Locked Files When Publishing .NET Core Apps to IIS with WebDeploy

When using Visual Studio's Publish Web Site feature with ASP.NET Core you may get frustrating errors when publishing to already running sites as files on the server are locked and can't be updated until the site is shutdown. Turns out the default settings don't unload the application before publising, but there's a simple solution to unload before publishing and the restart the application.

Running .NET Core Apps on a Framework other than Compiled Version?

I get asked frequently about whether a lower version of .NET Core will run on a machine that only has a more recent version of the .NET Core runtime installed. The short answer is 'No it won't run' but there are a few nuances to this simple answer.

WebView2 Home and End Key Problems inside of WPF TabControl Containers

Another day another WebView2 quirk to work around: This time running into issues with the WebView2 not processing Home and End keys properly as they are being hijacked by a parent TabControl and its TabNavigation keystroke handling.

Async/Await Calls Gotcha with the CSharp ? Null Propagator

Null propagation in C# allows for short circuiting of void method calls, but when using result-less `await` async calls, this behavior works decidedly different, resulting in null exception runtime errors. While this behavior makes sense when you break down the command, it's certainly not obvious. In this post I break down the how and why of the failure and how to work around it.

Taking down the Markdown Monster Source Code

With a heavy heart and a lot of hand wringing, I decided last week to take down the Markdown Monster source code from the public GitHub repository due to rampant abuse of the code to get around licensing restrictions. In this post I give some insight on why I made this decision and provide some general thoughts around the state of software development for software tools.

WebView2: Forwarding Alt Keys to a Host WPF Window

I've been puzzling over how to reliably integrate keyboard forwarding from the WebView2 control into WPF host forms. Unlike the IE WebBrowser control the WebView2 doesn't automatically forward Alt keys to the host form so special handling is required. In this post I describe why this is a problem and show the workaround to make this work.

LiveReloadServer - A Generic Local Static Web Server with Live Reload based on .NET

I've released v1.0 of my LiveReload Web Server which is a local static file Web server that includes support for LiveReload, plus some optional dynamic features for rendering self-contained RazorPages and Markdown content. This Dotnet Tool is fast, easy to use and includes a host of convenience features that try to make the process of working with local Web content quicker and easier.

Role based JWT Tokens in ASP.NET Core APIs

ASP.NET Core Authentication and Authorization continues to be the most filddly part of the ASP.NET Core eco system and today I ran into a problem to properly configure JWT Tokens with Roles. As I had a hard time finding the information I needed in one place and instead ended up with some outdated information, I'm writing up a post to hopefully put all the basic bits into this single post.

Opening an Admin Windows Terminal from Visual Studio

Opening Windows Terminal from another application is a bit of a pain. In particular I wanted to open Windows Terminal as an External Tool from Visual Studio and found it wasn't as easy as referencing the `wt.exe` executable. Opening as an Administrator adds additional complexity. In this post I'll talk about the use case of an External Tools and the settings to launch both a regular and admin Windows Terminal instance from External Tools.

Chromium WebView2 Control and .NET to JavaScript Interop - Part 2

In part 2 of this post series I take a look at how to use the new Chromium WebView2 to interact with the DOM document and interoperate between .NET and JavaScript, both calling into JavaScript from .NET, and calling into .NET from Javascript

Taking the new Chromium WebView2 Control for a Spin in .NET - Part 1

This is Part 1 of a two part article that gives an overview of the new WebView2 Web browser control that is based on Edge Chromium. In Part 1 I look at the basics of what's needed to run the control using the WebView runtime, and how to get the control embedded and configured to use for basic HTML tasks. In Part 2 I look at interaction between the .NET application and WebBrowser and Javascript.

Blank Zero Values in .NET Number Format Strings

Recently needed a way to display a set of numbers in a WPF List display that required that values with a value of `0` display blank - using no explicit code or model changes. I learnt something new today: There's actually a way to use C# format strings to format numbers separately for positive, negative and zero values. Here's how that works.

Watch out for .NET Core Runtime Bitness for IIS Installs

I recently ran into a snag with one of the my Windows Server installs of an upgraded .NET Core 5.0 application. It turns out I didn't install .NET Core 5.0 correctly because I made some bad assumptions of what I needed to install to run my application, even though it previously ran on .NET Core 3.1. Here's more detail on what the failure looks like and how to properly install .NET Core 5.0.

Upgrading several of my Applications and Libraries to .NET 5.0

Over the last week I spent some time upgrading several .NET Core Web applications and libraries from .NET Core 3.1 to .NET 5.0. I'm happy to say that this was always a non-event as the process went very smooth for once. In this post I'll talk about what I found and also offer some commentary why we should celebrate this update and push Microsoft to continue along this path.

PC and Mac with single Mouse and Keyboard Setup on Dual 4k Screens

A little while back I posted a couple of pictures of my new desk setup using both a Windows Laptop (a 2019 Dell XPS) and a Macbook Pro (2016) along with two 4k displays. I'm also using a single Logitech Mouse and Keyboard combination to control both machines and quite a few people were asking about how this works. So I decided to write a quick review of my setup here to give a few more details that are hard to give in a Twitter conversation.

Window Activation Headaches in WPF

Ran into a problem with properly activating a WPF when launching from Explorer and indirectly trying to activate an already running instance 'from within itself'. It seems simple, but windows focus-stealing restrictions can cause problems with actually getting focus into an application window. Here's how.

Creating Custom .NET Project Types with .NET CLI Project Templates

Custom project templates can be extremely useful in quickly creating new projects especially for extensible applications. They're also great for creating specialized setups to make it quicker to hit the ground running. With the .NET SDK tooling new project templates are now easy to create and this post takes you through the process.

Wrestling with Clipboard Images in WPF

Retrieving images from the clipboard with WPF seems so simple, but once you get into it you'll find that there are lots of problems with reliable image retrieval that works for all images. In this post I talk about the different issues you're likely to run into and one hacky but flexible solution to better image support by selectively sniffing image formats and using different clipboard retrievals based on the image format.

Don't get burned by missing await Calls for Async Code in ASP.NET Core Middleware

I recently got burned in an upgraded ASP.NET Core server application where a missing `await` statement caused wildly inconsistent and puzzling output failures. While a simple thing to avoid, once introduced it's possible to live with this error for some time before it manifests. In this post I show a scenario where a missing `await` was causing infrequent HTTP response errors, even though the client apparently receives a valid response.

Using .NET Core Tools to Create Reusable and Shareable Tools & Apps

Dotnet Tools offer a simple way to create, publish and consume what are essentially .NET Core applications that can be published and shared using the existing NuGet infrastructure for packaging and distribution. It's y quick and easy to build tools that you can share either publicly or privately. In this article I make a case for why you might use or build a Dotnet Tool and show how create, build, publish and consume Dotnet tools as well as showing some examples of useful tools I've build and published.

Using the brightness() CSS Filter to generically highlight Content

Filters are not new in CSS, but their often overlooked for providing some useful generic behaviors for things like hover styling or nice background effects. In this post I discuss how to use the brightness() filter to create a generic button hover behavior and also briefly discuss the newish `backdrop-filter` property.

Excluding Files and Folders in Visual Studio Web Site Project

I still use Web Site projects frequently for purely static Web sites that don't require a proper build process where 'DevOps' of any kind is overkill. Invariably when using Web site projects though, I end up requiring that 1 or 2 files are excluded on publishing and every time I do I spent a while trying to find the information how to do that in the `.pubxml` file. Well no more - I'm writing it down this time.

Handling SPA Fallback Paths in a Generic ASP.NET Core Server

When building ASP.NET Core backends for SPA applications one thing that you have to worry about is how to handle client side routes that end up being fired against the server through external or reloaded links. While ASp.NET Core has built-in support for this if you build a generic Web server, you might need a little more control on how to handle the Fallback routing functionality. Here's how.

A .NET Color Console Helper

In this short post I'll discuss a small Console helper class I've been using to make it easier and more consistent to use colors with the .NET Console command. The .NET Console support colors easily enough, but switching colors and resetting them can be a bit tedious, so these helpers make working with color a bit easier.

Mirror your iOS Device Screen on Windows with the free 5KPlayer

Apple doesn't exactly make it easy to use iOS devices on Windows and one complication is how you can cast your iOS device to a Windows screen. This is useful for presentations or screen captures that I often do and in the past i've gone through a number of shady tools that have come and gone. Recently ran into 5KPlayer which is a nice video player that as a bonus acts as an AirPlay server and makes short work of casting iOS content to Windows

Using Angular's Live Reload Web Server to Refresh Pages on a Phone

Live Reload is now common for client side application development and it has become ubiquitous for Web development. But setting up Live Reload to work on a phone is not quite so obvious. In this post I'll walk you through what you need to do to get Live Reload to work on a mobile device for more productive on-device execution.

Adding Additional Mime Mappings to the Static File Provider

If you're using the Static File Provider in ASP.NET Core you might need to add some additional extensions that are not handled by default. For example, if you host a Blazor site in your own application an additional mime mapping for `.dll` is required. Here how you can map extra extensions to the Static File middleware.

ASP.NET Core WebSockets and Application Lifetime Shutdown Events

WebSockets in ASP.NET Core are easy to use but due to the simple model it's easy to forget that socket requests are long lived and can linger for a long time in the background and that can cause problems when an application needs to shut down cleanly. Luckily there's an `IHostApplicationLifetime` interface available that allows hooking shutdown operations and that provides the necessary cancellation tokens to allow an WebSocket connection to be terminated in response to a shutdown event. This post shows how this works.

Fixing Adsense Injecting 'height: auto !important' into scrolled Containers

Ran into a weird issue today with AdSense in one of my older Web sites. I noticed that the site was not using the custom scrolling in containers that I've been using for years. Turns out Google's AdSense on this page is injecting some extra styling that changes the scroll behavior - and the way the entire page works. Here's what the problem is and how you can work around it.

Using WSL to Launch Several Bash Commands from an Application

Struggled today with launching WSL from a Windows application to automate an external build process. Turns out this was a lot harder than it should have been due to some quirks on how the `wsl.exe` and `bash.exe` are registered by the Windows Sub System for Linux.

Static Constructor Failures and Declaration Order

I ran into an ugly problem today with an application where nested static constructors where not doing the expected thing - failing to provide a value when one should be available. It turns out the issue has to do with constructor calls nesting and the order in which auto-initialized values are assigned.

Missing Sharing Tab in Windows Explorer and Sharing with PowerShell

On several of my machines I've found that the 'Sharing Tab' in Explore had gone missing and I've been unable to create a share through the Windows UI. Apparently some update or software installed mucked with my settings that created an explicit exclusion to disable this Shell Addin. In this post I describe how to fix this problem and then offer several solutions: Fixing the UI problem and maybe more usefully show how you can use Powershell to share a folder or drive instead of the Windows UI.

Displaying Nested Child Objects in the Windows Forms Designer Property Grid

The Windows Forms designer sometimes feels very dumb - one of those times is when dealing with nested properties on a control which by default is not displayed as an expandable property that you can just dig into. Instead you have to do a bit of busy work using a TypeConverter to make it possible to create an expandable property in the designer. Here's how.

Content Injection with Response Rewriting in ASP.NET Core 3.x

If you're creating middleware components you might need at some point to inject content in the existing HTTP output stream in ASP.NET Core. In this post I discuss how to intercept Response output by using a customized stream, modify the data and update the final output generated, effectively providing response filtering.

Back to Basics: Rewriting a URL in ASP.NET Core

Sometimes in an application you need to take over the routing process with some custom processing that acts on an incoming URL and actually has to go to another URL. This can be a simple relinking task from old content to new, or it can be more complex where you access a specific URL on the public site that actually needs to be processed by another URL altogether.

Troubleshooting Windows Sleep Insomnia

Windows long has had problems making machines stay in Sleep mode. In this post I describe some of the problems and likely solution by using `powercfg.exe` to hunt down and disable devices that can wake the computer from sleep.

Working with IWebHostEnvironment and IHostingEnvironment in dual targeted ASP.NET Core Projects

In ASP.NET Core 3.x Microsoft introduced a new `IWebHostEnvironment` to replace the obsoleted `IHostingEnvironment`. While that works for top level applications this can cause some complications for multi-targeted libraries that need to support both .NET Core 2.x and 3.x. This post describes the problems and offers a few workarounds.

Null API Responses and HTTP 204 Results in ASP.NET Core

ASP.NET Core's default API handlers return an HTTP 204 response for null value results. This is meant to be a convenience feature, but if your calling API depends on a proper JSON response or an HTTP 200 result code, it can cause applications to break. In this post I'll describe why this can be a problem and how you can return proper JSON results for null values.

Deleting Problem Folders and Files on Windows: Could not find this Item Error

Ever have a problem not being able to delete a file or folder because the filename is invalid? You see it in Explorer, but you can't delete or move the file? Well I just ran into this issue and after some digging figured out that you use extended path syntax `\\?\` to get around some interesting naming and sizing issue with Windows path operations.

ASP.NET Core IIS InProcess Hosting Issue in .NET Core 3.1

Ran into a nasty little issue with a hosted ASP.NET Core 3.1 application where InProcess hosting was not working. It turns out I hit a regression bug in 3.1 that causes InProcess hosting to fail if there are certain dependencies.

A HighlightJs Copy Code Badge Component

In this post I describe a small, very specialized addon component for the HighlightJs Syntax highlighter that displays a badge that lets you copy the code snippet and displays the syntax language. The post covers how to use this simple component, and a look behind the scenes on how it works.

VSIX Installer Extension Manifest and Visual Studio Version Numbers

Ran into a problem with updating a Visual Studio extension today where the VSIX installer first failed to install for the latest version of Visual Studio and then failed to enable the option to install for that same version. Turns out it was related to incorrectly specifying the right version number for VS 2019 and in this post I show how to use the correct (and somewhat unexpected) version syntax.

Creating Angular Synchronous and Asynchronous Validators for Template Validation

Validations are a key feature of any business application and in Angular there's an infrastructure for building validators built in. A number of existing validators provide the basics but if you have custom business logic to process for validation you'll need to create custom Validators. In this post I describe how to create both sync and asycn Angular Validators for use in declarative forms.

FireFox, Windows Security and Kestrel on ASP.NET Core

Ran into issues today with Windows Authentication and FireFox in a ASP.NET Core application where auth was working with all browsers **except** for FireFox. Firefox would just throw up endless sequences of login dialogs or in some cases just show the default ASP.NET Core 'UnAuthenticated' dialog. Here's what this looks like and how to work around it.

Dynamically Loading Assemblies at Runtime in RazorPages

I've been working on some tools that create generic, standalone Web servers using ASP.NET Core, in various configurations. One of the versions I'm building also supports Razor Pages and while genericallly hosting Razor Pages out of a locally run folder, there are some complications that arise out of dynamic runtime compilation. In this post I look at how to dynamically load assemblies at runtime.

Windows Authentication and Account Caching on Web Browser Auto-Logins

If you're working with Windows authentication to access Windows or Active Directory groups be aware that there's a gotcha with newly added groups when users are automatically logged into the Web browser.

Serving ASP.NET Core Web Content from External Folders

ASP.NET Core makes it easy to create a new Web site, but by default the location of where the application runs and serves files from is pretty static and pinned to the startup folder of the application. In this post I discuss another usage scneario of building a generic local Web Server that can start serving files out of **any** folder.

Upgrading my AlbumViewer Sample Application to ASP.NET Core 3.0

.NET Core 3.0 is here and in this post I describe the process of updating an existing ASP.NET Core Angular API application to this latest release. For the most part the update process is very smooth with a few configuration changes required, but there are also a few gotchas that have bitten me and I'll cover those here.

Open Internet Settings Dialog directly on Windows

Windows is making it harder to find classic Control Panel windows and the Internet Settings dialog is no exception. The Networking options no longer have a link to it, so you have remember where to look for it. Here's a quick way to get to it.

Programmatically Opening Windows Terminal in a Specific Folder

The new Windows Terminal provides many cool new features and much improved Terminal performance which makes it very desirable to use even in its current preview state. However, unfortunately the Terminal currently lacks a command line interface to control startup, do if you want to externally launch a shell some workarounds are required to get it to start out of a specific folder.

WPF Window Closing Errors

I've recently had a large uptick of errors in my Markdown Monster logs that complain about `Cannot set Visibility to Visible or call Show, ShowDialog, Close, or WindowInteropHelper.EnsureHandle while a Window is closing`. This error can crop up with nested or parallel window closing operations, which might not always be obvious when they happen. I'll show some of the issues and the hacky by easy to implement work around.

Visual Studio 2019.2 and .NET 3.0 SDK Projects not Loading

Recent upgrades to Visual Studio 2019.2 seem to have broken projects that use the 3.0 .NET SDK as Visual Studio is defaulting to a pre-3.0 version of the SDK tools and compilers. The end result is that projects even fail to load in Visual Studio. There are workarounds but ultimately this an issue that Microsoft needs to address better in future updates.

Uri.AbsoluteUri and UrlEncoding of Local File Urls

Ran into an interesting problem with the Uri class and local file URLs today. The problem is that Urls were not properly Url encoding and decoding with the Url treated incorrectly. After a bit of experimenting it turns out that the way the file URL is created is critical to the Url parsing behavior of the Uri class.

Building a Live Reload Middleware Component for ASP.NET Core

In my last way I showed how to use Live Reload in ASP.NET Server side applications using a tool called BrowserSync. In this post I replace BrowserSync's functionality with a custom Live Reload Middleware component for ASP.NET Core that's more efficient and doesn't require installing and running a separate tool. I'll show how Live Reload works, and how to implement the component in some detail.

Live Reloading Server And Client Side ASP.NET Core Apps with BrowserSync

Client side live reloading is one of the most compelling features of client side JavaScript development. Instant updates of any code changes in the browser are a huge productivity booster - WYSIWYG on steroids. Unfortunately for ASP.NET Core server side code and MVC apps there aren't any comparable easy solutions. In this post I show how I use Browser Sync and `dotnet watch` in combination to provide live reloading for both server and client side changes.

Accessing RouteData in an ASP.NET Core Controller Constructor

Ran into a difficulty trying to get access to RouteData() generically outside of Controller code in ASP.NET Core. Specifically I needed to get at route data to pull out a tenant ID required to set up a DbContext with the right connection string to connect to. Getting the route data as part of the DI process in the Controller constructor proved to be challenging. In this post I describe the problem and the work around.

.NET Core 3.0 SDK Projects: Controlling Output Folders and Content

I've been upgrading Markdown Monster to run on .NET Core 3.0 and one of the biggest changes is switching to the new .NET SDK style format for all projects. I ran into some issues with the Addin projects that require that output is placed in a very specific output folder and to not include output of all references. In this post describe a couple of ways to control where output goes and how to limit the output that goes to those folders.

First Steps in porting Markdown Monster WPF App to .NET Core 3.0

I spent a good part of the day today getting Markdown Monster to run on .NET Core 3.0 and in this post I packaged up my notes into a lengthy post with how went through this process. It wasn't exactly quick to make this happen but MM has a few peculiarities that made this process a little bit more trying than it could have been. I'll summarize some thoughts at the end on both the process and the relevance of this process.

Adventures in .NET Core SDK Installation: Missing SDKs and 32 bit vs 64 bit

Ran into a problem yesterday with a new installation of the .NET Core 3.0 Preview 4 installation. Installed the new preview and found that all of my .NET Core 2.x SDKs were no longer showing. A lot of back and forth later I found that I accidentally installed the wrong bitness SDK - 32 bit vs 64 bit. Here's a quick overview of how and why and why you probably NEVER want to install the 32 bit SDK.

Using the ng-BootStrap TypeAhead Control with Dynamic Data

I recently swapped my Auto complete logic in an application to use ng-bootstrap's nice and relatively easy to use TypeAhead control and I ran into a small snag trying to figure out how to bind dynamic data retrieved from the server. The examples show local data binding but fail to show how to load and update the control with remote data. In this post I show how the control works both in sync and async mode and point out the simple solution that eluded my via the Observable switchMap operator.

Creating a custom HttpInterceptor to handle 'withCredentials' in Angular 6+

Client HTTP requests often need to set a few common settings and you don't want to set them on every request. To make this process easier Angular provides an HttpInterceptor class that you can subclass and add custom behavior to for each HTTP request that is sent through the HttpClient. Here's a quick review on how to do this.

ASP.NET Core In Process Hosting on IIS with ASP.NET Core

In version 2.2 ASP.NET Core adds support for direct in-process hosting which improves throughput considerably using an easy mechanism that allows switching between in-process and out-of-process hosting. In this post I describe how to use in process hosting and how it works.

Using .NET Standard with Full Framework .NET

Using .NET Standard on full .NET Framework is a mixed bag because the behavior of .NET Standard differs depending on which version of the Runtime you are integrating with. In this post I review what .NET Standard is and how it fits in with the full .NET Framework and how you can use .NET Standard packages/assemblies in full framework along with some of the problems you have to watch out for.

WPF Hanging in Infinite Rendering Loop

Ran into a nasty WPF bug this week with Markdown Monster that caused MM to hang during startup in certain scenarios. Several users reported issues that I could not duplicate until I started playing around with my screen resolution and scaling. An obscure but insidious WPF bug can cause an application to go into an infinite loop which effectively locks up the application's UI and the app overall. Here's more info on what the problem is and how to work around it.

Ad Blockers, Brave Browser and BrainTree Credit Card Processing SDKs

Ran into an issue with my CC processing forms using Brave today. Brave is a Chromium based browser, but it includes built-in, on-by-default content blocking which apparently causes my order forms to not work as scripts and related page cookies aren't being loaded. Here's what happened and some thoughts on how to work around this.

Finding the ProgramFiles64 Folder in a 32 Bit App

.NET has the `System.GetFolderPath()` method to let you easily retrieve various system folder in a safe way. Unfortunately getting the `Program Files` folder is a bit of problem due to some complications on how the name is retrieved on 32 bit systems. If you're running an application in 32 bit mode, or have an application that can run either 32 or 64 bit, make sure you use the right way to determine where Program Files is located.
West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2021