This document already has a 'DocumentElement' node exception.
|Product||Progress® Telerik® Reporting|
|Report Viewer||ASP.NET WebForms Report Viewer|
This article relates to the Legacy ASPNET Report Viewer.
Visual Studio throws the exception when adding a ReportViewer control to an .aspx page.
The ReportViewer control failed to setup the http handler in the web.config file. You may experience troubles when viewing the report. Exception details: This document already has a 'DocumentElement' node.
This happens when a default namespace is added to the root <configuration> element of the web.config file.
This doesn’t cause any runtime problems, but in case you try to alter the web.config like we do, it would throw the exception.
To avoid the error, delete the xmlns reference and have the root configuration element look like the following:
Also, restart Visual Studio. Once you start it back up, we would successfully alter the web.config adding our http handlers for the ReportViewer with no errors.
Another "side-effect" of having default namespace is missing intellisense for the web.config file.