You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the agent with .NET Framework 4.6.2, the user may experience the following exception.
System.MissingMethodException: Method not found: 'Void System.Net.Http.HttpClientHandler.set_ServerCertificateCustomValidationCallback(System.Func`5<System.Net.Http.HttpRequestMessage,System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,Boolean>)'.
This API is technically missing (see also) from .NET Framework 4.6.2, despite being in netstandard2.0.
This doesn't appear at compile time due to the build picking up a specific system.net.http package (see #2112). It can sometimes be worked around with binding redirects but this is not always possible in no-code instrumentation scenarios.
Options:
We could review switching to System.Net.Http.WinHttpHandler (see docs) on `net462 which may avoid the issue while still supporting the server callback API usage.
We could drop support for certificate calls back on net462 (or fallback to ServicePointManager) to avoid this exception at runtime.
The easiest option, for now, would be removing the certificate callback code on net462 as this shouldn't impact many/any consumers and should avoid the exception.
When using the agent with .NET Framework 4.6.2, the user may experience the following exception.
This API is technically missing (see also) from .NET Framework 4.6.2, despite being in
netstandard2.0
.This doesn't appear at compile time due to the build picking up a specific
system.net.http
package (see #2112). It can sometimes be worked around with binding redirects but this is not always possible in no-code instrumentation scenarios.Options:
System.Net.Http.WinHttpHandler
(see docs) on `net462 which may avoid the issue while still supporting the server callback API usage.ServicePointManager
) to avoid this exception at runtime.System.Threading.Tasks.Dataflow
to resolve transistive resolution issues on net462 #2112).The easiest option, for now, would be removing the certificate callback code on
net462
as this shouldn't impact many/any consumers and should avoid the exception.References:
The text was updated successfully, but these errors were encountered: