Share via


<runtime> Element

Updated: May 2011

Contains information about assembly binding and garbage collection.

<configuration> Element
  <runtime> Element

<runtime>
</runtime>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

Element

Description

<alwaysFlowImpersonationPolicy>

Specifies that the Windows identity always flows across asynchronous points, regardless of how impersonation was performed.

<appDomainManagerAssembly>

Specifies the assembly that provides the application domain manager for the default application domain in the process.

<appDomainManagerType>

Specifies the type that serves as the application domain manager for the default application domain.

<appDomainResourceMonitoring>

Instructs the runtime to collect statistics on all application domains in the process for the life of the process.

<assemblyBinding>

Contains information about assembly version redirection and the locations of assemblies.

<bypassTrustedAppStrongNames>

Specifies whether strong name verification for trusted assemblies should be bypassed.

<CompatSortNLSVersion>

Specifies that the runtime should use legacy sorting behavior when performing string comparisons.

<developmentMode>

Specifies whether the runtime searches for assemblies in directories specified by the DEVPATH environment variable.

<disableCachingBindingFailures>

Specifies whether the caching of binding failures, which is the default behavior in the .NET Framework version 2.0, is disabled.

<disableCommitThreadStack>

Specifies whether the full thread stack is committed when a thread is started.

<disableFusionUpdatesFromADManager>

Specifies whether the default behavior, which is to allow the runtime host to override configuration settings for an application domain, is disabled.

<enforceFIPSPolicy>

Specifies whether to enforce a computer configuration requirement that cryptographic algorithms must comply with the Federal Information Processing Standards (FIPS).

<etwEnable>

Specifies whether to enable event tracing for Windows (ETW) for common language runtime events.

<forcePerformanceCounterUniqueSharedMemoryReads>

Specifies whether PerfCounter.dll uses the CategoryOptions registry setting in a .NET Framework version 1.1 application to determine whether to load performance counter data from category-specific shared memory or global memory.

<gcConcurrent>

Specifies whether the common language runtime runs garbage collection concurrently.

<gcServer>

Specifies whether the common language runtime runs server garbage collection.

<generatePublisherEvidence>

Specifies whether the runtime uses code access security (CAS) publisher policy.

<NetFx40_LegacySecurityPolicy>

Specifies whether the runtime uses legacy code access security (CAS) policy.

<NetFx40_PInvokeStackResilience>

Specifies whether the runtime automatically fixes incorrect platform invoke declarations at run time, at the cost of slower transitions between managed and unmanaged code.

<legacyCorruptedStateExceptionsPolicy>

Specifies whether the runtime allows managed code to catch access violations and other corrupted state exceptions.

<legacyImpersonationPolicy>

Specifies that the Windows identity does not flow across asynchronous points, regardless of the flow settings for the execution context on the current thread.

<loadfromRemoteSources>

Specifies whether assemblies from remote sources are loaded as full trust.

<PreferComInsteadOfRemoting>

Specifies that the runtime will use COM interop instead of remoting across application domain boundaries.

<shadowCopyVerifyByTimeStamp>

Specifies whether shadow copying uses the default startup behavior introduced in the .NET Framework version 4, or reverts to the startup behavior of earlier versions of the .NET Framework.

<supportPortability>

Specifies that an application can reference the same assembly in two different implementations of the .NET Framework, by disabling the default behavior that treats the assemblies as equivalent for application portability purposes.

<system.runtime.caching>

Provides configuration information for the default in-memory object cache.

<TimeSpan_LegacyFormatMode>

Specifies whether the runtime uses legacy formatting for TimeSpan values.

<UseSmallInternalThreadStacks>

Requests that the runtime use explicit stack sizes when it creates certain threads that it uses internally, instead of the default stack size.

Parent Elements

Element

Description

configuration

The root element in every configuration file used by the common language runtime and .NET Framework applications.

Remarks

In the .NET Framework version 2.0, the impersonated identity flows across asynchronous points within an application domain. In the .NET Framework version 2.0, you can enable or disable the flow of impersonation across asynchronous points by properly configuring the runtime element in the machine.config file or in the application configuration file. For ASP.NET, the impersonation flow can be configured in the aspnet.config file found in the <Windows Folder>\Microsoft.NET\Framework\vx.x.xxxx directory.

By default, ASP.NET disables the impersonation flow in the aspnet.config file by using the following configuration settings:

configuration>
   <runtime>
      <legacyImpersonationPolicy enabled="true"/>
      <alwaysFlowImpersonationPolicy enabled="false"/>
   </runtime>
</configuration>

In ASP.NET, if you want to allow the flow of impersonation instead, you must explicitly use the following configuration settings:

<configuration>
   <runtime>
      <legacyImpersonationPolicy enabled="false"/>
      <alwaysFlowImpersonationPolicy enabled="true"/>
   </runtime>
</configuration>

For more information, see <legacyImpersonationPolicy> Element and <alwaysFlowImpersonationPolicy> Element.

Example

The following example shows how to redirect one assembly version to another.

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="myAssembly"
                              publicKeyToken="32ab4ba45e0a69a1"
                              culture="neutral" />
             <bindingRedirect oldVersion="1.0.0.0"
                              newVersion="2.0.0.0"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>

See Also

Tasks

How to: Disable Concurrent Garbage Collection

Reference

Runtime Settings Schema

Concepts

Redirecting Assembly Versions

Other Resources

Configuration File Schema for the .NET Framework

Change History

Date

History

Reason

May 2011

Added missing <enforceFIPSPolicy> element.

Customer feedback.