RE: NopCommerce VERSION 1.9 on dot.NET 4.0 enabled servers W/ Chart errors for Customer Report and Sales Report due to Chart Control path, Get, Post errors.
This post is aimed at the most efficient fix to the problem with the mimimal security and server impact.
Giving WRITE permissions to the ROOT is not a valid solution EVER! It violates standard security recommendations and could allow someone to do things that are Bad "umkay".....
Changing the storage=memory IS NOT THE THING TO DO in clustered Hosting (shared). Unless you own the box and know what is in memory and how much memory is available, you can cause serious problems in doing that! You could even lose your hosting account! Hosters do not like people writing to places outside of the hosted folder itself!
THE FIX: Create a folder WebCharts at the root (the same place your web.config file resides), and modify the ChartImageHandler in web.config to read like this:
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=D:\Hosting\0000000\html\WebCharts\;"/>
WHERE
the dir= is the absolute hosting path (REMOTE) and the 0000000 is your customer ID (if on GoDaddy). If testing on a local box this would of course be the valid Local path (don't forget to modify to the remote path before uploading hte changes.
If you are on GoDaddy the absolute path is listed in the Hosting Control Panel (of course you must add the "\WebCharts\" to the end of that path). If hosted but not on GoDaddy you must get the absolute path from your hoster.
Using the IIS manager if provided, or FTP "File Manager" in the Content section OR your other admin tool for your hosting provider, set to allow read and write to the WebCharts folder (remote).
Hit the remote site and run the repor that failed. If your changes do not appear to fix the error immediately after doing the previous steps, you may have to "Touch" the web.config file manually again (for either local and remote) BEFORE YOU MODIFY OTHER SETTINGS and mess stuff up that didn't need to be changed.
Open a valid copy web config "local" and add a space on any line, save and then delete the space and save again. This sets the last modified date to current. Then upload the web.config local copy to the hosted server as the last step. FYI: if you have ever made changes to any files other than web.config and the changes don't seem to apply right away, this could be the reason. dot.NET does not do a recompile on the server unless the app expires, or the web.config file is modified or the app pool recycled. Since NopCommerce stays alive due to your browser connection and of course timeout, the code changes WILL NOT APPLY until you modify the web.config and upload the "newer" version. You can of course recycle the app pool using the admin tools for your hoster if that is an easier option and you see the changes have worked. If they do not appear to have worked, MANUALLY modifying and uploading a more recent web.config it will always work as it is part of dot.net's process to see if a more recent config is there before FORCING a re-compile. Trust me on this, it is forced! You will want to remember this for the future as it is not an uncommon problem. dot.NET compiled on a busy server does not re-compile until this change occurs. I know, you are thinking "but I am the only one on the server"! Web Spiders and Search engines can hit your public site at any moment. Nothing is more flashy than the Google site serving up the cached errors on your site until they refresh because you blew up the site with a bad modification to web.config.
Using the 1.9 NopCommerce install, all other required setting were present in the web config. It is not an error in NopCommerce that causes this, it is changes from dot.NET 3.5 to v 4.0. There is more information on the ChartImageHandler setting and usage at:
http://blogs.msdn.com/b/deliant/archive/2008/12/02/managing-chart-generated-images-with-chart-image-handler.aspx <<explains the storage, dir, timeout, URL, and deleteAfterServicing which is True by default.
You should not need to manually add the dll to your bin if on dot.NET 4.0 as it is included in the servers folder you cannot access.
Hope this helps!
BClink MCP, MRP etc and so on.......