We're getting a server configuration error on first load of our page. However, when we then refresh the page loads fine. It can be replicated by refreshing/restarting the server in IIS. First load we get the error, subsequent requests are fine.
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: Unrecognized element.
This is happening on line 2 of our web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!--Redirect selected traffic to index -->
<rule name="Index Rule" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="/index.html" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Info:
- Windows Server 2012 R2 Standard
- Microsoft .NET Framework Version:4.0.30319
- ASP.NET Version:4.6.1069.1