0

I have successfully managed to make sharepoint web application claims-aware and connect it to my custom STS. Then I wanted to view claims user has after logging in. I got Claims Web Part from Claims Based Identity & Access Guide code samples (here). I opened the ClaimsWebPart solution, configured server URL, deployed and activated the feature. When I try to this web part, I'm getting this: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe.

1

I ran into the same problem and you need to add the control to the SafeControls section of the web.config. You can do this in VS.Net 2010 by clicking on the "Manifest" button after opening the projects "Package.package" object. It's located on the lower left hand side, then you select the "Edit Options" where you can edit the Solution information. Example shown below:

<Solution xmlns="http://schemas.microsoft.com/sharepoint/" SolutionId="{THE_GUID}" SharePointProductVersion="14.0">
  <Assemblies>
    <Assembly Location="My.Webpart.Solution.dll" DeploymentTarget="GlobalAssemblyCache">
      <SafeControls>
        <SafeControl Assembly="My.Webpart.Solution, Version=1.0.0.0, Culture=neutral, PublicKeyToken={TOKEN}" Namespace="My.Webpart.Solution.TheWebPartObject" TypeName="TheWebPartObject" Safe="True" />
      </SafeControls>
    </Assembly>
  </Assemblies>
  <FeatureManifests>
    <FeatureManifest Location="TheWebPartObjectFolder\Feature.xml" />
  </FeatureManifests>
</Solution>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.