0

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
T Mitchell
  • 1,017
  • 7
  • 12
  • http://stackoverflow.com/questions/9280803/element-system-webserver-has-invalid-child-element-rewrite-should-i-fix-thi – Zam Nov 14 '16 at 16:18
  • Unfortunately that issue is slightly different. We're having troubles in the browser, not in our IDE – T Mitchell Nov 15 '16 at 15:39

0 Answers0