Does the new asp:chart control need to be installed on the server or can it be used from the bin folder

StackOverflow https://stackoverflow.com/questions/807170

  •  03-07-2019
  •  | 
  •  

Question

  • I have installed the new asp:chart control on my machine and have built an app that uses it.
  • All is working well so far. Now I want to deploy my app in a hosted environment.
  • If my hosting provider doesn't have the asp:chart control installed can I get my app to work by putting the .dll in the bin folder?

    (I guess I am asking if it has to be found in the Gac)

Was it helpful?

Solution

Apart from deploying the assembly to the bin folder, you also need to configure a folder with write permission to temporarily store the chart images.

In web.config under

<appSettings>
    <add key="ChartImageHandler" value="storage=file;timeout=20;dir=D:\TEMPDUMP\;"/>
    ...

OTHER TIPS

It does not have to be in the GAC. Applications will look in the GAC if it can't find it in the bin folder.

Just put the .dll in the bin folder and it will work.

You can also take a look at OpenFlashChart, the charts look prettier

There's one more step: Before you deploy it to your server, you must create a directory to use as a temporary directory for the chart images on the server and you must write it in in web.config, like this:

<add key="ChartImageHandler" value="storage=file; timeout=20; dir=c:\tmpimg;" />

You can use any directory that you want. Don't forget to set the right permissions in this directory. Keep security aways in mind.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top