Author

Secret Manager Tool for .NET App

This document explains how to manage sensitive data for an ASP.NET Core app on a development machine. Never store passwords or other sensitive data in source code. Production secrets shouldn’t be used for development or test. Secrets shouldn’t be deployed with the app. Instead, production secrets should be accessed through a controlled means like environment... » read more

SendGrid Setup

Create SendGrid Account https://sendgrid.com/ Install the package The recommended installation uses the NuGet package manager. Run the following: Alternatively, you can download the SendGrid C# .NET library directly from our Github repository. Send your first email The following is the minimum needed code to send an email:

SendGrid

https://sendgrid.com/ https://sendgrid.com/pricing/?utm_source=docs https://app.sendgrid.com/guide Twilio.com Twilio is an American cloud communications platform as a service company based in San Francisco, California. Twilio allows software developers to programmatically make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs.

Setup Account confirmation and password recovery in ASP.NET Core

Setup SendGrid Account Setup account at https://sendgrid.com/ Get API key. NuGet and install SendGrid to app. Blazor WebAssembly Setup Note: Add to “Server” project, not “Client” project. Need to setup user secrete for the application first. Add “SendGridUser” and “SendGridKey” user secrete to Server project. secrets.json Add classes to Services folder AuthMessageSenderOptions.cs EmailSender.cs Areas.Identity.Pages.Account.RegisterConfirmation page... » read more

PWA and Caching

Control asset caching If your project defines the ServiceWorkerAssetsManifest MSBuild property, Blazor’s build tooling generates a service worker assets manifest with the specified name. The default PWA template produces a project file containing the following property:XMLKopiëren The file is placed in the wwwroot output directory, so the browser can retrieve this file by requesting /service-worker-assets.js. To see the contents of... » read more

Forcing reload of Blazor client after publishing changes

Since your app is a PWA, you can declare a js file for registration in the navigator.serviceWorker object. This my.js file can contain a const CACHE_VERSION = 1.0. Updating this value should force the client to download the latest files. See Jeremy Likness’ blog post for more info. Example: service-worker.published.js Note: The original one does not work. Replace self.assetsManifest.version... » read more

Secure Azure App Service Web API via Restriction Rules

Note: This will not work with a Blazor Client app because the call to the web api will be from the browser of the client. By setting up access restrictions, you can define a priority-ordered allow/deny list that controls network access to your app. The list can include IP addresses or Azure Virtual Network subnets.... » read more