Azure-System.MethodAccessException: Attempt by security transparent method
Posted by Anuraj on Friday, February 6, 2015
.Net .Net 4.0 ASP.Net ASP.Net MVC Windows Azure
Today I faced a strange issue, after publishing an empty ASP.NET MVC application to Azure WebSite.
When I tried to browse the page I got an exception like this -
Attempt by security transparent method ‘System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()’ to access security critical method ‘System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly, System.String)’ failed.
Here is the screenshot
This issue was resolved by changing the file publish options.
Select the “Remove additional files at destination” checkbox.
Happy Programming :)
Copyright © 2017 - Anuraj P. Blog content licensed under the Creative Commons CC BY 2.5
| Unless otherwise stated or granted, code samples licensed under the MIT license
. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Hosted with ❤ by GitHub