SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For a project, I've created a web-part which derives from the ChartWebPart class (in order to set the data-source relatively).


SharePoint Server 2010 (Enterprise)


using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.DataVisualization.Charting;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.Office.Server.WebControls;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace Cbs.PP.ProjectCosts.WebParts.ProjectExpensesChartWebPart
    public class ProjectExpensesChartWebPart : ChartWebPart
        public ProjectExpensesChartWebPart()

        protected override void CreateChildControls()



<?xml version="1.0" encoding="utf-8"?>
  <Elements xmlns="" >
    <Module Name="ProjectExpensesChartWebPart" List="113" Url="_catalogs/wp">
      <File Path="ProjectExpensesChartWebPart\ProjectExpensesChartWebPart.webpart"
        <Property Name="Group" Value="CBS" />

Deploying the web-part and adding it to a site is no problem, but when I try to configure the webpart, it throws an exeption:

Type: SerializationException Message: The constructor which is needed for the deserialization of an object of the type "[...].ProjectExpensesChartWebPart" couldn't be found.*

*note: translation, since I have the german version of SP installed. Original: "Der für die Deserialisierung eines Objekts mit dem Typ "[...].ProjectExpensesChartWebPart" erforderliche Konstruktor wurde nicht gefunden."

I hope that someone has a clue, what's wrong here, or can at least point me in the right direction.

also, the Stacktrace:

bei System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context) bei System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
bei System.Runtime.Serialization.ObjectManager.DoFixups() bei System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) bei System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) bei System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream) bei Microsoft.Office.Server.Internal.Charting.Utilities.ChartAdminPageBase.get_currentWorkingSet() bei Microsoft.Office.Server.Internal.Charting.Utilities.ChartAdminPageBase.FetchFromCurrentWorkingSet(String key) bei Microsoft.Office.Server.Internal.Charting.UI.WizardConnectToDataPage.LoadModel() bei Microsoft.Office.Server.Internal.Charting.UI.WizardConnectToDataPage.OnLoad(EventArgs e) bei System.Web.UI.Control.LoadRecursive() bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

share|improve this question
up vote 2 down vote accepted

I think you have to add the constructor ProjectExpensesChartWebPart(SerializationInfo info, StreamingContext context) addintionally to the default constructor.

share|improve this answer
Thanks man, that was much, much easier than I expected. :D – Markus Schwalbe May 31 '11 at 12:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.