The following code throws and exception in dotnet 5 but does not in dotnet framework 4.8:
var req = (HttpWebRequest)HttpWebRequest.Create(urlIncludingScheme); req