Answered by:
Microsoft.SharePoint.Taxonomy.TaxonomyFieldValue is not marked as serializable.

Question
-
Hi,
I am getting an error on my SP2010 production server, which is using a custom event receiver that is used to update the filename field. I am not getting this error on my staging server which is identical(as far as I know).
The code will not execute if a managed metadata field value is selected. Does anyone know how I can fix this?
Here is the error:
"Error loading and running event receiver ActiveStudy_UpdateFilename.EventReceiver1.EventReceiver1 in ActiveStudy_UpdateFilename, Version=1.0.0.0, Culture=neutral, PublicKeyToken=16341f78859bcca8. Additional information is below.
Type 'Microsoft.SharePoint.Taxonomy.TaxonomyFieldValue' in Assembly 'Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' is not marked as serializable."
- Edited by Pete8080 Monday, November 7, 2011 5:15 PM
Monday, November 7, 2011 5:14 PM
Answers
-
Can you try this thread http://social.technet.microsoft.com/Forums/zh/sharepoint2010programming/thread/03eb0260-e69a-4aba-99e7-c41d8ea6654d
Person has same issue as yours . here is what solved his isue
"...I think as I was using Taxonomy created in Farm I had to deply the solution as farm level solution"
- Proposed as answer by petersp77 Wednesday, November 9, 2011 3:12 PM
- Marked as answer by Shimin Huang Friday, November 18, 2011 6:13 AM
Wednesday, November 9, 2011 12:35 PM
All replies
-
Hi Peter,
Thanks for your post!
Could you please post your code so I could do some further research?
Thanks,
SimonWednesday, November 9, 2011 2:57 AM -
Can you try this thread http://social.technet.microsoft.com/Forums/zh/sharepoint2010programming/thread/03eb0260-e69a-4aba-99e7-c41d8ea6654d
Person has same issue as yours . here is what solved his isue
"...I think as I was using Taxonomy created in Farm I had to deply the solution as farm level solution"
- Proposed as answer by petersp77 Wednesday, November 9, 2011 3:12 PM
- Marked as answer by Shimin Huang Friday, November 18, 2011 6:13 AM
Wednesday, November 9, 2011 12:35 PM -
Hi Dinesh,
You are correct about this. I found that only uploading the .wsp file through the Site Collection would not work correctly for the managed metadata field. When I deployed the solution as a farm solution with powershell, the code then processed correctly.
Thanks for your response.
Peter.
Wednesday, November 9, 2011 3:12 PM