简体   繁体   中英

Attempt by security transparent method 'System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()' to access security critical

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 for this particular error message. I am running an ASP.NET MVC 5 application. I am suspicious of my Amazon EC2 instance to a degree because I remember reading something about Amazon AWS security lock downs of .NET reflection.

Any guidance would be greatly appreciated.

So the issue had nothing to do with my Amazon EC2 Instance.

This issue was fixed by checking the box "Remove additional files at destination" in my Publish profile:

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM