Hello everyone;
I was asked to put together a few graphs for a website, and it all goes smooth on both development and pre-production environments; however, when deployed to production,
all we get is a huge nothing.
Here's the web.config content (identical except for connection strings):
<configuration>
<connectionStrings>
<add name="GraphData" providerName="System.Data.SqlClient" connectionString="Data Source=prodServer;Initial Catalog=StatsData;User ID=xxxx;Password=xxx;" />
</connectionStrings>
<appSettings>
<!--
<add key="ChartImageHandler" value="storage=memory; timeout=20; deleteAfterServicing=true; privateImages=false;" />
</appSettings>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<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>
<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.5">
<assemblies>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5"/>
<pages controlRenderingCompatibilityVersion="3.5" maintainScrollPositionOnPostBack="true">
<namespaces>
<add namespace="System.Web.Optimization" />
</namespaces>
<controls>
<add tagPrefix="webopt" namespace="Microsoft.AspNet.Web.Optimization.WebForms" assembly="Microsoft.AspNet.Web.Optimization.WebForms" />
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
</pages>
<authentication mode="None" />
</system.web>
</configuration>
What am I missing?
What I have tried:
Deleted and re-deployed all related files.
Made sure all data sources are in fact available (pointed both: development and pre-production environments to the production data server, and data is properly being retrieved = graphs are rendered is said environments)
Verified that .NET Framework 4.0 is installed in the production server.
Changed ChartImageHandler's storage type (as seen in above code) from File to Memeroy, but has same result, everything renders in dev and pre-prod, but not in PROD.
Note that when inspecting the network traffic, the target page load all resources(200-OK code on every one) including graph images. I can only guess by the size, that they are empty.
Here are the response headers for Dev/Pre-Prod and Prod respectively:
Dev/Pre-Prod
Cache-Control: private
Content-Length: 15387
Content-Type: image/png
Date: Tue, 12 Jun 2018 17:36:20 GMT
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Prod
Cache-Control: private
Content-Length: 4866
Content-Type: image/png
Date: Tue, 12 Jun 2018 17:38:21 GMT
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Each and every suggestion is welcome. Thanks in advance!