此方法顯式使用的 CAS 策略已被 .NET Framework 棄用。若要出於兼容性原因而啟用 CAS 策略,請使用 NetFx40_LegacySecurityPolicy 配置開關


Just add this

<NetFx40_LegacySecurityPolicy enabled="true"/> 

into your VS2010 DevEnv configuration file, you'll find it in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config

There is a <runtime> section, just copy it at the first place.
I've had the same problem with DevExpress 8.2

If some people face the same problem while developing ASP.Net apps, they should add the Attribute to the Cassini config file placed in C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.exe.config

<runtime>
  <NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime>

 C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config

設置

修改前請備份

參考:

http://stackoverflow.com/questions/2637089/netfx40-legacysecuritypolicy-in-design-time-mode


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM