WebPermission的异常,即使我在完全信任 [英] WebPermission Exception even though I'm in Full trust
问题描述
我想做什么,我认为是一个简单的HttpWebRequest(在code是深一个dll里面,所以我不能给小code片段,但它应该是比较简单),但是我得到一个安全异常:
I'm trying to do what I thought was a simple HttpWebRequest (the code is deep inside a dll so I can't give a small code snippet, but it should be relatively simple), but I'm getting a security exception:
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中设置此。但我不知道有什么可以产生错误。
I've checked and everything is running with Full trust, and have tried setting this in the web.config. But I've no idea what could be creating the error.
任何想法??
推荐答案
我想我找到这个问题的答案在这里:
I think I found the answer to this here:
<一个href=\"http://dbvt.com/blog/post/AspNetHostingPermission-Security-Exception-Fix-with-Ajax-in-IIS7.aspx\" rel=\"nofollow\">http://dbvt.com/blog/post/AspNetHostingPermission-Security-Exception-Fix-with-Ajax-in-IIS7.aspx
基本上设置应用程序池加载用户配置文件
Basically set the application pool to "Load User Profile"
这篇关于WebPermission的异常,即使我在完全信任的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!