We have migrated our web sites from Windows Server 2008 SP2 to Windows Server 2016. In addition to a Classic ASP site that has no problem, there is one ASP.NET site created with Umbraco, and one other ASP.NET site.
There is one staging server, and two future production servers with a load balancer. On the staging server everything works fine. The first production server was also fine until yesterday.
I do not know what is different on the second production server, but after we moved everything there, each of the ASP.NET sites did not open with similar errors.
The error on the non-Umbraco site is this:
Server Error in '/BLAHBLAH' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'Umbraco.Forms.CodeFirst' or one of its dependencies. The system cannot find the file specified. (C:\inetpub\wwwroot\web.config line 15)
Source Error:
Line 13: <system.web>
Line 14: <httpModules>
Line 15: <add name="ContourFormBuilderHttpModule" type="Umbraco.Forms.CodeFirst.ContourFormBuilderHttpModule, Umbraco.Forms.CodeFirst" />
Line 16: </httpModules>
Line 17: </system.web>
Source File: C:\inetpub\wwwroot\web.config Line: 15
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Reminding that this application does not use any Umbraco modules.
The error in the Umbraco application is similar, it comes from the configuration file of the application itself, and says that it cannot add a duplicate reference to the module collection. There are indeed a number of Umbraco modules referenced in the web.config
file of the Umbraco application, and ContourFormBuilderHttpModule is one of them.
This section is not present in the root web.config file on the staging server, and it was not there on the 1st production server. However, yesterday I found the problem section on the 1st server, and the error too.
Actually, there are 2 references to the same module, one in the <System.WebServer> part, and another in the <System.Web>. I tried deleting or commenting out the problem sections from the root web.config file, or removing them using configuration editor.
This fixes the error for a moment, but then the comment signs are gone, or the sections re-appear, and the error is back.
Here is the bottom of our root web.config file on the problem server, with comment signs that fix the problem for a short period:
<modules>
<!-- <add name="ContourFormBuilderHttpModule" type="Umbraco.Forms.CodeFirst.ContourFormBuilderHttpModule, Umbraco.Forms.CodeFirst" /> -->
</modules>
</system.webServer>
<system.web>
<httpModules>
<!-- <add name="ContourFormBuilderHttpModule" type="Umbraco.Forms.CodeFirst.ContourFormBuilderHttpModule, Umbraco.Forms.CodeFirst" /> -->
</httpModules>
</system.web>
</configuration>
Please help! Why is this section there to begin with, and why does it keep returning?