开发者

WebPermission Exception even though I'm in Full trust

开发者 https://www.devze.com 2022-12-16 19:45 出处:网络
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 exce

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.

I've checked and eve开发者_JS百科rything 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.

Any ideas??


I think I found the answer to this here:

http://dbvt.com/blog/post/AspNetHostingPermission-Security-Exception-Fix-with-Ajax-in-IIS7.aspx

Basically set the application pool to "Load User Profile"

0

精彩评论

暂无评论...
验证码 换一张
取 消