How to request a permission of type System.Net.WebPermission in ASP.NET MVC?

后端 未结 3 1254
我寻月下人不归
我寻月下人不归 2021-01-18 23:22

I created a small web service that creates a HttpWebRequest to another website using a proxy and after i used the proxies i got that error:

3条回答
  •  借酒劲吻你
    2021-01-18 23:29

    It seems that you are running into a trust related issue. You might be able to work-around the issue by including in your Web.Config, under System.Web,

    
    

    WebPermission is not available under a medium trust environment (and you can look at this article to modify this behavior and for the reasons why you shouldn't).

    However, if you require full trust you might have to reconsider the requirements of your application.

提交回复
热议问题