There are many reasons that can cause this error. For example, if the ASPX file is being loaded by the browser as XML, tells that IIS is not correctly serving ASP.NET pages.
The most common problems are that ASP.NET is not installed, the application is not in an application root, the incorrect version of the framework is being used or that ASP.NET is not registered in IIS.
Try the following resolution:
- Install correct ASP.NET framework
- Register .NET framework - Run
aspnet_regiis.exe -i
- Configure the folder or virtual directory as an application in IIS
- Configure correct version of framework in the ASP.NET tab in IIS.
Try!