SPC010202: Declare element 'SafeControl' for each implemented WebControl

For each non-abstract class which is derived from 'System.Web.UI.WebControls.WebControl' a SafeControl entry must be placed inside the manifest.xml.

TypeName: DeclareSafeControlEntryForWebControls
CheckId: SPC010202
Severity: CriticalWarning
Type: AssemblyFileReference
Resolution

Add element 'SafeControl' to manifest.xml for each WebControl (which is not abstract) in the assembly. See sample below:

  <Assemblies>
    <Assembly Location="My.Assembly.dll" DeploymentTarget="GlobalAssemblyCache">
      <SafeControls>
        <SafeControl
          Assembly="My.Assembly.dll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
          Namespace="My.Assembly.WebParts"  
          Safe="TRUE"  
          TypeName="*"  
          SafeAgainstScript="TRUE" />
      </SafeControls>
    </Assembly>
  </Assemblies>

Links

comments powered by Disqus