HOW TO: Restore the Default Policy Levels for ASP.NET Applications

This article has been archived. It is offered "as is" and will no longer be updated.
SUMMARY
This step-by-step article describes how to restore the customized policy levels to the default settings for .NET-connected applications.

By default, managed assemblies are assigned one of the four trust levels: Full, High, Low, and None. These trust levels represent groups of specific rights to simplify assigning trust to managed assemblies. You can change the rights that are assigned to the High, Low, and None trust levels to meet the unique requirements of an environment.

Although you must use this level of customization for some environments, it can cause problems when you run assemblies that were designed to run in a specific trust level, because those assemblies may not have access to all resources that they require. This article describes how to restore the original settings that are assigned to each of the policy levels to their default state.

back to the top

Trust Level Configuration Files

The .NET Framework stores copies of the default settings for each policy level in the same folder as the active configuration files. The backup configuration files add the .DEFAULT file name extension. The following table shows the locations of the three active configuration files and the three backup configuration files.

Note Configuration files exist for the High, Low, and None trust levels. However, there is no configuration file for the Full trust level. The Full trust level does not require a configuration file because assemblies that run at that level run without restrictions.

File LocationDescription
\System Root\Microsoft .NET\Framework\Version Number\CONFIG\Web_notrust.configThe active configuration file that defines the permissions for applications that run at the None trust level.
\System Root\Microsoft .NET\Framework\Version Number\CONFIG\Web_notrust.config.defaultThe backup configuration file that defines the permissions for applications that run at the None trust level.
\System Root\Microsoft .NET\Framework\Version Number\CONFIG\Web_lowtrust.configThe active configuration file that defines the permissions for applications that run at the Low trust level.
\System Root\Microsoft .NET\Framework\Version Number\CONFIG\Web_lowtrust.config.defaultThe backup configuration file that defines the permissions for applications that run at the Low trust level.
\System Root\Microsoft .NET\Framework\Version Number\CONFIG\Web_hightrust.configThe active configuration file that defines the permissions for applications that run at the High trust level.
\System Root\Microsoft .NET\Framework\Version Number\CONFIG\Web_hightrust.config.defaultThe backup configuration file that defines the permissions for applications that run at the High trust level.


back to the top

Restore Policy Level Settings

To restore the default policy level settings, follow these steps:
  1. Start Windows Explorer, and then move to the following folder:
    \System Root\ Microsoft.NET\Framework\Version Number\CONFIG\
  2. Rename the active, customized configuration file for the policy level that you want to restore. For example, add a .CUSTOM file name extension.
  3. Create a copy of the backup configuration file. For this file, use the same name as the active configuration file by removing the .DEFAULT extension.

    Note The backup configuration file has the same file name as the active configuration file, with an additional .DEFAULT file name extension.
back to the top
REFERENCES
For more information about the securityPolicy element, visit the following Microsoft Web site:For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
818013 HOW TO: Support Applications That Are Built on the .NET Framework


back to the top
Properties

Article ID: 815165 - Last Review: 01/17/2015 06:39:11 - Revision: 2.6

Microsoft .NET Framework 1.0, Microsoft .NET Framework 1.1

  • kbnosurvey kbarchive kbdir kbweb kbconfig kbhowtomaster KB815165
Feedback