User (Legacy) Posted January 25, 2006 Author Report Share Posted January 25, 2006 I would like to create chartFX webpart and please find the code below. Problem is that whenever I try to put this webpart in the sharepoint portal , I get "Web Part appears to be causing a problem" I put chartFX.Base , ChartFX.Borders and ChartFX.Internet dlls in GAC (C:\winnt\assembly) This is windows 2003 machine. What I am missing. Seems like I have to do something special terms of registering but I do not know what. Please help. using System; using SoftwareFX.ChartFX.Internet.Server; using System.Web.UI; using System.Web.UI.WebControls; using System.ComponentModel; using System.Xml.Serialization; using System.Runtime.InteropServices; using Microsoft.SharePoint.WebPartPages; using Microsoft.SharePoint.WebPartPages.Communication; using Microsoft.SharePoint.Utilities; namespace wpTest { /// <summary> /// Description for WebPart1. /// </summary> [DefaultProperty("Text"), ToolboxData("<{0}:wpTestrunat=server></{0}:wpTest>"), XmlRoot(Namespace="wpTest")] public class wpByStatus : Microsoft.SharePoint.WebPartPages.WebPart { private const string defaultText = ""; private string text = defaultText; private Chart Chart1 = null; [browsable(true), Category("Miscellaneous"), DefaultValue(defaultText), WebPartStorage(Storage.Personal), FriendlyName("Text"), Description("Text Property")] public string Text { get { return text; } set { text = value; } } protected override void RenderWebPart(HtmlTextWriter output) { EnsureChildControls(); //this.Chart1.RenderControl( output ); this.Chart1.RenderControl(output); output.Write(SPEncode.HtmlEncode(Text)); } protected override void CreateChildControls() { base.CreateChildControls(); Chart1 = new Chart(); // I add this line and webpart starts failing } } } Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 25, 2006 Report Share Posted January 25, 2006 I would like to create chartFX webpart and please find the code below. Problem is that whenever I try to put this webpart in the sharepoint portal , I get "Web Part appears to be causing a problem" I put chartFX.Base , ChartFX.Borders and ChartFX.Internet dlls in GAC (C:\winnt\assembly) This is windows 2003 machine. What I am missing. Seems like I have to do something special terms of registering but I do not know what. Please help. using System; using SoftwareFX.ChartFX.Internet.Server; using System.Web.UI; using System.Web.UI.WebControls; using System.ComponentModel; using System.Xml.Serialization; using System.Runtime.InteropServices; using Microsoft.SharePoint.WebPartPages; using Microsoft.SharePoint.WebPartPages.Communication; using Microsoft.SharePoint.Utilities; namespace wpTest { /// <summary> /// Description for WebPart1. /// </summary> [DefaultProperty("Text"), ToolboxData("<{0}:wpTestrunat=server></{0}:wpTest>"), XmlRoot(Namespace="wpTest")] public class wpByStatus : Microsoft.SharePoint.WebPartPages.WebPart { private const string defaultText = ""; private string text = defaultText; private Chart Chart1 = null; [browsable(true), Category("Miscellaneous"), DefaultValue(defaultText), WebPartStorage(Storage.Personal), FriendlyName("Text"), Description("Text Property")] public string Text { get { return text; } set { text = value; } } protected override void RenderWebPart(HtmlTextWriter output) { EnsureChildControls(); //this.Chart1.RenderControl( output ); this.Chart1.RenderControl(output); output.Write(SPEncode.HtmlEncode(Text)); } protected override void CreateChildControls() { base.CreateChildControls(); Chart1 = new Chart(); // I add this line and webpart starts failing } } } Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 27, 2006 Author Report Share Posted January 27, 2006 Problem solved. I had to put my application DLL in the GAC and everything worked. "Dharmesh Trivedi" <Dharmesh.Trivedi@sanofi-aventis.com> wrote in message news:yKRxpCfIGHA.476@webserver3.softwarefx.com... > I would like to create chartFX webpart and please find the code below. > Problem is that whenever I try to put this webpart in the sharepoint portal > , I get "Web Part appears to be causing a problem" > I put chartFX.Base , ChartFX.Borders and ChartFX.Internet dlls in GAC > (C:\winnt\assembly) This is windows 2003 machine. What I am missing. Seems > like I have to do something special terms of registering but I do not know > what. Please help. > > > using System; > > using SoftwareFX.ChartFX.Internet.Server; > > using System.Web.UI; > > using System.Web.UI.WebControls; > > using System.ComponentModel; > > using System.Xml.Serialization; > > using System.Runtime.InteropServices; > > using Microsoft.SharePoint.WebPartPages; > > using Microsoft.SharePoint.WebPartPages.Communication; > > using Microsoft.SharePoint.Utilities; > > > > namespace wpTest > > { > > /// <summary> > > /// Description for WebPart1. > > /// </summary> > > [DefaultProperty("Text"), > > ToolboxData("<{0}:wpTestrunat=server></{0}:wpTest>"), > > XmlRoot(Namespace="wpTest")] > > public class wpByStatus : Microsoft.SharePoint.WebPartPages.WebPart > > { > > > private const string defaultText = ""; > > private string text = defaultText; > > private Chart Chart1 = null; > > [browsable(true), > > Category("Miscellaneous"), > > DefaultValue(defaultText), > > WebPartStorage(Storage.Personal), > > FriendlyName("Text"), > > Description("Text Property")] > > public string Text > > { > > get > > { > > return text; > > } > > set > > { > > text = value; > > } > > } > > > > protected override void RenderWebPart(HtmlTextWriter output) > > { > > EnsureChildControls(); > > //this.Chart1.RenderControl( output ); > > this.Chart1.RenderControl(output); > > output.Write(SPEncode.HtmlEncode(Text)); > > } > > protected override void CreateChildControls() > > { > > base.CreateChildControls(); > > Chart1 = new Chart(); // I add this line and webpart starts failing > > } > > } > > } > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 27, 2006 Author Report Share Posted January 27, 2006 Problem solved. I had to put my application DLL in the GAC and everything worked. "Dharmesh Trivedi" <Dharmesh.Trivedi@sanofi-aventis.com> wrote in message news:yKRxpCfIGHA.476@webserver3.softwarefx.com... > I would like to create chartFX webpart and please find the code below. > Problem is that whenever I try to put this webpart in the sharepoint portal > , I get "Web Part appears to be causing a problem" > I put chartFX.Base , ChartFX.Borders and ChartFX.Internet dlls in GAC > (C:\winnt\assembly) This is windows 2003 machine. What I am missing. Seems > like I have to do something special terms of registering but I do not know > what. Please help. > > > using System; > > using SoftwareFX.ChartFX.Internet.Server; > > using System.Web.UI; > > using System.Web.UI.WebControls; > > using System.ComponentModel; > > using System.Xml.Serialization; > > using System.Runtime.InteropServices; > > using Microsoft.SharePoint.WebPartPages; > > using Microsoft.SharePoint.WebPartPages.Communication; > > using Microsoft.SharePoint.Utilities; > > > > namespace wpTest > > { > > /// <summary> > > /// Description for WebPart1. > > /// </summary> > > [DefaultProperty("Text"), > > ToolboxData("<{0}:wpTestrunat=server></{0}:wpTest>"), > > XmlRoot(Namespace="wpTest")] > > public class wpByStatus : Microsoft.SharePoint.WebPartPages.WebPart > > { > > > private const string defaultText = ""; > > private string text = defaultText; > > private Chart Chart1 = null; > > [browsable(true), > > Category("Miscellaneous"), > > DefaultValue(defaultText), > > WebPartStorage(Storage.Personal), > > FriendlyName("Text"), > > Description("Text Property")] > > public string Text > > { > > get > > { > > return text; > > } > > set > > { > > text = value; > > } > > } > > > > protected override void RenderWebPart(HtmlTextWriter output) > > { > > EnsureChildControls(); > > //this.Chart1.RenderControl( output ); > > this.Chart1.RenderControl(output); > > output.Write(SPEncode.HtmlEncode(Text)); > > } > > protected override void CreateChildControls() > > { > > base.CreateChildControls(); > > Chart1 = new Chart(); // I add this line and webpart starts failing > > } > > } > > } > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.