Also got the problem:
Inheritance security rules violated by type: 'System.Net.Http.WebRequestHandler'. Derived types must either match the security accessibility of the base type or be less accessible.
As described here:
https://github.com/dotnet/corefx/issues/11100