Rick Strahl's Web Log
Wind, waves, code and everything in between...
Ad-free experience sponsored by:
- the market leader of .NET and Java APIs for file formats – natively work with DOCX, XLSX, PPT, PDF, images and more
Recent Weblog Posts
January, 2020 (1)
December, 2019 (2)
November, 2019 (3)
October, 2019 (1)
September, 2019 (5)
August, 2019 (2)
June, 2019 (1)
May, 2019 (2)
April, 2019 (5)
March, 2019 (1)
February, 2019 (4)
January, 2019 (3)
December, 2018 (2)
November, 2018 (3)
October, 2018 (2)
September, 2018 (1)
August, 2018 (2)
July, 2018 (1)
June, 2018 (3)
May, 2018 (2)
April, 2018 (2)
March, 2018 (1)
February, 2018 (1)
January, 2018 (1)
Visual Studio (51)
ASP.NET Core (42)
Web Services (19)
Web Api (16)
.NET Core (15)
Sql Server (9)
Microsoft AJAX (8)
Web Connection (7)
West Wind Ajax Toolkit (7)
Entity Framework (6)
Internet Explorer (6)
Html Help Builder (5)
Live Writer (5)
Source Control (4)
Markdown Monster (4)
Help Builder (3)
Web Browser Control (3)
Software Development (3)
Visual Studio Code (2)
ASP.NET vNext (2)
.NET Standard (2)
Visual Studio (1)
ASP.NET Markdown (1)
Control Development (1)
Credit Card Processing (1)
Dynamic Types (1)
VS Code (1)
Web Deployment Projects (1)
Web Design (1)
Web Assembly (1)
ASP.NET Core IIS InProcess Hosting Issue in .NET Core 3.1
January 14, 2020 - Maui, Hawaii
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
December 30, 2019 - Maui, Hawaii
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
December 18, 2019 - Maui, Hawaii
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
November 18, 2019 - Maui, Hawaii
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
November 14, 2019 - Maui, Hawaii
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
November 05, 2019 - Maui, Hawaii
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
October 19, 2019 - Maui, Hawaii
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
September 30, 2019 - Maui, Hawaii
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
September 24, 2019 - Maui, Hawaii
.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
September 10, 2019 - Maui, Hawaii
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
September 03, 2019 - Maui, Hawaii
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
September 02, 2019 - Maui, Hawaii
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
August 21, 2019 - Maui, Hawaii
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
August 20, 2019 - Maui, Hawaii
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
June 03, 2019 - Maui, Hawaii
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
May 18, 2019 - Maui, Hawaii
Accessing RouteData in an ASP.NET Core Controller Constructor
May 15, 2019 - Maui, Hawaii
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
April 30, 2019 - Maui, Hawaii
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
April 24, 2019 - Maui, Hawaii
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
April 20, 2019 - Maui, Hawaii
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
April 08, 2019 - Maui, Hawaii
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+
April 07, 2019 - Maui, Hawaii
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
March 16, 2019 - Maui, Hawaii
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
February 19, 2019 - Maui, Hawaii
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
February 14, 2019 - Maui, Hawaii
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
February 08, 2019 - Maui, Hawaii
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
February 05, 2019 - Maui, Hawaii
.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.
COM Object Access and dynamic in .NET Core 2.x
January 22, 2019 - Maui, Hawaii
I was surprised to find out that COM Interop works in .NET Core when running on Windows. It's possible to access COM components via Reflection easily enough in .NET Core 2.x. Unfortunately use of the `dynamic` keyword does not work in .NET Core 2.x so for the moment COM interop is limited to using Reflection.
January 21, 2019 - Maui, Hawaii
A Visual Studio to Visual Studio Code Snippet Converter
January 14, 2019 - Maui, Hawaii
Visual Studio Code Snippets are very useful and a great productivity enhancing tool for templating reusable code blocks into the editor. I have tons of snippets I use all the time for great productivity savings. Over the last couple of years I've been increasingly using Visual Studio Code and JetBrains Rider and I found myself missing my nearly 150 code snippets from Visual Studio, so I created a small hacky utility to move code snippets from Visual Studio to VS Code and with more limited features to Rider.
Don't let ASP.NET Core Console Logging Slow your App down
December 31, 2018 - Maui, Hawaii
Today I ran into a self-inflicted problem with Console logging while playing with a toy test project. By accident I ran the application under load and Console Logging was on and performance was horrendous. In fact nearly 40x slower horrendous. Although my error, there are a few ways this can happen and it's important to understand that Console logging is very, very slow and in this post I show how this happened and why you want to be careful with Console logging in production.
Updating Westwind.AspnetCore.Markdown with Markdown from Files and URLs
December 20, 2018 - Maui, Hawaii
In the last week I've had a need to add some additional features to my Westwind.AspnetCore.Markdown library that provide easier access to Markdown from files and urls as well as the ability to replace the default Markdown parser in the library. In this post I'll discuss some of the feature additions including some implementation notes.
Returning an XML Encoded String in .NET
November 30, 2018 - Maui, Hawaii
XML is not as popular as it once was, but there's still a lot of XML based configuration and data floating around today. Today I ran into a recurring issue where I needed to convert a string to a properly encoded XML string. Seems simple enough but it's not as straightforward as you might think to generate an XML Encoded string properly. This post shows a few different ways to retrieve a string and discusses advantages of each.
Creating a .NET Global Tool from an existing Console Application
November 05, 2018 - Maui, Hawaii
.NET Core doesn't support creating executables directly, but it does have support for **Global Tools** which provide a mechanism to register a console application and make it easily accessible using a simple command line command rather than a complex `dotnet.exe` command.
Creating an HTML Packager
November 01, 2018 - Maui, Hawaii
Recently I needed to add the ability to save HTML documents in Markdown Monster. Saving raw rendered Markdown is not really sufficient and so I set out to create an HTML packager that can package an HTML Web endpoint into a self-contained local package either as a single self-contained file, or an HTML document with all dependencies localized. In this post I discuss why this is needed and how to implement and use this library to capture HTML output in a few different ways.
Slow Connections with Sql Server
October 26, 2018 - Maui, Hawaii
Ran into a problem with extremely slow SQL Server connections when connecting to the server. Connections would take 2 seconds or more even on repeat connections. It turns out the problem is related to missing TCP/IP protocol support which is disabled by default.
Tip: Open Visual Studio Code from Visual Studio as an External Tool
October 06, 2018 - Maui, Hawaii
I use both Visual Studio and Visual Studio Code in my development. Although I tend to still default to the full version of Visual Studio, I tend to run Visual Studio Code side by side with Visual Studio and flip back and forth a lot. To make things a little easier and being able to jump directly to a document in VS Code from full VS you can create an External Tool entry and a shortcut mapping to quickly open documents and/or folders in VS Code.
Getting around Chrome POST XSS Protection
September 22, 2018 - Maui, Hawaii
Ran into an unusual issue where Chrome is blocking user input from a TextArea that includes HTML form and input control input - on the client side. While I'm familiar with server side input validation, this is client side validation that causes the response to be rejected. Here's more info on the error and how to get around it when necessary.
Markdown and Cross Site Scripting
August 31, 2018 - Hood River, Oregon
I've been getting a number of requests for providing XSS support in my various Markdown components. While Markdown itself makes no provision for HTML Sanitation, if you use Markdown for capturing user input some sort of sanitation is required to avoid potential XSS attacks. In this post I look at XSS scenarios and show how the `Westwind.AspnetCore.Markdown` package deals with removing script tags from rendered Markdown content.
Fixing Visual Studio Intellisense Errors
August 07, 2018 - Hood River, Oregon
I ran into a problem in one of my applications where Visual Studio was showing errors that were clearly not actual errors. A new feature in Visual Studio now shows separate error listings for Build and IntelliSense errors and it turns out the errors are Intellisense errors. Here's how to fix them and get Visual Studio back onto the straight and narrow.
Web Assembly and Blazor: Re-assembling the Web
July 31, 2018 - Hood River, Oregon
Creating a WPF ItemSource Length Filter Converter
June 23, 2018 - Hood River, Oregon
In this short post I show you you can create a simple Value Converter to limit the max number of items in an ItemsSource value binding in WPF.
Explicitly Ignoring Exceptions in C#
June 16, 2018 - Hood River, Oregon
In most applications I have a few places where I explicitly need to ignore errors. While generally this isn't a good idea, under some circumstances you just don't care if an error occurs or you simply want a yay or nay response. In this stupid pet tricks post, I describe a few scenarios where not catching any exceptions makes sense along with a couple of helper methods that make these scenarios more explicit so code analyzer and book thrower reviewers can be quieted down.
Which .NET Core Runtime Download do you need?
June 05, 2018 - Hood River, Oregon
.NET Core has a number of different runtime downloads that you can grab to install. The combinations of downloads can be a bit confusing and it depends on whether you install a development or runtime environment. In this post I describe what each download contains and what you should use it for.
Web Code is a solved Problem: How about fixing Web UI next?
May 31, 2018 - Hood River, Oregon
Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0
May 09, 2018 - Hood River, Oregon
Took some time to upgrade my AlbumViewer application to ASP.NET Core 2.1 RC and Angular 6.0. The .NET Core update was very smooth with only very minor adjustments required showing that Microsoft has smoothed out the update path significantly from the frenetic pace of past versions. The Angular update was a bit more involved primarily due to the changes in rxJS.
Creating a generic Markdown Page Handler using ASP.NET Core Middleware
April 18, 2018 - Maui, Hawaii
I've been talking about Markdown a lot in recent blog posts and this time I'll cover a generic Markdown page handler that you just drop into any site to handle semi-static page editing more easily with Markdown from within an ASP.NET Core application. While Markdown is common fare in CMS or blog applications, it's not so apparent how to get similar generic Markdown document rendering within the context of an existing application. The middleware I describe here allows you to simply drop a markdown file into a configured folder and have it rendered into a stock template. Simple but very useful.
Getting the .NET Core Runtime Version in a Running Application
April 12, 2018 - Maui, Hawaii
Microsoft has a long history of not providing a reasonable way of looking up the version of the runtime that is hosting your applications. .NET Core is no different and in this short post I show one way you can capture a descriptive name of the runtime executing that's suitable for displaying in your application's info page.
Creating an ASP.NET Core Markdown TagHelper and Parser
March 23, 2018 - Maui, Hawaii
A couple of months ago I wrote about creating a WebForms based Markdown control. This time around I'll build an ASP.NET Core MVC TagHelper that performs similar functionality for embedding Markdown text into a content area of a Razor page. The component also includes easy access to a Markdown parser using the blazing fast MarkDig Markdown parser.
Accessing Configuration in .NET Core Test Projects
February 18, 2018 - Maui, Hawaii
.NET Core provides a clean configuration system and in ASP.NET Core that code is automatically configured for you. In test and other non-Web projects however you have to manually configure the configuration provider yourself. In this post I look at a couple of ways to set up a configuration provider both using raw configuration objects or by explicitly configuring through the depedency injection system.
Distributing Content and Showing a ReadMe file in a .NET Core Nuget Package
January 29, 2018 - Maui, Hawaii
.NET SDK style projects no longer support packaging NuGet content into projects as older projects did. So if you need to ship some dependent content with your library you need to find a different way to do so. In this post I look at a specific example of library that requires additional content and look at how to distribute the extra content as well as displaying a readme file to link to instructions when the NuGet package installs
Code Magazine Article: Securing IIS Web Sites with Let’s Encrypt Certificates
December 26, 2017 - Maui, Hawaii
Lets Encrypt makes it very easy to create free TLS certificates for your Web site. In this CODE magazine article Rick reviews some of the history of Lets Encrypt and then shows how you can easily take advantage of it to create free and automatically installed and updated certificates for your Windows based IIS Web servers.
Easy Configuration Binding in ASP.NET Core - revisited
December 12, 2017 - Maui, Hawaii
In this post I'm taking another look at using strongly typed configuration settings in ASP.NET Core, using a slightly simpler approach that foregoes using IOptions
in favor of directly using a configuration object instance. In the process I review the various approaches as a summary for getting configuration settings into .NET types.
Working around the lack of dynamic DbProviderFactory loading in .NET Core
November 27, 2017 - Maui, Hawaii
.NET Core and .NET Standard are missing the DbProviderFactories class which is used to dynamically load ADO.NET DbProviderFactory instances which in turn are used to gain access to the various ADO.NET intrinsic objects generically without requiring an explicit reference to the data access provider. In this post I describe why this can be a problem for libraries that use multiple data providers and show a workaround for loading a DbProviderFactory without taking an explict dependency on the provider assembly.
Using Gists for General Purpose Web Pages with Markdown
November 20, 2017 - Maui, Hawaii
Most of you probably know and use Github Gists for sharing Code snippets. But did you know that Gists also support Markdown? Using Markdown makes it easy to create much richer code shareable code and even allows for an easy way to create self-contained Web content.
Flexing your HTML Layout Muscles with Flexbox
November 11, 2017 - Maui, Hawaii
Flexbox is a CSS based technology that makes it much easier to create structured layouts with HTML and CSS. Based on a containership hierarchy, Flexbox combines the structured features of tables with the free form layout capabilities of arbitrary HTML elements that make it possible to create complex , yet flexible HTML designs much more easily that was otherwise possible. My article in CoDe Magazine describes the reasons for Flexbox, the basics of operation and few practical examples you can use today to put flexbox to use.
Dev Intersection 2017 Session Slides and Samples Posted
November 08, 2017 - Maui, Hawaii
I've posted my Session Slides and code samples from last week's DevIntersection conference on GitHub.
.NET Core 2.0 and ASP.NET Core 2.0 are Here
October 22, 2017 - Maui, Hawaii
After a long wait .NET Core and ASP.NET Core 2.0 are finally here. This release is a major update from Version 1.0 that brings back a ton of functionality that was originally missing in .NET Core 1.x. With closer compatibility to full framework .NET it's much easier to port existing code to .NET Core, as having a much larger API surface to use in your applications. There are many usability improvements that make it easier to get started using considerable less fanfare. In this post I describe some of what's new and what's great and also a few things that are not so great.
Opening a Web Browser with an HTTP Url from Visual Studio Code
October 13, 2017 - Maui, Hawaii
Here's a quick tip on how you can create a project specific Visual Studio Task that can launch a Web Browser to a specific page quickly and easily.
A few notes on creating Class Libraries for ASP.NET Core
September 26, 2017 - Maui, Hawaii
I recently started to collect some of my ASP.NET Core utilities into a helper support library as I tend to do. In the process I ran into a few snags and I realized I was making a few non-obvious mistakes right from the start. In this post I discuss a few of the issues with dependencies and how to deal with them.
WPF Slow Window Loading due to Invalid SpellChecking Dictionaries
September 25, 2017 - Maui, Hawaii
I ran into a nasty problem with spell checking on WPF, which caused any form that uses spell checking to load extremely slow. It turns out the problem was caused by errant entries in the global Windows dictionary key in the registry. This post describes the problem and how to find and fix your global Windows dictionary settings.
Conditional TargetFrameworks for Multi-Targeted .NET SDK Projects on Cross-Platform Builds
September 18, 2017 - Maui, Hawaii
If you build multi-targeted .NET SDK projects on multiple platforms you're going to find out that certain targets can't be build on certain platforms. If you target NetStandard and Net45 on a Mac, Net45 is going to fail. In order to get around this you need to conditionally build per platform. Here's how.
Accepting Raw Request Body Content in ASP.NET Core API Controllers
September 14, 2017 - Maui, Hawaii
When posting raw body content to ASP.NET Core the process is not very self-explanatory. There's no easy way to simply retrieve raw data to a parameter in an API method, so a few extra steps are provided using either manual handling of the raw request stream, or by creating custom formatter that can handle common 'raw' content types in your APIs via standard Controller method parameters. In this post I look at various permutations and how you can access the raw data in your code.
A Literal Markdown Control for ASP.NET WebForms
September 13, 2017 - Maui, Hawaii
Spent some time last night creating a small ASP.NET Server control that can render literal Markdown text inside of ASPX pages and turn the literal text into Markdown. It's a very simple control, but it makes it lot easier to edit documents that contain simple formatted text content without having to deal with angle brackets for lengthier text.
Configuring LetsEncrypt for ASP.NET Core and IIS
September 09, 2017 - Hood River, OR
LetsEncrypt makes it easy to create SSL certificates for your applications for free and lets you automate the process. When using LetsEncrypt with IIS and ASP.NET Core however a few extra steps are required to make an ASP.NET Core site work with LetsEncrypt. I show you how in this post.
Handling HTML5 Client Route Fallbacks in ASP.NET Core
August 07, 2017 - Hood River, OR
HTML5 client routes work great on the client, but when deep linking into a site or pressing refresh in the browser, HTML5 client side routes have a nasty habit of turning into server HTTP requests. Requests to routes that the server is likely not configured for. In this post I look at why HTML5 client routes require server cooperation to handle and how to set them up on IIS and/or ASP.NET Core.
Updating Windows Applications and Installers for non-Admin Installation
July 17, 2017 - Hood River, OR
I recently updated Markdown Monster to run as a non-admin installation even when running the full installer. There have been many requests for this functionality and in this post I describe several of the updates required in order to make this work.
July 06, 2017 - Hood River, OR
Debouncing and Throttling Dispatcher Events
July 02, 2017 - Hood River, OR
In UI applications it's not uncommon for a number of UI events to fire more events than your application can handle. In order to limit the number of events it's often a good idea to throttle or 'debounce' events so that only a single event is fire for a given period. In this post I describe a Dispatcher based implementation for debouncing and throttling UI events in WPF applications.
Multi-Targeting and Porting a .NET Library to .NET Core 2.0
June 22, 2017 - Hood River, OR
I've been holding off porting any of my full frameworks to .NET Core. With the latest .NET Core 2.0 and .NET Standard 2.0 releases and their vastly larger footprints that match more closely with what we expect of the .NET Framework feature set, migrating looks a lot more appealing. In this post I describe the process of porting one of my general purpose full framework libraries to .NET Standard 2.0 and in the process also creating a multi-targeted project that compiles .NET 4.5, 4.0 and .NET Standard projects.
Bypassing IIS Error Messages in ASP.NET
June 01, 2017 - Hood River, OR
IIS Error handling is the source of lots of confusion. I've been using IIS for nearly 20 years now, and figuring out the right combination of error configuration settings and code to properly serve custom error pages or error responses in API still makes fumble a few times before I get it just right. This post provides a few hints and some background on how to deal with error handling.
Automating IIS Feature Installation with Powershell
May 25, 2017 - Hood River, OR
IIS often gets a bad wrap for being diffcult to install and configure. However, using some of the built-in tooling for administration using PowerShell it's actually quite easy to configure IIS and even set up a new site and application pool with a few short scripts that are much quicker, and more repeatable than using the various Windows UI features. Here's how.
Upgrading to .NET Core 2.0 Preview
May 15, 2017 - Hood River, OR
With the release of the first preview of .NET Core 2 and ASP.NET Core 2.0 I decided to upgrade my AlbumViewer sample application to the latest bits and preview tools. Overall the experience was pretty smooth, but I ran into a couple of breaking changes and a few tooling snags that I'll describe in this post.
IIS and ASP.NET Core Rewrite Rules for Static Files and Html 5 Routing
April 27, 2017 - Hood River, OR
If you're running ASP.NET Core under Windows with IIS, you'll want to take advantage of letting IIS serve up your static content and handle your HTML 5 Client and home routes. IIS is very efficient at handling static content and content re-routing and in this post I describe how you can properly configure ASP.NET Core applications using the AspNetCoreModule and IIS Rewrite Rules
Creating a Markdown Monster Addin: Save Images to Azure Blob Storage
April 17, 2017 - Maui, Hawaii
The Markdown Monster Markdown Editor and Weblog Publishing tool has a .NET based addin model that makes it relatively easy to extend its core feature set with custom functionality. In this post I show how you can quickly create an addin of your own, and then show a practical example that demonstrates how add Image uploading to Azure Blob storage as an interactive addin.