ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
ASP.Net Chart Control On Shared Hosting Envronment (Parser Error) - Deployment of Chart Controls On Shared Hosting Environment Properly...
3/13/2010 7:21:00 PM
60 comments
35272 times
[This Article is for those who can manage to run Chart Control on Local Server but not on Web Server]
...
Comments
#27
Hi David_677,
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 03/22/10 21:37:24 Monday (UTC +00:00)
This article is entirely related to your problem and the solution complately sort your problem out !
#28
Also, do not forget the following refister to your page which you use As.Net Chart Control;
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 03/24/10 12:06:27 Wednesday (UTC +00:00)
<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
#35
I wish you will continue your working
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by nihan on 03/31/10 18:54:54 Wednesday (UTC +00:00)
#36
What a sweet of you
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 04/01/10 11:38:23 Thursday (UTC +00:00)
#56
Asp.Net 4.0 has came with the feature of bunch chart controls. My advice is find a hosting which supports .NET Framework 4.0 and immigrate your project from ASP.Net 3.5 to ASP.Net 4.0 !
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 05/30/10 11:00:29 Sunday (UTC +00:00)
Here is a helpful link ! http://weblogs.asp.net/scottgu/archive/2010/02/07/built-in-charting-controls-vs-2010-and-net-4-series.aspx
#60
I immigrated my project to asp.net 4.0 only to find that the difference was the same? i.e. the chart control still registers on the asp page, the only difference being the reference having changed targeting from 3.5.0.0 to 4.0.0.0. Further the web.config is auto updated in the <appSettings> and <httphandlers> sections in the same way as before. Am I doing something wrong?
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by bolsson on 06/21/10 14:04:39 Monday (UTC +00:00)
According to this guy here (see link below) I am not, it is just that MS has decided not to incorporate the chart control by default into the new framework. This due to memory concerns. http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/973be36b-2771-41d1-b2d1-0112202cf0de
#61
I immigrated my project to asp.net 4.0 only to find that the difference was the same? i.e. the chart control still registers on the asp page, the only difference being the reference having changed targeting from 3.5.0.0 to 4.0.0.0. Further the web.config is auto updated in the <appSettings> and <httphandlers> sections in the same way as before. Am I doing something wrong?
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by bolsson on 06/21/10 14:06:05 Monday (UTC +00:00)
According to this guy here (see link below) I am not, it is just that MS has decided not to incorporate the chart control by default into the new framework. This due to memory concerns. http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/973be36b-2771-41d1-b2d1-0112202cf0de
#62
I immigrated my project to asp.net 4.0 only to find that the difference was the same? i.e. the chart control still registers on the asp page, the only difference being the reference having changed targeting from 3.5.0.0 to 4.0.0.0. Further the web.config is auto updated in the <appSettings> and <httphandlers> sections in the same way as before. Am I doing something wrong?
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by bolsson on 06/21/10 14:07:26 Monday (UTC +00:00)
According to this guy here (see link below) I am not, it is just that MS has decided not to incorporate the chart control by default into the new framework. This due to memory concerns. http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/973be36b-2771-41d1-b2d1-0112202cf0de
#63
Ooops, sorry about the multiple updates, they didn't show up the first few time I updated my post. Please delete the superfluous updates this note included.
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by bolsson on 06/21/10 14:13:43 Monday (UTC +00:00)
#64
Hi bolsson,
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 06/21/10 14:16:46 Monday (UTC +00:00)
Thanks for your replies but one reply is enough I guess Here is a link for you to get a quick look at on chart control in net freamwork 4: http://www.asp.net/aspnet-4/videos/aspnet-4-quick-hit-chart-control The exact difference is here; you do not need dll files on your bin folder if you project is under the 4 version of NET. NET Freamwork 4.0 already consists the cart control as built-in. Of course if your hosting firm supports 4.0 version ! Also you will see in my previous post tha there is a link from Scott Guthrie's blog. please review this post; http://weblogs.asp.net/scottgu/archive/2010/02/07/built-in-charting-controls-vs-2010-and-net-4-series.aspx
#65
I am having troubles with a broken chart control link at my new host PowerDNN. my setup is as follows, default chart property settings on the asp page, thus the httphandler in web.config should handle the chart.
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by bolsson on 06/21/10 14:19:53 Monday (UTC +00:00)
It seems that no matter what changes i make to my web.config <appsetting> section on the host server I still get the same image link on the HTML page (see below). <img id="dnn_ctr418_ViewQuestionnaire_Chart1" src="//temp/ChartPic_000001.png?c4446b47-99ea-4dea-8bbc-d2599f46d4e3" alt="" usemap="#dnn_ctr418_ViewQuestionnaire_Chart1ImageMap" style="height:440px;width:500px;border-width:0px;"> I have no clue what is going on. On my localhost everything works fine???
#66
On your computer, I mean at t-your local host, everything works perfect because you have installed chart control into your computer before but not in your shared hosting. That's why we are doing those changes. Please be sure you did everything as above and below one especially;
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 06/21/10 14:24:05 Monday (UTC +00:00)
#67
Hi again Tugberk,
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by bolsson on 06/22/10 0:21:20 Tuesday (UTC +00:00)
Thanks a lot for your input. I already did copy the two .dll files to the bin folder. Before I did that the chart control gave an error. Now it does not give an error, just a broken image. When I examine the image and its link with the Google Developer Tools i get the info stated in the above post, i.e the image tag. And in fact when i check the temp folder at my host I find the newly created Chartpic_000001.png file. So the image is created correctly and stored in my temp folder. The image tag that the chart control generates is not correct however. My <AppSettings> section of the web.config file states: <add key="ChartImageHandler" value="storage=file;timeout=20;" /> I have tried changing the storage value to point to memory or the temp folder, but to no avail, the image tag generated is still the same, i.e. src="//temp/ChartPic_000001.png. I believe it should have been src="/temp/ChartPic_000001.png with only one slash. Why is the <httphandler> ignored. In my asp code I use default properties in my <asp:chart> tag in order to have the httphandler handle the chart generation. Is my explanation clear I wonder :-) By now my hairs are turning gray. Wondering if it could be a caching issue at my host server?
#68
bolsson, generate your chart and after that go to your source code in your brpwser. find your chart's image and its src should like that;
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 06/22/10 8:59:15 Tuesday (UTC +00:00)
src="/ChartImg.axd?i=chart_0_0.png&g=18a2dd14dae047ce87328198e37e4dcb" It is not like that in your code as far as I got from you.
#69
bolsson,
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 06/22/10 9:19:29 Tuesday (UTC +00:00)
Also please have a look at this comment of mine which is important
#70
Definately imigrate your project to asp.net 4 version if you wanna use charts in a shared hosting ! Aslo it is so easy to use it in Visual Studio 2010 !
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by coklow on 06/22/10 13:10:25 Tuesday (UTC +00:00)
#71
Hi again Tugberk,
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by bolsson on 06/22/10 15:07:33 Tuesday (UTC +00:00)
Thanks a lot for your help. As it turns out I had set the imagestoragemode property of the chart to UseImageLocation in my code behind: Chart1.ImageStorageMode = DataVisualization.Charting.ImageStorageMode.UseImageLocation and forgotten all about it. Changing the imagelocation from: Chart1.ImageLocation = Request.ApplicationPath "/temp/ChartPic_#SEQ(300,3)"
To: Chart1.ImageLocation = "~/temp/ChartPic_#SEQ(300,3)" sorted out the problem. Silliness = waste of everybodies time. Thanks for your eyes.
#72
I thought you have done that already :) It might be something like that;
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 06/22/10 15:15:02 Tuesday (UTC +00:00)
imagetype="Png" ImageLocation="~\TempImages\ChartPic_#SEQ(300,3)"
#74
Hello
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by aliasgar on 07/07/10 10:59:08 Wednesday (UTC +00:00)
I tried your way but i am still getting this error Server Error in '/' Application.
Configuration ErrorDescription: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.Parser Error Message: Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Source Error: Source File: C:\inetpub\wwwroot\qassemhamada.com\wwwroot\khcampaign\web.config Line: 58 Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3082
#75
Please help me in this as soon as possible..
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by aliasgar on 07/07/10 10:59:42 Wednesday (UTC +00:00)
#76
aliasgar,
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 07/07/10 11:07:01 Wednesday (UTC +00:00)
Please Click Here to read this review. be sure you do that already. it seems you do not !
#77
I have already added .dll files of MS chart control in my bin.
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by aliasgar on 07/07/10 11:47:41 Wednesday (UTC +00:00)
Check my web config <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> </sectionGroup> </sectionGroup> </sectionGroup> </configSections> <appSettings> <add key="ChartImageHandler" value="storage=file;timeout=20;"/> </appSettings> <connectionStrings> </connectionStrings> <!--<pages enableEventValidation="true"/> --> <system.web> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </controls> </pages> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true"> <assemblies> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Web.DynamicData, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies> </compilation> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <httpHandlers> <add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> <!--<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>--> <remove verb="*" path="*.asmx"/> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> </httpHandlers> <httpModules> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </httpModules> <!--authentication mode="Windows"/>--> <!--The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors>--> <customErrors mode="Off"> </customErrors> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules> <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </modules> <handlers> <remove name="WebServiceHandlerFactory-Integrated" /> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <remove name="ChartImageHandler"/> <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </handlers> </system.webServer> <system.net> </system.net> </configuration>
#78
the problem is wit your dll files. nothing wrong with your web.config file. be sure that the dll files were healthly passed to server.
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 07/07/10 11:55:40 Wednesday (UTC +00:00)
#79
it says this
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by aliasgar on 07/07/10 12:12:43 Wednesday (UTC +00:00)
Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
#80
sorry i have posted wrong
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by aliasgar on 07/07/10 12:14:06 Wednesday (UTC +00:00)
<assemblies> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Web.DynamicData, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies> This is in my web config
#81
That's what I say ! the problem is with your assembly. delete them on your server, an upload them again be sure that you have added the right ones into your bin folder. be through ! do not overlook anything. It still doesn't work, contact with your hosting firm.
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 07/07/10 12:19:13 Wednesday (UTC +00:00)
#82
here it is ! I figured out now;
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 07/07/10 12:23:52 Wednesday (UTC +00:00)
remove this from your assembleis; <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> I should work after that
#83
i have remove that assemblies but now it is giving me this error
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by aliasgar on 07/07/10 12:27:56 Wednesday (UTC +00:00)
Server Error in '/' Application.
Parser ErrorDescription: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.Parser Error Message: Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Source Error:
Source File: none Line: 0 Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3082
#90
Use Asp.NET 4.0 for chart control. it is so much easier
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by walter on 08/07/10 11:15:14 Saturday (UTC +00:00)
#108
Çözüm için teşekkür ederim eline sağlık. Çok faydalı oldu bu yazı. Kolay gelsin.
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Mehmet on 11/24/10 23:14:37 Wednesday (UTC +00:00)
#109
By the way I suppose that everyone who apply this solution would have some problems about permissions of chart images that needs a temparory file. Here is the solution:
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Mehmet on 11/24/10 23:24:51 Wednesday (UTC +00:00)
Chance the code line at the web.config by that: < add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\windows\temp\;"/>
#110
hi mehmet,
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 11/25/10 10:37:05 Thursday (UTC +00:00)
no problem. But consider immigrating your application from 3.5 to 4.0 You will see that chart control won't be a problem on asp.net 4.0. BTW, thanks for the patch. The problem is related to your server. the code works just fine for me on my shared hosting account.
#120
thanks for this post! you solved my problem.. :D
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by eth on 12/10/10 3:55:10 Friday (UTC +00:00)
#128
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 12/11/10 14:01:21 Saturday (UTC +00:00)
thanks for this post! you solved my problem.. :D
I'm glad it helped...
#2068
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by nihan on 02/15/11 22:29:57 Tuesday (UTC +00:00)
great article :))
#2075
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by D1 on 02/28/11 8:49:16 Monday (UTC +00:00)
u r gr8 guy, worked perfectly
#2076
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by D1 on 02/28/11 8:50:16 Monday (UTC +00:00)
u r gr8 guy, worked perfectly
#2077
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 02/28/11 11:10:39 Monday (UTC +00:00)
@D1 that's your greatness man :)
#2078
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by kamal on 03/01/11 11:30:08 Tuesday (UTC +00:00)
i got an error '
The temp directory in chart handler configuration is not accessible [D:\Hosting\7476079\html\].'can you fixed the problem ?
thanks kamal
#2079
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by Tugberk on 03/01/11 17:10:25 Tuesday (UTC +00:00)
@kamal did you check that you have write access on the directory?
#2080
re: ASP.Net Chart Control On Shared Hosting Environment, Chartimagehandler / Parser Error Problem Solution
by kamal on 03/03/11 6:25:13 Thursday (UTC +00:00)
i did give write access on the directory, and now i got another error error like below :
Server Error in '/' Application.
|
|
can you help me?
This is releated to your trust level. Please check : http://msdn.microsoft.com/en-us/library/wyts434y.aspx
but this is a tricky part. you could be vaulnerable after that.
Hi,
Thanks for this helpful post. I tried all the options mentioned here to configure the chart control to work on my shared environment. But the chart image is not displayed. I need to understand whether the ASPNET user needs explicit permission to write on the folder where the image for the chart will be stored temporarliy. Any help in this direction will be very much helpful.
TIA
Shyamal Bhowmik
@Bhowmik
please make use that your chart control has the properties as below;
imagetype="Png" ImageLocation="~\TempImages\ChartPic_#SEQ(300,3)"
and check the appSetting Key whose name ChartImageHandler and it should contain the values like below;
<add key="ChartImageHandler" value="storage=file;timeout=20;"/>
Also, the problem could releate to your hosting provider. you should try to contact them and inform about the situation if it is not working after you do everthing by the book.
Hi TugBerk,
Thanks for the quick response. I o have all those properties set on my code following your post. I would like to know if the ASPNET user on the webserver needs write permission to that TempImages folder in the application root directory to write the generated chart images? In my case it doesnot have. I wanted to make sure this is the reason for not getting the chart displayed. Please let me know.
TIA
Shyamal Bhowmik
@Bhowmik
give the write permission to temp folder for IIS_WPG and NETWORK SERVICE and try again.
hank you very much for your article.
it helped me a lot.
But after making advised changes, i got the error which says something like "asp.net needs does not have the write access... " but I couldn't grant rights as it is shared free hosting.
then i again googled and found one comment very useful in the following thread: http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/92238582-9445-4d15-a5a7-5f24fd4bf646/
thanks again for your help.
keep up the good work...
@jibran thanks. happy that it helped. please also see the 5th item on the solution list above on the post. It gives you the config changes in order not to deal with write access.
I am trying to use the microsoft Charting control on a shared server and have inserted the following:
<add key="ChartImageHandler" value="Storage=file;Timeout=20;url=~/temporary/;"/>
And in the webpage I have:
Chart1.ImageStorageMode = ImageStorageMode.UseImageLocation;
Chart1.ImageLocation = "~/temporary/ChartPic_#SEQ(300,3)";
Chart1.ImageType = ChartImageType.Png;
on the aspx page:
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
Please help as i am very stuck and getting frustrated that this doesnt work.
@Daniel
what is the error you are getting?
try to replace <add key="ChartImageHandler" value="Storage=file;Timeout=20;url=~/temporary/;"/> with <add key="ChartImageHandler" value="storage=file;timeout=20;"/>
and also replace Chart1.ImageLocation = "~/temporary/ChartPic_#SEQ(300,3)"; with Chart1.ImageLocation = "~\TempImages\ChartPic_#SEQ(300,3)";
If i replace <add key="ChartImageHandler" value="Storage=file;Timeout=20;url=~/temporary/;"/> with <add key="ChartImageHandler" value="storage=file;timeout=20;"/>
I get an error sta ting:
The temp directory in chart handler configuration is not accessible [D:\Hosting\7796030\html\]
I think because its on a shared server. Thats why i created a new folder named "temporary" with full read and write permissions and pointed the chart image location to that folder with the previous tag <add key="ChartImageHandler" value="Storage=file;Timeout=20;url=~/temporary/;"/>.
The overall problem:
The problem I am getting is that if i point the chart image location to the folder i created named "temporary", it does not produce the graph image instead it produces an empty image with only a title. I also believe I have the correct dlls in my bin folder, 'System.Web.DataVisualization.Design' and 'System.Web.DataVisualization'.
Nice job dude . . .
Thank you for making the effort and spreading this information with all of us. It was indeed very useful and informative while being straight forward and to the point.
about the charting control. Still have the same problem after following the direction on the forum. My web config wont work on godaddy server. Please help me.
When I run the page that holds my charts, a copy of the chart is saved as a png file. Obviously I can't let this keep on happening! could you point me to the code or attribute that's doing this? Incidentally you blog is great, it helped me out of a great hole.
Hi,
I'm running vs 2010 and are using the chart control. My public server runs 3.5 and hence I've trouble with the chart control..
I've follwed your guide but I get the following error message:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 34: <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 35: <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 36: <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 37: <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 38: </assemblies>
Source File: \\172.21.204.204\webvol18\np\0kqf3r1zmk1un31\andersmarcusson.com\public_html\website7\web.config Line: 36
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3634
When i remove the datavisualization line (assembly) from the web.config file and restart the web server I get the following error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'WebApplication21.WebForm1'.
Source Error:
Line 1: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication21.WebForm1" %>
Line 2:
Line 3: <%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
Source File: /website7/webform1.aspx Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3634
I'm lookign forward to your reply.
Best regards
Anders
Hi i made the changes as yo said and now i am not getting run time error but when i try to view my chart page i am being asked authentication required page??May i know why i am getting this page.I also tried to login with username and password but it couldnt login and when i click cancel iam getting this msg
You are not authorized to view this page
You do not have permission to view this directory or page using the credentials that you supplied.
Please try the following:
- Contact the Web site administrator if you believe you should be able to view this directory or page.
- Click the Refresh button to try again with different credentials.
HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.
Internet Information Services (IIS)
Technical Information (for support personnel)
- Go to Microsoft Product Support Services and perform a title search for the words HTTP and 401.
- Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Authentication, Access Control, and About Custom Error Messages.
Hi,i used .NET 4.0, and created my chart in VS 2010. i have followed all the instructions above but when i try to display my chart, i get the error:
------------------------------------------------------------
Compiler Error Message: CS0433: The type 'System.Web.UI.DataVisualization.Charting.DataPoint' 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'
Source Error:
Line 505:
Line 506: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 507: private global::System.Web.UI.DataVisualization.Charting.DataPoint @__BuildControl__control8() {
Line 508: global::System.Web.UI.DataVisualization.Charting.DataPoint @__ctrl;
----------------------------------------
please help out.
This is a very help ful tutorial, it has solved my problem. Thanks a lot for sharing such a helpful material.
Keep in Touch with Me
Tags
Archive
- May, 2013 (1)
- April, 2013 (5)
- March, 2013 (2)
- February, 2013 (3)
- January, 2013 (8)
- December, 2012 (2)
- November, 2012 (4)
- October, 2012 (7)
- September, 2012 (5)
- August, 2012 (4)
- July, 2012 (2)
- June, 2012 (3)
- May, 2012 (2)
- April, 2012 (3)
- March, 2012 (7)
- February, 2012 (6)
- January, 2012 (2)
- December, 2011 (6)
- November, 2011 (3)
- October, 2011 (4)
- September, 2011 (4)
- May, 2011 (4)
- April, 2011 (2)
- March, 2011 (3)
- February, 2011 (3)
- January, 2011 (1)
- December, 2010 (5)
- November, 2010 (3)
- October, 2010 (1)
- September, 2010 (4)
- August, 2010 (2)
- May, 2010 (3)
- April, 2010 (5)
- March, 2010 (3)





Hi everybody. I installed Cahrt control of ASP:Net and It works fine on local. I made neccessary changes on web.config but When I deploy it to my site I am getting the error ! It says as below;
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.Parser Error Message: Could not load file or assembly 'System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
Thanks in advance man !