<generatePublisherEvidence> Element
Specifies whether the runtime creates Publisher evidence for code access security (CAS).
<configuration> Element
<runtime> Element
<generatePublisherEvidence> Element
<generatePublisherEvidence
enabled="true|false"/>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute |
Description |
---|---|
enabled |
Required attribute. Specifies whether the runtime creates Publisher evidence. |
Enabled Attribute
Value |
Description |
---|---|
false |
Does not create Publisher evidence. |
true |
Creates Publisher evidence. This is the default. |
Child Elements
None.
Parent Elements
Element |
Description |
---|---|
configuration |
The root element in every configuration file used by the common language runtime and .NET Framework applications. |
runtime |
Contains information about runtime initialization options. |
Remarks
This element was introduced in the .NET Framework version 3.5 and applies only to that version. It has no effect in later versions of the .NET Framework.
The common language runtime (CLR) tries to verify the Authenticode signature at load time to create Publisher evidence for the assembly. However, by default, most applications do not need Publisher evidence. Standard CAS policy does not rely on the PublisherMembershipCondition. You should avoid the unnecessary startup cost associated with verifying the publisher signature unless your application executes on a computer with custom CAS policy, or is intending to satisfy demands for PublisherIdentityPermission in a partial-trust environment. (Demands for identity permissions always succeed in a full-trust environment.)
Note
We recommend that services use the <generatePublisherEvidence> element to improve startup performance. Using this element can also help avoid delays that can cause a time-out and the cancellation of the service startup.
Configuration File
This element can be used only in the application configuration file.
Example
The following example shows how to use the <generatePublisherEvidence> element to disable checking for CAS publisher policy for an application.
<configuration>
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>
</configuration>
See Also
Reference
Other Resources
Configuration File Schema for the .NET Framework
Change History
Date |
History |
Reason |
---|---|---|
May 2010 |
Updated attribute information; added information about the .NET Framework versions the element applies to. |
Information enhancement. |