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, 2019 (1)
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)
December, 2017 (2)
November, 2017 (4)
October, 2017 (2)
September, 2017 (6)
August, 2017 (1)
July, 2017 (3)
June, 2017 (2)
May, 2017 (2)
April, 2017 (4)
March, 2017 (5)
February, 2017 (2)
Visual Studio (50)
ASP.NET Core (32)
Web Services (19)
Web Api (16)
.NET Core (11)
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)
ASP.NET Markdown (1)
Visual Studio (1)
.NET Standard (1)
Dynamic Types (1)
Control Development (1)
VS Code (1)
Web Assembly (1)
Web Deployment Projects (1)
Web Design (1)
A Visual Studio to Visual Studio Code Snippet Converter
Monday - 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.
Running .NET Core Apps under Windows Subsystem for Linux (Bash for Windows)
April 13, 2017 - Maui, Hawaii
The Windows Shell for Linux (WSL or Bash on Ubuntu on Windows) provides a nice way for Windows and Linux to interact without the overhead of dealing with a separate VM. Using the WSL you can now also run your .NET Core applications directly under Linux without requiring a VM or Docker. In this post I demonstrate how the shell works and how you can run your .NET and ASP.NET Core applications to test operation under Linux.
Virus Scanning Madness for Software Distribution
April 02, 2017 - Maui, Hawaii
I've been having having lots of problems recently with VirusTotal, which is used by Chocolatey to scan for malware in Chocolatey distribution packages. VirusTotal is a Web based service that aggregates around 60 virus scanners against an installation binary. The problems is that I frequently see random malware hits by various obscure scanners. In this post I describe the problem and the farce that this has become as some of the malware hits are obviously false positives that actually reverse in a rescan.
Updating my AlbumViewer Sample to ASP.NET Core 1.1 and Angular 4
March 31, 2017 - Maui, Hawaii
I updated my AlbumViewer sample application recently to the latest versions of ASP.NET Core (1.1) and the new .csproj project as well Angular 4
More on ASP.NET Core Running under IIS
March 16, 2017 - Maui, Hawaii
Since my last post about hosting ASP.NET Core on IIS I've gotten quite a few questions and comments in regards to working with this mixed IIS/Kestrel hosting environment. There are quite a few not so obvious arrangement in this set up and some surprising discoveries in terms of performance and segragation of feature usage between IIS and Kestrel.
Dragging and Dropping Images and Files into the Web Browser Control
March 10, 2017 - Maui, Hawaii
Dragging content into the Web Browser control and capturing the content dropped can be tricky. The Web Browser Control is based on Internet Explorer and is actually an ActiveX control hosted inside of a container and because of that is difficult to deal with. In this post I describe how you can get around this issue and still capture images and files dropped on the control and handle the drop operations.
Debugging the Web Browser Control with FireBug
March 08, 2017 - Maui, Hawaii
March 04, 2017 - Maui, Hawaii
Video Rendering Issues for WPF Windows
February 13, 2017 - Maui, Hawaii
Recently I ran into a few reports of black screen of death rendering of Markdown Monster when starting up from a very few users of the application. They reported the screen just shows black, while actually being responsive to moving and showing menus etc. Also moving to another screen often fixes the problem. It turns out this is a hardware related issue with WPF with certain video hardware/monitor combinations. In this post I describe the problem and the workaround to get the application to render properly even on compromised hardware.
Empty SoapActions in ASMX Web Services
February 12, 2017 - Maui, Hawaii
Recently I had to deal with an ASMX Web Service that was receiving empty SoapActions from the client. ASMX doesn't like that, but luckily there's an easy work to strip out the errant Soap header.
Creating a portable and embedded Chocolatey Package
January 29, 2017 - Maui, Hawaii
Chocolatey is an awesome tool to install software. As a publisher you have a lot of choices of how to create packages and in this post I describe the two packages that I use with Markdown Monster, which is a full downloaded installer package and a fully self contained embedded portable package. Here I cover the basics of Chocolatey package creation and some of the steps required to create a portable package from a full installation and some of the challenges you might run into along the way.
Adding Files to Visual Studio Projects
January 25, 2017 - Maui, Hawaii
Visual Studio has a boat load of ways to add new files to a project and various extensions and tools provide even more ways to do the same. Even so the experience to add new files to a project in Visual Studio is one of the most tedious tasks. Here's what bugs me and how I try to work around the verbosity of it all.
New CODE Magazine Article: Getting down to Business with ASP.NET Core
January 12, 2017 - Maui, Hawaii
The latest issue of CODE magazine features my `Getting down to Business with ASP.NET` Core article as the cover article. The article focuses on building an ASP.NET Core backend for an Angular 2 front application, covering all aspects of separating business and Web app logic, dealing with EF Core data access in related tables, CORS to be able to run across domains and simple authentication in a client centric REST service application. Check it out.
Faking out the .NET Runtime Version
January 09, 2017 - Maui, Hawaii
I've been struggling with DPI Scaling issues in WPF in Markdown Monster and .NET 4.6.2 has a few fixes that address the problems I've been working on. However, requiring 4.6.2 is a problem due to lowish adoption rates and skittishness about installing new versions of .NET. In this post I show a little hack that allows me to compile my app to .NET 4.6.2 but don't require user to have that version installed so those that have it can take advantage of the updates.
Back to Basics: String Interpolation in C#
December 27, 2016 - Maui, Hawaii
String Interpolation provides string templating for string literals in C#. Rather than using string.Format you can use string interpolation to produce much more readable code that embeds expression values directly into string literals rather than escaping numeric arguments as you do with string.Format(). In this post I look at how string interpolation works, what the compiler does under the covers and some common use cases where it makes life easier.
Downgrading a .NET Applications from 64 bit to 32 bit for the WebBrowser Control
December 23, 2016 - Maui, Hawaii
Recently while working on Markdown Monster I ran into some odd crashes and behaviors when interacting with the Web Browser control in this WPF application. It turns out that some of these inconsistent behaviors are apparently caused by running hte application in 64 bit mode. Switching to 32 bit mode has made the application and Web Browser interaction much more responsive and has stopped the nagging unexplainable crashes. In this post I look at 32 and 64 bit applications in .NET and outline some of the issues I ran into and how I fixed the problem by switching to building a 32 bit app.
Visual Studio Debugging and 64 Bit .NET Applications
December 19, 2016 - Maui, Hawaii
Recently while debugging a 64 bit application I found out the hard way that Visual Studio by default will use 32 bit debugging even when running what would otherwise be a 64 bit .NET application. There are a number of options that determine the bitness of your application, but the debugger often behaves differently than your standalone application. In this post I describe, why this might be a problem in some situations and how you can get the debugger to run in 64 bit.
WPF Rendering DUCE.Channel Crashes due to Image Loading
December 15, 2016 - Maui, Hawaii
I ran into a nasty WPF rendering bug that affected only a few select machines. Rendering problems in WPF can be terribly difificult to debug because there often is no additional information on what failed and the exceptions that occur are not trappable but fall back to application wide error handling. In this post I describe a specific failure caused by a 'bad' image WPF can't deal with and how I tracked it down and fixed it.
Loading .NET Assemblies out of Seperate Folders
December 12, 2016 - Maui, Hawaii
In the process of updating the Addin manager in Markdown Monster I ran into a few snags with loading .NET assemblies out of separate folders. Assembly loading out of non base folders in .NET can be problematic and sure enough I ran into a few issues that took a while to find a work around for. In this post I describe some of the issues of folder based assembly loading and a brute force solution to deal with assembly resolution.
.NET Standard 2.0 - Making Sense of .NET Again
November 23, 2016 - Maui, Hawaii
It's taken awhile but it seems Microsoft is finally nailing the message for .NET going forward and .NET Standard with its common API specification is a huge part in making sure that the same base library of .NET is available on all .NET platforms. In this post I look at what .NET Standard is, how it works and what some of the surrounding issues and impacts are for the .NET Eco system.
Introducing Markdown Monster - a new Markdown Editor
November 04, 2016 - Maui, Hawaii
I'm happy to announce Version 1.0 of Markdown Monster a Markdown Editor and Weblog Publishing tool for Windows. In this post I give a quick tour of Markdown Monster and provide links to all you need to know to check out this great new Markdown editor.
Windows Update Hell
November 03, 2016 - Maui, Hawaii
I've been fighting Windows Update Hell for the last month with failed updates wreaking havoc on my machine. Updates fail to install completely and roll back and then continue to retry each day. Attempts to turn off the particular update now fails as well, so I'm stuck in this groundhog day like loop of pain. This is a cry for help, in hopes somebody has additional ideas on what to try.
C# NumberFormat Sections
November 03, 2016 - Maui, Hawaii
In all the years I've been using C#, I've completely missed that the NumberFormat features using .ToString() or string expressions support sections for positive, negative and zero values. In this post I describe the feature and how it works.
Excluding the node_modules Folder in Visual Studio WebSite Projects
October 30, 2016 - Maui, Hawaii
If you're working on a client side project that includes an NPM folder with a large number of dependencies and you're using a WebSite Project in Visual Studio, you've probably found that this is a terrible combination out of the box. In this post I describe why this is a problem and how you can work around it with a simple hack.
Automating Installation Builds and Chocolatey Packaging
October 25, 2016 - Maui, Hawaii
Having a quick and easy way to build a final deployable applicationsin a few minutes has been a huge motivation for me. I can update code and release a new build as soon as a feature is added or a bug is fixed, and my release cycle is much more frequent than it was before. I used to be much more conservative with releases - if something was broken it'd have to wait. But with an easy release mechanism all of that has changed and I can push new releases out much more frequently and I really like the fact that it works this way. In this post I describe my deployment processing for Markdown Monster for creating an installer, publishing it on my Web site and creating and publishing a Chocolatey package.
Error Handling and ExceptionFilter Dependency Injection for ASP.NET Core APIs
October 16, 2016 - Maui, Hawaii
Exception handling in API applications is important as errors - both handled and unhandled - need to be passed to clients in some way to let them display error information. ASP.NET's default error handling doesn't provide for object error results by default, but you can use an ExceptionFilter to intercept exceptions and format them yourself. In this post I look at how to create an API exception filter to create error object responses, and hook up custom logging of those errors to disk.
Dealing with Anti-Virus False Positives
October 05, 2016 - Maui, Hawaii
I've been struggling with false positive Anti-Virus warnings for Markdown Monster. In this post I describe what problems I was running into and how eventually managed to get a clean distribution of Markdown Monster out the door.
External Network Access to Kestrel and IIS Express in ASP.NET Core
September 28, 2016 - Hood River, Oregon
Recently I needed to connect to my Windows based ASP.NET Core API from my Mac and in order for that to work some configuration settings are necesary so that the ASP.NET applications can serve HTTP content to the external network connection that this entails. In this post I show what you have to do to enable remote connections both using the Kestrel and IIS Express Web servers.
ASP.NET Core and CORS Gotchas
September 26, 2016 - Hood River, Oregon
CORS is a requirement for cross domain XHR calls, and when you use Angular 2.0 default dev server and talk to an ASP.NET Core application you'll need to use CORS to get XHR to talk across the domain boundaries. Here's how to set up CORS and how to test it.
Bootstrap Modal Dialog showing under Modal Background
September 14, 2016 - Hood River, Oregon
On more than a few occasions I've run into issues with Bootstrap's Modal dialog rendering incorrectly with the dialog showing underneath the overlay. There are a number of ways around this problem, but none of them are universal that depend on how your pages are laid out. It's especially problematic for applications that dynamically render components where there's no good control on where the elements are placed outside of the components DOM containership. In this post, I describe a few of the workarounds and their limitations.