Explains how ASP.NET Core exposes client IP via HttpContext.Connection.RemoteIpAddress or the injectable IHttpContextAccessor (registered with AddHttpContextAccessor), then shows why Cloudflare or another reverse proxy overwrites RemoteIpAddress with its own IP, and how to recover the real IP. ...
Wires elmah.io Uptime Monitoring to a Philips Hue Play Light Bar via an IFTTT webhooks applet: an elmah.io Rules-tab rule fires an HTTP request on the Uptime message condition, POSTing a JSON body with the $severityHex helper variable as value1 so IFTTT turns the Hue light red or green. ...
Solves deploying to an IP-restricted Azure website from Microsoft-hosted Azure DevOps agents, whose IPs are dynamic, by calling Invoke-RestMethod against ifconfig.me/ip, exposing the result as a CurrentIp output variable, then using an Azure PowerShell task to add that IP to Access Restrictions. ...
Builds a Visual Studio extension, published as elmahio.cronexpressions on the marketplace, using an Empty VSIX Project and the IAsyncQuickInfoSourceProvider/IAsyncQuickInfoSource APIs to show a human-readable Quick Info tooltip on hover, powered by the CronExpressionDescriptor 2.19.0 NuGet package. ...
Implements a /downloadzip ASP.NET Core MVC endpoint using ZipArchive.CreateEntryFromFile inside a MemoryStream returned via File(), then shows a temp-file alternative with Path.GetTempFileName to avoid holding large zips in memory, plus mentions SharpZipLib and DotNetZip as external NuGet options. ...
Modernizes a .NET 7 WPF app's startup by removing App.xaml's StartupUri and adding a Program.cs that builds a Host via Host.CreateDefaultBuilder from Microsoft.Extensions.Hosting, registers App and MainWindow as singletons, and injects an ILoggerFactory into MainWindow for logging. ...
Builds a GitHub Actions workflow on windows-latest for a VS extension using nuget/setup-nuget and microsoft/setup-msbuild, then auto-increments the patch version via PowerShell, replacing 1.0.0 with a run-number suffix across the vsixmanifest, AssemblyInfo.cs, and the extension class file. ...
Implements an Azure Durable Functions orchestration polling a fictional generate-large-file API: a TimerTrigger starter calls StartNewAsync hourly, needing a manual Microsoft.Azure.WebJobs.Extensions.DurableTask 2.8.1 reference, then chains activity functions polling until status flips to done. ...
An alphabetical list of Chrome extensions the elmah.io team relies on: 1Password, Allow CORS for injecting Access-Control-Allow-Origin headers, Awesome Screenshot and Screen Recorder, BuiltWith Technology Profiler, elmah.io's own Dark Screen of Death, EditThisCookie, Grammarly, and JSONVue. ...