Looks like I have a version mismatch somewhere.. anyone recognize the following exception or how to go about debugging?
This is on a new Azure VM running Windows Server 2016, IIS 10, .Net Framework 4.6.1
The application is an ASP.NET Mvc 5 and I added a nuget ref to elmah.io
Looking closer I can see that Elmah assembly has a dependency on System.Web 2.0 but .NET Framework 4.6.1 has 4.0
[TypeLoadException: 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.]
Microsoft.Rest.ServiceClient`1.CreateRootHandler() +0
Microsoft.Rest.ServiceClient`1..ctor(DelegatingHandler[] handlers) +59
Elmah.Io.Client.ElmahioAPI..ctor(DelegatingHandler[] handlers) +96
Elmah.Io.Client.ElmahioAPI..ctor(ServiceClientCredentials credentials, DelegatingHandler[] handlers) +70
Elmah.Io.Client.ElmahioAPI.Create(String apiKey, ElmahIoOptions options) +146
Elmah.Io.Client.ElmahioAPI.Create(String apiKey) +91
Elmah.Io.ErrorLog..ctor(IDictionary config) +109
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +217
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1431
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +184
System.Activator.CreateInstance(Type type, Object[] args) +34
Elmah.ErrorLog.GetDefaultImpl(HttpContext context) +178
Elmah.ServiceCenter.GetService(Object context, Type serviceType) +17
Elmah.ErrorLog.GetDefault(HttpContext context) +34
Elmah.ErrorPageBase.get_ErrorLog() +39
Elmah.ErrorLogPage.OnLoad(EventArgs e) +400
System.Web.UI.Control.LoadRecursive() +154
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082