| Subcribe via RSS

Type not registered as safe error in a sandbox solution

Oktober 14th, 2010 Posted in Sandbox, SharePoint

In my case this error occured after renaming the web part class or modifying the namespace.

I found the SafeControl entry in the hidden file SharePointProjectItem.spdata located in the same directory as my web part class:

    <SafeControl Name="SafeControlEntry1" 
    TypeName="*" IsSafe="true" 
    IsSafeAgainstScript="false" />

So if you rename a web part or modify the namespace have a look at the following checklist:

  • Check namespace in .cs file
  • Check class name in .cs file
  • Check namespace and class name in .webpart file
  • Check namespace in the hidden .spdata file

One Response to “Type not registered as safe error in a sandbox solution”

  1. Doreatha Friedli Says:

    I notice all regarding the dynamic way you offer precious solutions through the web site and even inspire response from the others on this content while our own daughter is undoubtedly being taught a whole lot.

Leave a Reply