如何确定一个网站是完全信任运行? [英] How to confirm a web site is running in full trust?

查看:92
本文介绍了如何确定一个网站是完全信任运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我给了一个网站完全信任但我仍然得到一些安全例外。

I gave a site full trust however I am still getting some security exceptions.

我如何确认一个网站有充分的信任?

How can I confirm a website has full trust?

推荐答案

您可以使用的 SecurityManager.IsGranted 检查特定的授予集。例如,这将测试完全信任......

You can use the SecurityManager.IsGranted to check for a particular grant set. For example, this will test for full trust ...

var perm  = new FileIOPermission(PermissionState.Unrestricted);
var fullTrust = SecurityManager.IsGranted(perm);

这篇关于如何确定一个网站是完全信任运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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