服務熱線
153 8323 9821
這是由ASP.NET安全性引起的異常,有可能的原因是部署服務器上的machine.config或web.config中配置的安全策略被修改過。
在.net2.0中,Asp.Net默認在C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config中配置了網站的信任級別:
<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=""/>
本來默認是Full級別,但可能服務器供應商出于安全考慮而采用了其他策略。
當前有一種辦法,就是在你網站根目錄下的web.config中重新聲明所選用的策略為Full:
<trust level="Full" originUrl=""/>
它在配置文件中的層次結構如下:
<location allowOverride="true">
<system.web>
<trust level="Full" originUrl=""/>
</system.web>
</location>
location是根元素。
如果這樣扔無法解決此問題,則請聯系服務器供應商協助解決此問題