When you access an ASP.NET page in your browser, you may get an XML Parsing Error that says that the XML is not well formed. The error message also displays the page directive statement present in the 1st line of the .aspx file. First we will fix this error, then we will look at one possible reason why you may be getting this error in ASP.NET.
Click Start > Run, and type the following command depending on which ASP.NET framework is in use by the default web site in your IIS.
You should see a command window that is displayed briefly, that shows that ASP.NET is being installed. After the registration is successful, the window will be closed.
Now refresh the .aspx page that you got the XML Parser error for in the browser and your page should be rendered correctly.
I have seen this error happen to me in situations where I had installed IIS after the installing the .Net Framework. This make sense. If you install IIS after you install the .Net Framework, then the framework is not registered with IIS. So when a request for a .aspx page comes to IIS, it simply passes on the contents of the page as-is without processing it. So in effect, the browser receives the entire .aspx page’s code, tried to parse it as an XML file, encounters the parsing error at the second character in the page directive and stops.
Related: ASP.NET IIS Registration Tool