【发布时间】:2015-04-13 14:08:48
【问题描述】:
我们在 SSRS 11 和 .NET 4.5 上面临 the slow performance issue。
A solution是在web.config中设置trust模式为full。这种修改有什么风险?
【问题讨论】:
标签: reporting-services web-config .net-4.5 code-access-security full-trust
我们在 SSRS 11 和 .NET 4.5 上面临 the slow performance issue。
A solution是在web.config中设置trust模式为full。这种修改有什么风险?
【问题讨论】:
标签: reporting-services web-config .net-4.5 code-access-security full-trust
首先,您可以通过 web.config 中的FullTrustAssembliesSection 为您需要的程序集提供Full Trust level,而这只能为signed assemblies 完成:
<system.web>
<securityPolicy>
<fullTrustAssemblies>
<add assemblyName="MyCustomAssembly"
version="1.0.0.0"
publicKey="a 320 hex character representation
of the public key blob used with a
signed assembly"
/>
</fullTrustAssemblies>
</securityPolicy>
</system.web>
注意
The default policy 用于评估权限授予完全信任 Global Assembly Cache (
GAC) 程序集和部分信任 其他程序集。
另外请注意,您可以configure trust level for an application in IIS。
所以这个选项可以帮助你确定哪个程序集应该在FullTrust 策略下运行,并将其他的设置为默认值。但是,如果您仍然担心您的应用程序或某个库的信任级别,我建议您调查Trust Level table 并回答以下问题:
之后,您可以随意管理您的应用程序安全性。希望这会有所帮助。
另见:
* ASP.NET Application Security in Hosted Environments
* Security Practices: ASP.NET Security Practices at a Glance
【讨论】: