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

给你一囗甜甜゛ 提交于 2019-12-07 17:48:52

问题


  • 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)


回答1:


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\;"/>
    ...



回答2:


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.




回答3:


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




回答4:


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




回答5:


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.



来源:https://stackoverflow.com/questions/807170/does-the-new-aspchart-control-need-to-be-installed-on-the-server-or-can-it-be-u

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!