我正在尝试做我认为简单的HttpWebRequest(代码深入dll中,因此我不能给出一个小代码片段,但它应该相对简单),但我得到了一个安全性例外:
System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
我已经检查过,所有内容都以完全信任的方式运行,并尝试在web.config中进行设置。但我不知道是什么造成了错误。
任何想法??
答案 0 :(得分:2)
我想我在这里找到了答案:
http://dbvt.com/blog/post/AspNetHostingPermission-Security-Exception-Fix-with-Ajax-in-IIS7.aspx
基本上将应用程序池设置为“加载用户配置文件”