In .NET Core 2.0 on Windows IIS, I am reading a partial html file in to a string:
string sWelcomeContent = System.IO.File.ReadAllText(welcomepagePath, System.Text.Encoding.GetEncoding(1252));
This works normally, but very rarely (it happened twice last year), I get an error: System.NotSupportedException: No data is available for encoding 1252.
Any ideas why this happens?