Jump to content
Software FX Community

Security issues using charts in a WPF Browser Application (XBAP)


Recommended Posts

XBAPs are deployed using ClickOnce and default to run in a sandbox, because of this you might encounter certain problems when trying to use Chart FX for WPF in them.

Running in full trust will take care of all the Chart FX related issues so if you already needed full trust in your application then integrating charts should not be an issue, please note that you should make sure not only that you can run the application in your local machine but also that it can be run from other machines. A full trust XBAP will run fine when deployed from the local zone but needs to be signed when deploying from the web. You can read more about this here and here.

If running in full trust is not an option and you try to use our chart control you will receive a Security exception related to Reflection, we have fixed this issue in build 3467, unfortunately even if you use a newer build you will then receive another security exception when parsing our default XAML, the reason for this is that we use BitmapEffects in our some of our templates including Glass which is our default.

Note that even though we expose a property called UseEffects that allow you to hide these effects, setting this property to false will not fix the exception as the effects are still in the XAML although they will be not be applied and just trying to load the XAML causes the exception.

To overcome this problem you must change the references in your application to use the ChartFX.XBAP.* assemblies, these assemblies do not contain any bitmap effects so you can still use our default Glass style, because we use the same namespaces and type names, there is no need to change any code but you must also change the reference in licenses.licx

To summarize if you are building WPF browser applications you must use ChartFX.XBAP build 3467 or later in order to work in low-trust using the Internet or Intranet zones.

Posted Image

JuanC

Link to post
Share on other sites
×
×
  • Create New...