ASP.NET 的自定义 CAS 策略必须去哪里?
在我的托管环境中,我无法访问虚拟目录之外的任何内容——我无法编辑 machine.config,也无法编辑机器级别的 web.config,也无法将任何内容放入 GAC 中。
我阅读了《Medium Trust》。例如,如果我想要中等信任 + 一项额外权限,我可以创建自定义信任级别并将其放入我的虚拟目录中,还是需要管理员的合作来手动编辑计算机范围的配置文件?
In my hosting environment I do not have access to anything outside of my virtual directory-- I can't edit the machine.config, nor the machine level web.config, nor can I put anything in the GAC.
I reading up on Medium Trust. If I want, say, Medium Trust + one additional permission, can I create a custom trust level and put it in my virtual directory, or does this require an administrator's cooperation to manually edit machine wide config files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解,您的虚拟目录 Web 配置应该能够覆盖从 machine.config 文件继承的设置,以便您可以在 web.config 中创建自定义信任策略并启用 IO 权限的使用。
信任设置。
http://msdn.microsoft.com/en-us/library/ff648344.aspx
配置层次结构
http://msdn.microsoft.com/en-us/library/ms178685.aspx
From what I understand your virtual directory web config should be able to override the settings inherited from the machine.config file so you could create your custom trust policy within your web.config and have that enable the use of IO permissions.
Trust Settings.
http://msdn.microsoft.com/en-us/library/ff648344.aspx
Config Heirarchy
http://msdn.microsoft.com/en-us/library/ms178685.aspx