Content by Rick Strahl (30)

Rick Strahl shows a small, ready-to-use ASP.NET Core helper extension method for retrieving a request’s client IP address, including the common reverse-proxy case where you need to read X-Forwarded-For instead of the proxy’s RemoteIpAddress.
Blogs
Rick Strahl explains how to use .NET Native AOT to compile code into a native Windows DLL that can be called from external and legacy applications, and he calls out the practical limitations and rough edges you’ll run into with the current tooling.
Blogs
Rick Strahl shows how to host and integrate the Westwind.Scripting ScriptParser in a real application (Documentation Monster) to render HTML templates for live preview and static site generation, with practical guidance on configuration, path/base URL handling, and template error reporting.
Blogs
Rick Strahl walks through Westwind.Scripting’s ScriptParser: a C# (raw .NET) templating engine that parses Handlebars-like templates into generated C# code, compiles them with Roslyn at runtime, caches the results, and (new in this update) supports file-based layout pages and sections.
Blogs
Rick Strahl introduces the Westwind.Scripting ScriptParser templating engine, which compiles Handlebars-style templates with embedded raw C# into executable .NET code. He explains the expression/code-block syntax, runtime compilation via Roslyn, and the newer layout/section features for file-based templates, with practical examples and troubleshooting tips.
Blogs
Rick Strahl revisits Azure Trusted Signing and explains how the newer dotnet sign workflow (artifact-signing) streamlines code signing compared to the traditional SignTool-based approach, focusing on a faster, simpler way to sign .NET deliverables.
Blogs
Rick Strahl shares his experience with failures using the Microsoft timestamp server for code signing and recommends alternative, more reliable servers. The article provides practical advice and example code for secure code signing workflows.
Blogs
Rick Strahl explains several approaches to reliably refresh the Microsoft WebView2 control for WPF, focusing on solutions to reload web content and resources, and providing sample code for soft and hard cache clearing.
Blogs

Reliably Refreshing the WebView2 Control

Rick Strahl explains why WebView2 doesn’t provide a built-in Reload(noCache) option and shows practical workarounds to force a hard refresh of the current page, accounting for WebView environment behavior and server-side cache policies.
Blogs
Rick Strahl analyzes frequent `\\.\nul` device errors breaking file lookups in Markdown Monster, offering insights into the Windows filesystem and practical .NET solutions for developers.
Blogs
Rick Strahl examines the implementation of keyboard mapping and menu accelerator key support in Microsoft WebView2 for .NET and WPF applications, using practical examples from Markdown Monster.
Blogs
Rick Strahl walks through setting up Microsoft Trusted Signing as an alternative to traditional code-signing certificates that now require hardware-backed or non-exportable keys, focusing on the practical Azure setup steps and what to expect along the way.
Blogs
In this article, Rick Strahl addresses a common usability issue with WPF's TreeView, offering .NET code and helper methods to properly center selected items and improve user experience.
Blogs
In this detailed blog post, Rick Strahl examines .NET's handling of long Windows file paths during zip extraction. He discusses the limitations of ZipFile.ExtractToDirectory, reviews Windows long path support options, and presents alternative coding approaches to overcome path length restrictions in C# projects.
Blogs
In this article, Rick Strahl discusses how to enable runtime extensibility in .NET apps using NuGet package loading and dynamic assembly integration, with practical code samples and insights from his work on LiveReloadServer.
Blogs
Rick Strahl explains a common gotcha when renewing FileZilla Server’s self-signed admin certificate: the “Distinguished Name” field expects a full Common Name (CN=...) formatted string, not just a hostname, otherwise the certificate generation fails with an unhelpful error.
Blogs
In this comprehensive guide, Rick Strahl explores how to configure Microsoft.Extensions.AI with multiple providers such as OpenAI, Azure OpenAI, and Ollama, detailing the setup process and sharing practical code examples for streaming completions in .NET applications.
Blogs
In this detailed post, Rick Strahl discusses common challenges and streamlined solutions for handling document load events in WebView2 controls within .NET and WPF applications. He introduces the Westwind.WebView library, focusing on its WaitForDocumentLoaded() helper for more linear, maintainable workflows.
Blogs
In this technical post, Rick Strahl discusses how WPF’s Image control locks local image files, the issues it causes, and presents XAML and custom binding converter strategies—including image caching—to solve the problem efficiently for .NET Windows applications.
Blogs
In this detailed post, Rick Strahl outlines the key challenges and solutions for deploying .NET Windows Desktop apps that run natively on both x64 and Arm64 platforms, with specific insights from developments on Markdown Monster.
Blogs
Rick Strahl discusses the practical integration of Windows.Media SpeechRecognition within WPF applications using .NET. The post highlights code samples, SDK dependencies, workarounds for WinRT/.NET issues, and language management.
Blogs
Rick Strahl offers practical solutions for improving HTML readonly input controls, providing tips on CSS, tabindex, and UI design trade-offs for web developers.
Blogs
Rick Strahl discusses how developers can open Windows Settings dialogs directly from code or shell commands using the `ms-settings:` protocol handler. The article provides practical usage examples for applications built with .NET and Windows technologies.
Blogs
In this post, Rick Strahl describes strategies and provides helper methods for resolving URLs to server-relative paths in .NET code, extending beyond default ASP.NET Core mechanisms.
Blogs
Rick Strahl shares a simple and effective technique for handling confirmation prompts inline in JavaScript and ASP.NET web applications, providing code examples and UI best practices.
Blogs
In this post, Rick Strahl reviews the long-standing problems with image data retrieval from the Windows clipboard in WPF, and demonstrates robust solutions using intermediary bitmaps and pixel format fixes. He includes code samples and performance notes for developers working with UI image handling.
Blogs
Rick Strahl explores using Parallel.ForEachAsync in .NET to significantly improve the performance of link validation in Markdown Monster by parallelizing HTTP operations. This article walks through before-and-after implementations, practical code, performance data, and key caveats.
Blogs
In this article, Rick Strahl shares insights into handling hover detection in WPF TabControls, demonstrating how to access non-selected TabItems for context-sensitive operations.
Blogs
In this post, Rick Strahl shares his journey and solutions for running SQL Server on a Windows ARM device, providing practical techniques, troubleshooting steps, and community-sourced insight relevant for .NET and SQL Server developers.
Blogs
In this post, Rick Strahl explores different techniques to retrieve ASP.NET Core application hosting URLs at startup and during requests, providing code samples and practical advice.
Blogs

End of content

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.