开发者

ASP.Net Medium trust and dll

开发者 https://www.devze.com 2023-03-24 01:03 出处:网络
I have an ASP.Net website and add a reference to my dll. Medium trust permission level is set for the web site.

I have an ASP.Net website and add a reference to my dll. Medium trust permission level is set for the web site. During web site compilation i get the exception:

Could not load file or assembly ... or one of its dependencies. Failed to grant minimum permissi开发者_C百科on requests.

What should i change in my dll to make it work in Medium trust level ?


It depends on what your DLL is doing. Here are some of the restrictions applied under Medium Trust:

  • Permissions are limited in what the application can access within its own directory structure
  • No file access is permitted outside of the application's virtual directory hierarchy
  • Limited rights to certain common environment variables
  • No reflection permissions
  • No sockets permission
  • To access Web resources, you must explicitly add endpoint 'URLs' - either in the originUrl attribute of the element or inside the policy file
0

精彩评论

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