Category Archives: Web API

Fixed System.MethodAccessException: Attempt by security transparent method ‘WebApplication1.WebApiApplication.Application_Start()’ to access security critical method ‘System.Web.Mvc.AreaRegistration.RegisterAllAreas()’ failed

Exception Details: System.MethodAccessException: Attempt by security transparent method ‘WebApplication1.WebApiApplication.Application_Start()’ to access security critical method ‘System.Web.Mvc.AreaRegistration.RegisterAllAreas()’ failed. Resolution : Add <trust level=”Full”/> under <system.web> in web.config <system.web> <trust level=”Full”/> … </system.web> [Read more about ASP.NET Trust Level]