<p>We created several custom web parts for SharePoint 2007. They work fine. However whenever they are loaded, we get an error in the event log saying:</p>

<blockquote>
  <p>error initializing safe control - Assembly: ...</p>
</blockquote>

<p>The assembly actually loads fine. Additionally, it is correctly listed in the <code>web.config</code> and <code>GAC</code>.</p>

<p>Any ideas about how to stop these (Phantom?) errors would be appreciated.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­</p>

[{'answer_id': 25882, 'author': 'Daniel Pollard', 'author_id': 2758, 'author_profile': 'https://Stackoverflow.com/users/2758', 'pm_score': 2, 'selected': False, 'text': '<p>You need to add a safecontrol entry to the web,config file, have a look at the following:</p>\n\n<pre><code>&lt;SafeControls&gt;\n  &lt;SafeControl\n    Assembly = "Text"\n    Namespace = "Text"\n    Safe = "TRUE" | "FALSE"\n    TypeName = "Text"/&gt;\n  ...\n&lt;/SafeControls&gt;\n</code></pre>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/ms413697.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms413697.aspx</a></p>\n'}, {'answer_id': 229923, 'author': 'Kwirk', 'author_id': 21879, 'author_profile': 'https://Stackoverflow.com/users/21879', 'pm_score': 2, 'selected': False, 'text': '<p>I was having this problem too.  It turned out that there was a problem with my Manifest.xml file.  In the SafeControl tag for my assembly, I had the TypeName specifically defined.  When I changed the TypeName to a wildcard value, the error messages in the event log stopped.</p>\n\n<p>So to recap:\nThis caused errors in the event log:  </p>\n\n<pre><code>&lt;SafeControl Assembly="AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5bac12230d2e4a0a" Namespace="AssemblyName" **TypeName="AssemblyName"** Safe="True" /&gt;\n</code></pre>\n\n<p>This cleared them up:  </p>\n\n<pre><code>&lt;SafeControl Assembly="AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5bac12230d2e4a0a" Namespace="AssemblyName" **TypeName="*"** Safe="True" /&gt;\n</code></pre>\n'}, {'answer_id': 231429, 'author': 'AdamBT', 'author_id': 22426, 'author_profile': 'https://Stackoverflow.com/users/22426', 'pm_score': 1, 'selected': False, 'text': '<p>It sure does sound like you have a problem with your safe control entry.  I would try:</p>\n\n<p>Under the NameSpace and TypeName use "*".  Using wildcards in namespace and typeName will register all classes in all namespaces in your assembly as safe.  (You generally wouldn\'t want to do this with 3rd party tools.)  </p>\n'}, {'answer_id': 39373689, 'author': 'MarianoSP', 'author_id': 6805414, 'author_profile': 'https://Stackoverflow.com/users/6805414', 'pm_score': 0, 'selected': False, 'text': '<p>This is because of the amount of list items in the lists. Your server takes to much time to migrate all the list items and it fails, try deleiting the list items or configuring the server.</p>\n\n<p>Regards,\nMariano.</p>\n'}]
['https://Stackoverflow.com/questions/25871', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']