Post SP2019 Sep CU webpart problem

Pete Marone 0 Reputation points
2024-09-19T16:36:00+00:00

Hi,

After installing the SharePoint 2019 September 10th Cumulative Update (this one), our custom webpart toolbar property appears to be causing an issue when attempting to render the webpart control. The exception we encounter is the following:

[ArgumentException: The serialized data is invalid.]
  at Microsoft.SharePoint.WebPartPages.SPObjectStateFormatter.Deserialize(Stream inputStream)
  at Microsoft.SharePoint.WebPartPages.Utility.DeserializeByteArrayToObject(SPSerializationBinderBase binder, Byte[] bytes)
  at Microsoft.SharePoint.WebPartPages.BinaryWebPartDeserializer.LoadInitialWebPart()
  at Microsoft.SharePoint.WebPartPages.BinaryWebPartDeserializer.Deserialize()
  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts)

[UnsafeControlException: The control type 'System.Collections.Generic.List`1[[IC.He.SharePointWeb.SP.WebParts.WebpartColumn, IC.He.SharePointWeb, Version=1.0.0.0, Culture=neutral, PublicKeyToken=50a0670ec03a0037]]' is not allowed on this page. ]
  at Microsoft.SharePoint.WebPartPages.SPSerializationBinder.IsAllowedType(Type type)
  at Microsoft.SharePoint.WebPartPages.SPSerializationBinderBase.CheckIfAllowedType(Type type)
  at Microsoft.SharePoint.WebPartPages.SPSerializationBinderBase.BindToType(String assemblyName, String typeName)
  at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Bind(String assemblyString, String typeString)
  at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
  at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
  at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
  at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
  at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
  at Microsoft.SharePoint.WebPartPages.SPObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
  at Microsoft.SharePoint.WebPartPages.SPObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
  at Microsoft.SharePoint.WebPartPages.SPObjectStateFormatter.Deserialize(Stream inputStream)


In our web.config we have defined our assembly as a safe control in the following manner:

      <SafeControl Assembly="IC.He.SharePointWeb, Version=1.0.0.0, Culture=neutral, PublicKeyToken=50a0670ec03a0037" Namespace="IC.He.SharePointWeb.SP.WebParts" TypeName="*" Safe="True" />
      <SafeControl Assembly="IC.He.SharePointWeb, Version=1.0.0.0, Culture=neutral, PublicKeyToken=50a0670ec03a0037" Namespace="IC.He.SharePointWeb.WebParts" TypeName="*" Safe="True" />

I have tried tinkering with the AllowListItems, since it seems to be related to the serialization of collections, but I couldn't find a value that corresponds to the Sytem.Collections.Generic.List type.

I attach the full correlation log too.

Any help would be appreciated

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,340 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Xyza Xue_MSFT 24,716 Reputation points Microsoft Vendor
    2024-09-20T02:04:19.89+00:00

    Hi @Pete Marone ,

    The error message indicates that the serialized data is invalid, and the control type System.Collections.Generic.List1[[IC.He.SharePointWeb.SP.WebParts.WebpartColumn, IC.He.SharePointWeb, Version=1.0.0.0, Culture=neutral, PublicKeyToken=50a0670ec03a0037]]` is not allowed on the page.

    Try to install the SharePoint Server 2019 Language Pack Update (KB5002597) to see if the issue is resolved.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Xyza Xue_MSFT 24,716 Reputation points Microsoft Vendor
    2024-09-23T05:57:48.13+00:00

    Hi @Pete Marone ,

    Too bad it didn't solve your problem. I couldn't find some information on this issue. If you think that this matter does not affect you much, perhaps you can wait for the next update as it may be this update that is causing the problem. We sincerely recommend you go to SharePoint Feedback community to provide your feedback: SharePoint · Community (microsoft.com).

    If it is seriously affecting your business, please go to the website Global Customer Service phone numbers - Microsoft Support) to find related number and call it to create a new Phone Service Request to Microsoft Phone Support team.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.