The CAS policy explicitly used by this method has been deprecated by. NET Framework.

Source: Internet
Author: User
Tags microsoft help

The CAS policy explicitly used by this method has been deprecated by. NET Framework.

When an application developed with vs2008 is opened in vs2012, the following message is displayed:

The CAS policy explicitly used by this method has been deprecated by. NET Framework. To enable the CAS policy for compatibility reasons, use the NetFx40_LegacySecurityPolicy configuration switch.

I searched for related information on the Internet and checked the Microsoft Help file. There are roughly two methods mentioned:

1. Add C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ Common7 \ IDE \ devenv.exe. config in the default vs installation directory.

<Configuration>
<Runtime>
<NetFx40_LegacySecurityPolicy enabled = "true"/>
</Runtime>
</Configuration>

This method has been tried locally.

2. Add the following content to the application configuration file web. config:

<System. web>

<Trust level = "Full" legacyCasModel = "true"/>

</System. web>

After the application is added, the application runs normally.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.