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 ?
+8
A:
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.
Yann Schwartz
2009-12-04 09:20:07
I don't know, I get this policy exception even when I put Full trust, I'm on a local machine with my own IIS7, Windows 7, VS2008
Omu
2009-12-04 12:10:08
it was the Load User Profile property from DefaultAppPool AdvanceSettings, I had to set it to true.
Omu
2009-12-07 07:28:33
+1
A:
Thanks Omu! I was pulling my hair out on this. Every other post I could find only mentions setting Full trust or reflection permissions, which I did, but still got the error. Once I changed the Load User Profile setting in the App pool, it went swimmingly :)
Jim
2010-07-23 20:04:14