浅析ASP.NET安全性分析(加强asp.net 1.1/2.0安全性)

2019-10-16 18:39:32王冬梅

< identity impersonate="true" userName="" password=""/>

ASP.NET 2.0 以上:
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIGweb.config

设置:
< identity impersonate="true"/>

如果没有此两项,分别进行增加:

< location allowOverride="true"> 改为:< location allowOverride="false">
< system.web>
< securityPolicy>
< trustLevel name="Full" policyFile="internal"/>
< trustLevel name="High" policyFile="web_hightrust.config"/>
< trustLevel name="Medium" policyFile="web_mediumtrust.config"/>
< trustLevel name="Low" policyFile="web_lowtrust.config"/>
< trustLevel name="Minimal" policyFile="web_minimaltrust.config"/>
< /securityPolicy>
< trust level="Full" originUrl=""/>
< identity impersonate="true"/> < !-- 这里增加 -->
< /system.web>
< /location>