Skip Ribbon Commands
Skip to main content

Robin | zevenseas | SharePoint Blog

:

The zevenseas Community > Blogs > Robin | zevenseas | SharePoint Blog > Posts > About the SPPersistedObject and primitive types
February 06
About the SPPersistedObject and primitive types

In addition to my previous post about this wonderful object, be careful what Type you use to ‘persist’. Please be sure that you don’t use any ‘complex’ types such as a DataTable or UserPrincipal. Otherwise during the storing itself, the following error will be raised:

The platform does not know how to deserialize an object of type System.Data.DataTable. The platform can deserialize primitive types such as strings, integers, and GUIDs; other SPPersistedObjects or SPAutoserializingObjects; or collections of any of the above. Consider redesigning your objects to store values in one of these supported formats, or contact your software vendor for support.

The bad thing about this that you have to know exactly where you have stored (or tried to store ;) the object in order to Unprovision and Uncache and after that Delete the object.

Since I couldn’t find any reference of the object it costed me my config database since when retracting my solution that had this custom SPPersistedObject, it failed. So I couldn’t remove my solution anymore.. even worse.. the feature couldn’t be deactivated as well since SharePoint does some calls to the config database and tries to deserialize the object while it can’t and there will fail.

 

Technorati Tags:

Comments

Ivo

Take a look on this post, think might be interesting for you ...

http://jritmeijer.spaces.live.com/blog/cns!8A48A27460FB898A!1176.entry
System Account on 18/08/2009 01:44
 

 Statistics

 
Views: 3022
Comments: 1
Tags:
Published:1595 Days Ago