There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
TargetInvocationException and MethodAccessException in new builds with self host
After updating from nightly 2013 Jul 20 build to 2013 Aug 09 build from myget and I'm receiving this error upon the startup of the host:
The error is:
"Inheritance security rules violated while overriding member: 'Autofac.Integration.WebApi.AutofacWebApiDependencyResolver.BeginScope()'.
Security accessibility of the overriding method must match the security accessibility of the method being overriden.":"Autofac.Integration.WebApi.AutofacWebApiDependencyResolver.BeginScope()"
What has been changed in terms of added .Net security to the new version and what modification do I've to apply to my host assembly to make it work with the newer builds?
Specifying SecurityTransparent does not work, since then I get this error:
Attempt by security transparent method 'Host.Program.Main(System.String)' to access security critical method 'Microsoft.Owin.Hosting.WebApp.Start<Host.Startup>(System.String)' failed.
Thanks for the help,