I am trying to build an asp.net web api 2.0 application using VS 2012 and asp net web tools for vs 2012 on .Net 4.5.2 framework; when i try to run the application, 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.
I tried updating all the packages in the solution, adding [assembly: SecurityRules(SecurityRuleSet.Level1)] or [assembly: SecurityRules(SecurityRuleSet.Level2)] but none of them seems to work.
Please help me in resolving this issue I tried all the previous threads but none of them is working.
Thanks in advance.
Edit Below are the list of nugget packages that are referenced in my web api project
You need to use the Autofac.WebApi2 package with the latest classic Web API as outlined in the docs. The current release version of Autofac.WebApi2 is 3.4.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With