1. About error:
The Type 'System. web. UI. datavisualization. charting. chart 'exists' in both 'C: \ windows \ Assembly \ gac_msil \ system. web. datavisualization \ 3.5.0.0 _ 31bf3856ad364e35 \ system. web. datavisualization. dll 'and 'C: \ windows \ Microsoft. net \ Assembly \ gac_msil \ system. web. datavisualization \ v4.0 _ 4.0.0.0 _ 31bf3856ad364e35 \ system. web. datavisualization. DLL
To resolve the problem, change all the 3.5.0.0 to 4.0.0.0 in webconfig.
2. can't show image, maybe you drag the chart control into page in 'source' model. aspx, change it to 'design' model, the webconfig will add node like below automatic.
<System. webserver>
<Handlers>
<Remove name = "chartimagehandler"/>
<Add name = "chartimagehandler" precondition = "integratedmode" verb = "Get, Head, Post"
Path = "chartimg. axd "type =" system. web. UI. datavisualization. charting. charthttphandler, system. web. datavisualization, version = 4.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
</Handlers>
</System. webserver>
<Deleetask>
<Add key = "chartimagehandler" value = "Storage = file; timeout = 20; Dir = c: \ tempimagefiles \;"/>
</Appsettings>
Of course, you can also add it manual.
3. No permission for access tempimage folder.
If you use MS chart control on share hosting, normally, you don't have any permission outside your folder. at this time you need to remove all the folder setting regarding chart control, include 2 place:
A. webconfig: "/>
<Add key = "chartimagehandler" value = "Storage = file; timeout = 20;Dir = c: \ tempimagefiles \;
B. The page which is using chart control:
<Asp: Chart id = "chart1" runat = "server" palette = "brightpastel" backcolor = "# f3dfc1"
Imagetype = "PNG"
Imagelocation = "C:/tempimagefiles/chartpic _ # seq )" Width = "800px"
Height = "500px" borderdashstyle = "solid" backgradientstyle = "topbottom" borderwidth = "2"
Bordercolor = "181, 64, 1">