开发者

Setting trust level to High in Web.config makes application run slower?

开发者 https://www.devze.com 2023-02-04 10:32 出处:网络
Can anybody shed any light on the following behavior.We had a UAT and Production version of a .NET web application. UAT was taking around 5 seconds to run a particular operatio开发者_C百科n while Prod

Can anybody shed any light on the following behavior. We had a UAT and Production version of a .NET web application. UAT was taking around 5 seconds to run a particular operatio开发者_C百科n while Prod was taking 35+ seconds.

This even happened when pointing both web applications at the same database and putting them both on the same machine.

The culprit was finally found to be the following entry, which was in the Prod but not UAT web.config

<trust level="High" originUrl="" />

Can anybody shed any light on why this would cause such a significant performance degradation??


Code Access Security checks do add a cost which is largely optimized out in full trust mode so it is at least conceivable that this is the culprit. Assuming you can repro the same effect on your workstation, definitely profile it.

0

精彩评论

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