how to add Reflection Permission to IIS or to add it to web.config?

拜拜、爱过 提交于 2019-12-10 14:53:41

问题


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 ?


回答1:


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

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

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.



来源:https://stackoverflow.com/questions/1845797/how-to-add-reflection-permission-to-iis-or-to-add-it-to-web-config

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!