fkeller Posted December 3, 2007 Report Share Posted December 3, 2007 Hi, My context: WebPart development in WSS 3.0 (SharePoint) Scenario 1: get the "Assembly does not allow partially trusted callers" errorI get the following error when adding the ChaftFX assemblies to the bin directory: "Assembly does not allow partially trusted callers".I have registered as SafeControls all the assemblies with all namespaces in the web.config.------------------------------------------------------------------<SafeControl Assembly="ChartFX.WebForms, Version=7.0.2845.31164, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms" TypeName="Chart" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms, Version=7.0.2845.31164, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.DataProviders" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms, Version=7.0.2845.31164, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Galleries" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms, Version=7.0.2845.31164, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Internal" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms, Version=7.0.2845.31164, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Internal.Highlight" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms, Version=7.0.2845.31164, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Internal.Pss" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms.Base, Version=7.0.2845.31033, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms.Base, Version=7.0.2845.31033, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Adornments" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms.Base, Version=7.0.2845.31033, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Internal" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms.Base, Version=7.0.2845.31033, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Internal.Pss" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms.Dhtml, Version=7.0.2845.31087, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Dhtml" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms.Adornments, Version=7.0.2845.31057, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Adornments" TypeName="*" Safe="True" /> <SafeControl Assembly="ChartFX.WebForms.Adornments, Version=7.0.2845.31057, Culture=Neutral, PublicKeyToken=a1878e2052c08dce" Namespace="ChartFX.WebForms.Internal" TypeName="*" Safe="True" />------------------------------------------------------------------ But no success...exception raised. Scenario 2: "file not found" in SharePoint.I tried then to add the assemblies to the GAC instead. Now I don't get the previous error (..partially trusted callers..) and the webpart does not throw any execption, but I get a "File not found" in SharePoint... SharePoint is looking in the bin dir for the assemblies. Just to give a try I mixed both scenarios and it works...??!! Seems that SharePoint check the security with the assemblies in the GAC and then wants to load them only from the bin directory. But having the assemblies in both, GAC & bin, is not a solution. How can I configure SharePoint to use either scenario 1 or scenario 2?I want to allow partially trusted callers to the ChartFX assemblies, so I can have them in the bin directory. Can I do that? Thank you for your support Frederic Keller Quote Link to comment Share on other sites More sharing options...
fkeller Posted December 3, 2007 Author Report Share Posted December 3, 2007 Precisions regarding Scenario 2. The Chart is correctly added to the WebPart Child Controls.-------------------------------------protected override void CreateChildControls(){ base.CreateChildControls(); ChartFX.WebForms.Chart myChart = new ChartFX.WebForms.Chart(); this.Controls.Add(myChart); }-------------------------------------But to make the chart rendered in my SharePoint Page with the WebPart containing the chart I need to add the assemblies to the bin directory in addition to the GAC....??!! Quote Link to comment Share on other sites More sharing options...
fkeller Posted December 12, 2007 Author Report Share Posted December 12, 2007 Any clue why this behavior? Thank youFrederic Quote Link to comment Share on other sites More sharing options...
TomasT Posted December 13, 2007 Report Share Posted December 13, 2007 Frederic, The ChartFX dlls should not be added to the GAC. Instead, please place them in the bin directory of your Sharepoint website. Attached to this post, you will find a PDF document providind step by step instruction on how to get ChartFX to run in Sharepoint. Please follow the steps and pay particular attention to steps 2 and 3 of the second part of the document ( Sharpeoint Configuration). If you have any questions or continue to run into issues, please let us know. TomasT Quote Link to comment Share on other sites More sharing options...
fkeller Posted December 14, 2007 Author Report Share Posted December 14, 2007 Thanks for the document. I was missing the trust level set to Full... Some errors in the document:page 4: Change CfxInteractive to ActiveChartWPpage 4: it says <trust level="full" originurl=""> but must be <trust level="Full" originurl=""> (capital F) Frederic Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.