Attempting transparent security method "System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule ()" to access a critical critical state
I am getting the following error on an Amazon EC2 instance:
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.
There is nothing on the internet in this particular error message. I am running an ASP.NET MVC 5 application. I am suspicious of an Amazon EC2 instance to an extent because I remember reading something about disabling Amazon AWS security in .NET parsing.
Any guidance is welcome.
+3
Brian ogden
source
to share
1 answer
So the issue had nothing to do with my Amazon EC2 instance.
This issue was fixed by checking the "Delete additional files at destination" checkbox in my publishing profile:

+7
Brian ogden
source
to share