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
精彩评论