views:

354

answers:

5

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)

+2  A: 

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.

Kevin
I know that the app will look in the GAC if it isn't found in the bin. However not all assemblies work from the .bin folder. Take Crystal Reports for example if you mark all the .dll's as copy local and don't install Crystal Reports your app is still going to error out.
runxc1 Bret Ferrier
+1  A: 

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

M. Jahedbozorgan
+3  A: 

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\;"/>
    ...
kay.herzam
thanks for the heads up
runxc1 Bret Ferrier
A: 

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

JohnK
The Control does look decent. Are there any examples using ASP.NET MVC? I don't want to use any controls built around it for .NET.
runxc1 Bret Ferrier
i've been using it with web forms, so i cannot really answer that. i'll try to use it in a new project i have with MVC, but that won't happen before 1 month...
JohnK
A: 

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.

TheWishmaster