Hi,
My context: WebPart development in WSS 3.0 (SharePoint)
Scenario 1: get the "Assembly does not allow partially trusted callers" error I 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