Help need on POST and GET errors V1.8

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
haydie wrote:
very possibly a permission error - the chart control temorarily writes the chart image to the root directory by default

try granting NETWORK SERVICE write permissions to the  application root


find out how I know this https://www.nopcommerce.com/boards/t/6425/salescustomer-report-throwing-error-on-hosted-server.aspx


I have write access set on the root directory but this still doesn't work

I get this error when running customerreports.aspx:
No http handler was found for request type 'GET'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: No http handler was found for request type 'GET'

Source Error:


Line 275:    <ajaxToolkit:TabPanel runat="server" ID="pnlByLanguage" HeaderText="<% $NopResources:Admin.CustomerReports.ByLanguage.Title %>">
Line 276:        <ContentTemplate>
Line 277:             <%=GetLocaleResourceString("Admin.CustomerReports.ByLanguage.Tooltip")%>
Line 278:             <br />
Line 279:             <br />


And this error when running salesreport.aspx
No http handler was found for request type 'POST'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: No http handler was found for request type 'POST'

Source Error:


Line 8:      <div class="title">
Line 9:          <img src="Common/ico-sales.png" alt="<%=GetLocaleResourceString("Admin.SalesReport.Title")%>" />
Line 10:         <%=GetLocaleResourceString("Admin.SalesReport.Title")%>
Line 11:     </div>
Line 12:     <div class="options">
13 years ago
OK I think I've fixed it ... in the web.config under <system.webserver> replace the <handlers> section with the following:

<handlers accessPolicy="Read, Write, Script, Execute">
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="ScriptHandlerFactory" />
      <remove name="ScriptHandlerFactoryAppServices" />
      <remove name="ScriptResource" />
      <remove name="ChartImageHandler" />
      <add name="WebServiceHandlerFactory-Integrated" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD,POST" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </handlers>

That should do it let me know how you get on
13 years ago
Well in response to my own post it seems to run the page ok now but the chart control doesn't seem to generate an image ... getting closer though
13 years ago
I found out, for me, on a Win 2008 Host, I had to add the following lines to the system.webServer section of the web.config to make it work.


    <handlers>
      <add name="Chart" path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>


I copied and pasted it from the httpHandlers section and made some minor modifications.
13 years ago
Adding that info to the web.config fixed it for me as well! Thank you for figuring that one out, it had me stumped.
By the way you DO NOT have to change the permissions on the root folder for this to work, at least in my case. ;o)
13 years ago
Hi guys,

Its not working for me. =/

I have this piece of code in my appSettings:

<add key="ChartImageHandler" value="storage=file;timeout=20;" />


...and this is what I have in my handlers:

<add name="Chart" path="ChartImg.axd" verb="GET,HEAD,POST" 
type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.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=4.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />

<add name="Foo" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />

<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" />

<add name="PricelistHandler" verb="*" path="pricelist.csv" preCondition="integratedMode"
type="NopSolutions.NopCommerce.BusinessLogic.ExportImport.PricelistHandler, Nop.BusinessLogic"/>


Any idea?
13 years ago
thelyrist wrote:
I found out, for me, on a Win 2008 Host, I had to add the following lines to the system.webServer section of the web.config to make it work.


    <handlers>
      <add name="Chart" path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>


I copied and pasted it from the httpHandlers section and made some minor modifications.



Above modification in the web.config file seems to have fixed the issue for me as well. Didn't have to change permissions.
13 years ago
thelyrist wrote:
I found out, for me, on a Win 2008 Host, I had to add the following lines to the system.webServer section of the web.config to make it work.


    <handlers>
      <add name="Chart" path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>


I copied and pasted it from the httpHandlers section and made some minor modifications.


Worked perfect. Thanks
13 years ago
I had the same error as the debug dump and after a bunch of struggles, found this article:

http://www.eggheadcafe.com/community/aspnet/51/10215981/aspnet-40-iis-hosting-problem.aspx
Specifically the first response.  My site is hosted in integrated mode which apparently requires the httpModules to be registered in the web.config under system.webServer instead of system.web.  

I pasted the following lines immediately after the <modules> section in <system.webServer>:

    <handlers>
        <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" />
       <add name="PricelistHandler" verb="*" path="pricelist.csv" preCondition="integratedMode" type="NopSolutions.NopCommerce.BusinessLogic.ExportImport.PricelistHandler, Nop.BusinessLogic"/>
    </handlers>

And it worked!  (I left the handlers section untouched in <system.web>).  Probably need the permission fixes too, but the handler for the charting wasn't even picked up.  I think VS10 fixed this for me on my local machine but I started from a fresh image on the hosted server.
12 years ago
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.......
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.