反思是什么在权限中信任被允许? [英] What Reflection Permission are allowed in Medium Trust?

查看:119
本文介绍了反思是什么在权限中信任被允许?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要问的哪些方法/类被允许在中等信任。
例如,
这些方法是否允许?

I want to ask that which methods/classes are allowed in Medium Trust. For example, whether these methods are allowed?

的GetProperties,
的getMethods,
Activator.CreateInstance,
Assembly.Version,
AssemblyName.Name

GetProperties, GetMethods, Activator.CreateInstance, Assembly.Version, AssemblyName.Name

请告诉我,这是允许的方法。

Please tell me which methods are allowed.

推荐答案

之类的工具的 permview (.NET 1.1只),或的 permcalc (.NET 2.0)可以帮助您了解有关安全权限需求的装配或组件需要;它不是做试验和错误的基础分析,因为你可能会忘记手动锻炼,尝试做一个与安全相关的需求code路径更容易一些。

Tools like permview (.NET 1.1 only) or permcalc (.NET 2.0) can help tell you about the security permission demands your assembly or assemblies will require; it's a little easier than doing trial-and-error bases analysis because you might forget to manually exercise a code path that tries to do a security-related demand.

不幸的是,MSDN文档没有明确列出的每一个方法或属性调用的安全要求。

Unfortunately the MSDN documentation doesn't explicitly list the security requirements of every method or property call.

这篇关于反思是什么在权限中信任被允许?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆