Advertisement
Advertisement


Webpart registration error in event log


Question

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:

error initializing safe control - Assembly: ...

The assembly actually loads fine. Additionally, it is correctly listed in the web.config and GAC.

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

2017/07/19
1
1
7/19/2017 5:40:39 PM


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.

So to recap: This caused errors in the event log:

<SafeControl Assembly="AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5bac12230d2e4a0a" Namespace="AssemblyName" **TypeName="AssemblyName"** Safe="True" />

This cleared them up:

<SafeControl Assembly="AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5bac12230d2e4a0a" Namespace="AssemblyName" **TypeName="*"** Safe="True" />
2011/06/01

It sure does sound like you have a problem with your safe control entry. I would try:

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.)

2008/10/23

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.

Regards, Mariano.

2016/09/07

Source: https://stackoverflow.com/questions/25871
Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Email: [email protected]