SharePoint Document Issues

Fix ASPX Files Downloading Instead of Rendering in SharePoint Online

Anum MushtaqAnum Mushtaq Oct 23, 2026 870 views

Question details

Users uploading ASPX files to SharePoint Online experience an issue where the files are downloaded to their local machine rather than opening and rendering directly in the web browser.

How to Fix ASPX Files Downloading Instead of Rendering in SharePoint Online
Product
SharePoint Online
Device & OS
not provided
Scenario
Accessing or opening uploaded ASPX web pages from a SharePoint document library.
Observed behavior
The ASPX file triggers a standard file download prompt instead of displaying its web content within the browser.
Before you start

Ensure you have SharePoint Administrator or Global Administrator privileges, as modifying custom script settings requires administrative access.

Solution 1Recommended

Enable Custom Scripts in the SharePoint Admin Center

Allowing custom scripts across your tenant resolves the rendering issue, as SharePoint blocks ASPX execution by default for security.

By default, custom scripts are blocked on modern user-created sites associated with Microsoft 365 groups. Enabling this feature globally allows ASPX pages to render properly instead of downloading.

1
Sign in as Administrator

Log in to the Microsoft 365 admin center and navigate to the SharePoint admin center.

2
Access Classic Settings

In the left navigation pane, click on 'Settings', then scroll to the bottom and select the 'Classic settings page' link.

3
Modify Custom Script Settings

Scroll down to the 'Custom Script' section on the classic settings page.

4
Allow Scripts

Select the options 'Allow users to run custom script on personal sites' and 'Allow users to run custom script on self-service created sites'.

5
Save Changes

Click 'OK' at the bottom of the page to save your new configuration.

Enable Custom Scripts in the SharePoint Admin Center
Propagation Delay: It can take up to 24 hours for custom script changes made in the admin center to propagate across your SharePoint environment.
Free Microsoft Office alternative

Enhance Your Document Workflow with WPS Office

While SharePoint handles your web pages and team sites, WPS Office provides a free, lightweight, and powerful alternative for managing all your standard office documents. Enjoy full compatibility with Microsoft Office formats without the heavy subscription fees.

  1. 1. Download and Install: Visit the official WPS website to download the free WPS Office suite and follow the quick installation prompts.
  2. 2. Open Your Documents: Launch WPS Office and directly open your existing Word, Excel, and PowerPoint files with zero formatting loss.
  3. 3. Edit and Save: Use the familiar tools to edit your documents and save them in their original Microsoft Office formats.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx).Lightweight installation with fast document rendering and editing.Free alternative with a familiar user interface for seamless migration.Easily open and edit local documents downloaded from cloud platforms like SharePoint.
microsoft office alternative - wps office

Frequently Asked Questions

Why does SharePoint block ASPX files from rendering by default?

Microsoft blocks custom scripts, including uploaded ASPX files, by default on modern SharePoint sites to enhance security and prevent malicious code from executing within the browser.

Can I host independent IIS ASPX pages in SharePoint Online?

No, SharePoint Online does not generally execute uploaded ASPX files as independent IIS pages because it lacks the standard IIS backend host environment required for complex web forms.

How long does it take for custom script settings to apply?

If changed via the SharePoint Admin Center graphical interface, it can take up to 24 hours to take effect. Using PowerShell applies the change almost immediately to the specified site.