Browser Displays ASPX Code or Attempts to Download a File
When running an ASP.NET web page, the browser will display .aspx source code or will attempt to download the .aspx file. This issue has been reported when using the ASP.NET Web Server Control or the ASP Barcode Server Component for IIS.
After installing the Microsoft .NET Framework Software Development Kit (SDK) or Visual Studio .NET, Microsoft Internet Information Service (IIS) mappings are created to associate the new file extensions and settings for ASP.NET. If IIS is not installed when the SDK or Visual Studio Setup is run, or uninstalling and reinstalling IIS after the SDK or Visual Studio Setup was run, those settings will not be in place. Unexpected behavior can be experienced when trying to view ASP.NET pages because IIS does not have the correct mapping for the ASPX file extension.
To repair IIS mappings for ASP.NET, run the Aspnet_regiis.exe utility and then register the Aspnet_isapi.dll.
For more information, refer to Q306005.