← All recipes
Moderne licensed

Find obsolete MachineKey.Encode/Decode

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFramework.FindObsoleteMachineKeyEncryptionArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Finds references to System.Web.Security.MachineKey, whose Encode/Decode methods are obsolete as of .NET Framework 4.5. Use MachineKey.Protect/MachineKey.Unprotect instead.

Single recipesearchsecuritydotnetnet-frameworkProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFramework.FindObsoleteMachineKeyEncryption

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet