Error Message "Configuration file is not well-formed XML" with IIS 7

Document ID : KB000050979
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Environment

IIS 7.0 64bit in classic mode on Windows 2008 64bit

Web Agent 6SP5 CR35

When finalizing the install and starting the IIS default web site, you could get the following error message:

  ---------------------------  Authorization Rules  ---------------------------  There was an error while performing this operation.    Details:  Filename: \\?\C:\inetpub\wwwroot\web.config  Line number: 2  Error: Configuration file is not well-formed XML

The new web.config file (after installation of the IIS WA), looks like this:

<add name="handler-wa" path="*" verb="*" modules="IsapiModule" scriptProcessor="D:\CA\webagent\bin\ISAPI6WebAgent.dll" resourceType="Unspecified" requireAccess="None" />  <?xml version="1.0" encoding="UTF-8"?>  <configuration>  <system.webServer>  <handlers accessPolicy="Read, Execute, Script" />  </system.webServer></configuration>

Solution:

The first line <add name="handler-wa"...> of the newly created Web.Config should be located within the <handlers> tags.

So it should look like:

<?xml version="1.0" encoding="UTF-8"?>  <configuration>  <system.webServer><handlers accessPolicy="Read, Execute, Script">  <add name="handler-wa" path="*" verb="*" modules="IsapiModule" scriptProcessor="D:\CA\webagent\bin\ISAPI6WebAgent.dll"       resourceType="Unspecified" requireAccess="None" />  </handlers>  </system.webServer></configuration>

Please modify the web.config file to have it this way.