虚拟主机上asp.net运行权限不足问题及解决2011-02-08有些时候我们写的asp.net应用程序是运行在虚拟主机上。有一些虚拟主机可能是由于安全的考虑,对asp.net做了权限设置,会导致我们的应用程序无法正常运行。问题现象:由于某种原因,asp.net不能加载某些dll文件,出现如下错误提示: Server Error in "/" Application.---------------------------------------------Required permissions cannot be acquired.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[PolicyException: Required permissions cannot be acquired.]
[FileLoadException: Could not load file or assembly "Microsoft.Practices.ObjectBuilder, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=null" or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]