.NET中什么是部分受​​信任的程序集/应用程序/代码/等? [英] What is a partially trusted assembly/application/code/etc in .NET?

查看:70
本文介绍了.NET中什么是部分受​​信任的程序集/应用程序/代码/等?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以解释吗?我在互联网上找不到任何东西,所有东西都以某种方式谈论它,但是没有什么能确切说明它是什么。

Could someone please explain? I couldn't find anything on the internet, everything talks about how to go about it in some way, but nothing says exactly what it is.

另外,什么是完全受信任的程序集,它们又有何不同?

Also, what is a fully trusted assembly and how do they differ from one another?

我有一个MS认证考试,这是我唯一不理解的主题。

I have a MS certification exam and this is the only topic that I just don't understand.

编辑:谢谢大家。现在,我对.NET中的安全性有了更好的了解。我能够通过认证考试。

Thanks guys. Now I have a better understanding of security in .NET. I was able to pass my certification exam.

推荐答案

A 完全信任程序集具有不受限制的代码访问安全性权限,该权限允许代码访问所有资源类型并执行特权操作,而这仅取决于操作系统的安全性。例如,如果用户Bob无法访问文件Y,那么在Bob用户空间中运行的完全信任程序集也将无法运行。

A full-trust assembly has an unrestricted set of code access security permissions, which allows the code to access all resource types and perform privileged operations, subject only to operating system security. For example, if user Bob cannot access file Y, then neither can a full-trust assembly running in Bob's user space.

A 部分信任程序集意味着代码以低于完全信任的方式运行。 .NET Framework具有几个预定义的信任您可以直接使用或自定义满足您特定安全要求的级别。例如,可以通过拒绝SQLClientPermission来阻止程序集访问SQL数据库。

A partial-trust assembly means that the code runs at less than full trust. The .NET Framework has several predefined trust levels that you can use directly or customise to meet your specific security requirements. For example, you can prevent an assembly from accessing SQL databases by denying SQLClientPermission.

程序集的信任级别也可以通过其来源来降低。例如,来自网络共享的代码(在.NET的较早版本中)受信任的程度低于来自本地计算机的代码,因此,其执行特权操作的能力受到限制。

The trust level of an assembly can also be diminished by its origin. For example, code coming from a network share (in older versions of .NET) is trusted less than code coming from the local computer, and as a result is limited in its ability to perform privileged operations.

这篇关于.NET中什么是部分受​​信任的程序集/应用程序/代码/等?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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