I keep getting this error when I try to add a web part that I added through a WSP:
A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe.
I installed this through the Management Shell:
Install-SPSolution -Identity mySolution.wsp -WebApplication http://sp-dev:10000 -GACDeployment
Is there something I need to do differently with my WSP in order to get this error message to go away? I would prefer a solution that allows me to solve this through my WSP if possible.
UPDATE:
Ok, I marked the additional assembly as a Safe Control and now my manifest looks like this. I noticed that the Safe Controls node under my third party assembly (DocX.dll) is the same as my Safe Control node under my main project (except for namespace). Is this correct?
<Assemblies>
<Assembly Location="DocX.dll" DeploymentTarget="GlobalAssemblyCache">
<SafeControls>
<SafeControl Assembly="MyProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=161g332b2e4d265e" Namespace="Novacode" TypeName="*" />
</SafeControls>
</Assembly>
<Assembly Location="MyProject.dll" DeploymentTarget="GlobalAssemblyCache">
<SafeControls>
<SafeControl Assembly="MyProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=161g332b2e4d265e" Namespace="MyProject.MyProject" TypeName="*" />
</SafeControls>
</Assembly>
</Assemblies>
.snk
) in your project that is being used to sign your assemblies?