Microsoft KB Archive/815165

From BetaArchive Wiki

Article ID: 815165

Article Last Modified on 4/30/2003



APPLIES TO

  • Microsoft .NET Framework 1.0
  • Microsoft .NET Framework 1.1



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 Location Description
\System Root\Microsoft .NET\Framework\Version Number\CONFIG\Web_notrust.config The 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.default The 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.config The 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.default The 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.config The 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.default The 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

Keywords: kbhowtomaster kbweb kbdir kbconfig KB815165