locked
Charting configuration problem in web.config file RRS feed

  • Question

  • User-1677466693 posted

    well I used chart in my project its working fine on localhost ...

    when I add refrence and dll file of System.Web.DataVisualization then many tags open in web,config file please check  it till below

    <?xml version="1.0"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit  http://go.microsoft.com/fwlink/?LinkId=169433  -->
    <configuration>
    
    
      <appSettings>
        <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
      </appSettings>
      <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>
      
      
      
      
      
      
      
      
      
      
      
      <connectionStrings>
    
    
        <add name="AuzineConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Auzine;User ID=sass;Password=abc;" providerName="System.Data.SqlClient"/>
        
        
        
      </connectionStrings>
      
      
      <system.web>
       
        <httpHandlers>
          <add 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"
            validate="false" />
        </httpHandlers>
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <!--the Below Line is unknow and added automatically ...I do not know-->
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          </assemblies>
        </compilation>
       
    
    
        <pages>
          <controls>
            <add tagPrefix="CKEditor" assembly="CKEditor.NET" namespace="CKEditor.NET"/>
        
        <!--below is used for asyncfileupload-->
            <add assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagPrefix="Syed"/>
        
    
    
    
            <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
                assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          </controls>
        </pages>
    
      
        <customErrors mode="Off"/>
    
      </system.web>
    </configuration>
    

    but when I was hosting it on server then one tag creating problem , when remove this tag then working fine but when I insert this tag then it gives error and website not loading

    in browser

     the tag is creating error on webserver is below

     <httpHandlers>
          <add 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"
            validate="false" />
        </httpHandlers>

    why ...? what is the imporance of this line can anyone tell me the solution of this....

    and one more thing ... how to locate  the folder in http in this tag

    <appSettings>
        <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
      </appSettings>

    I have tried but it gives error

    Invalid temp images directory in chart handler configuration

    Please edit the web.config file. The CharImageHandler key, Dir value must point to a valid directory. The directory is required for temporary image storage when storage mode equals file system.

    Monday, February 3, 2014 4:01 PM

Answers

  • User-933407369 posted

    hi AZY.eng,

    here are the steps which you can try ,  you would get it working:

    1. Add the following to appSettings in your web.config

      <add key="ChartImageHandler" value="Storage=file;Timeout=20;Url=~/tempImages/;"/>

    2. Make sure the following is in system.web/assemblies :

      <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    3. Make sure the following is in system.web/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"/>

    4. Make sure the following is in system.webServer/handlers <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"/>

    please check out the links for details:

    asp.net:Invalid temp directory in chart handler configuration [c:\TempImageFiles\]

    Handling chart generated images using Chart Http Handler

    http://blogs.msdn.com/b/deliant/archive/2008/12/02/managing-chart-generated-images-with-chart-image-handler.aspx

    Hope it helps you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 12, 2014 3:02 AM

All replies

  • Monday, February 3, 2014 10:59 PM
  • User-1677466693 posted

    Sir I followed the link but it gives

    this error

    The temp directory in chart handler configuration is not accessible [C:\Inetpub\vhosts\

    Tuesday, February 4, 2014 8:50 AM
  • User-933407369 posted

    hi AZY.eng,

    here are the steps which you can try ,  you would get it working:

    1. Add the following to appSettings in your web.config

      <add key="ChartImageHandler" value="Storage=file;Timeout=20;Url=~/tempImages/;"/>

    2. Make sure the following is in system.web/assemblies :

      <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    3. Make sure the following is in system.web/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"/>

    4. Make sure the following is in system.webServer/handlers <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"/>

    please check out the links for details:

    asp.net:Invalid temp directory in chart handler configuration [c:\TempImageFiles\]

    Handling chart generated images using Chart Http Handler

    http://blogs.msdn.com/b/deliant/archive/2008/12/02/managing-chart-generated-images-with-chart-image-handler.aspx

    Hope it helps you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 12, 2014 3:02 AM