简体   繁体   English

尝试使用安全透明方法'System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()'来访问安全关键

[英]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: 我在Amazon EC2实例上收到以下错误:

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. 我正在运行ASP.NET MVC 5应用程序。 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. 我对我的Amazon EC2实例有一定程度的怀疑,因为我记得读过有关.NET反射的亚马逊AWS安全锁定的一些内容。

Any guidance would be greatly appreciated. 任何指导将不胜感激。

So the issue had nothing to do with my Amazon EC2 Instance. 所以这个问题与我的Amazon EC2实例无关。

This issue was fixed by checking the box "Remove additional files at destination" in my Publish profile: 通过选中我的发布配置文件中的“删除目标上的其他文件”框来解决此问题:

在此输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试通过安全透明方法访问安全关键方法失败 - Attempt by security transparent method to access security critical method failed System.MethodAccessException:尝试通过安全透明方法访问安全性关键方法在所有应用程序上失败 - System.MethodAccessException: Attempt by security transparent method to access security critical method fails on all applications 通过安全透明方法尝试访问安全关键类型失败 - Attempt by security transparent method to access security critical type failed 尝试使用安全透明方法'Microsoft.Web.Helpers.PreApplicationStartCode.Start()'来访问安全关键方法 - Attempt by security transparent method 'Microsoft.Web.Helpers.PreApplicationStartCode.Start()' to access security critical method 尝试通过安全透明方法'Compat.Button1_Click(System.Object,System.EventArgs)'访问安全关键方法'x'失败 - Attempt by security transparent method 'Compat.Button1_Click(System.Object, System.EventArgs)' to access security critical method 'x' failed 尝试通过安全透明方法'system.web.mvc.preapplicationStartcode.start'访问安全关键方法。 - Attempt by security transparent method 'system.web.mvc.preapplicationStartcode.start' to access security critcal method.. failed 通过安全透明方法异常尝试 - Attempt by security transparent method exception 异常“通过安全透明方法'NPOI.OpenXml4Net.OPC.ZipPackage尝试” - Exception “Attempt by security transparent method 'NPOI.OpenXml4Net.OPC.ZipPackage” CA2140。 透明代码不得引用安全关键项 - CA2140. Transparent code must not reference security critical items 错误:类型违反了继承安全规则:“ System.Web.WebPages.Razor.WebPageRazorHost” - Error: Inheritance security rules violated by type: 'System.Web.WebPages.Razor.WebPageRazorHost'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM