如何反射权限添加到IIS或将其添加到web.config文件? [英] how to add Reflection Permission to IIS or to add it to web.config?

查看:156
本文介绍了如何反射权限添加到IIS或将其添加到web.config文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 FileHelpers 的读取CSV文件和所有直到我从VS开发服务器切换到IIS也没关系,我得到的?PolicyException:必需的权限不能后天的,我用Google搜索,发现我需要添加的反射权限作为这项工作,任何人都知道如何

I'm using FileHelpers for reading csv files, and all it was ok until I switched from VS dev server to IIS, I get a "PolicyException: Required permissions cannot be acquired", I googled and found that I need to add Reflection Permission for this to work, anybody knows how ?

推荐答案

您asp.net应用程序在低信任或中等信任可能运行。反思权限是完全信任的。

Your asp.net application is probably running in low-trust or medium trust. Reflection permission is in full trust.

您可以启用这个特定权限的反思没有按照这个帖子由Rick施特拉尔去完全信任:

You can enable this specific Reflection Permission without going full trust by following this post by Rick Strahl :

<一个href=\"http://www.west-wind.com/Weblog/posts/6344.aspx\">http://www.west-wind.com/Weblog/posts/6344.aspx

请注意:如果你主持可能无法正常工作,并没有权限来覆盖一些安全设置

Note: it might not work if you're hosted and don't have permissions to override some security settings.

这篇关于如何反射权限添加到IIS或将其添加到web.config文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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