Execution permission cannot be acquired

本文探讨了ASP.NET程序中出现的“无法获取执行权限”错误现象,并分析了该问题与应用程序池用户身份及bin文件夹权限设置之间的关联。通过调整权限配置,可以有效避免此错误的发生。

遇到一个奇怪问题,在有时更新ASP.NET程序之后或者某种特定的情况下,会出现这样的错误:

Execution permission 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: Execution permission cannot be acquired.

 

重启IIS就会恢复正常。

经过分析,发现问题与下列场景有关:

应用程序池以ApplicationPoolIdentity用户身份运行,Users用户组对bin文件夹没有修改和写权限。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值