Hi all
I am migrating an existing asp.net website to asp.net framework version 4.7 and IIS version 8.5.
I cannot resolve a web.config file issue in the new system (it is a Plesk) without deleting desired handlers and modules. These handlers and modules are associated with asp.net charting and with Elmah error reporting.
The handlers and modules are included in two areas of web.config, <system.webServer> and <system.web>.
The code in web.config that I am forced to remove is:
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<add name="Elmah.ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler"/>
<add name="Elmah.ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler"/>
</modules>
<handlers>
<remove name="ChartImageHandler" />
<add name="Elmah" path="Elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode"/>
<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>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
and
<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>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
</httpModules>
</system.web>
I cannot identify what is wrong. The above code is working fine in the older environment.
The log file on Plesk gives a 500 - Internal server error.
Even just adding
<modules> </modules>
<handlers> </handlers>
tags under <system.webServer> resulted in a 500 internal server error.
Any assistance would be very much appreciated. I am at my wits end!
Kind regards...Alan