Forum Discussion
Ashley_Nicholson
Jul 18, 2024Copper Contributor
Custom ASPX files are downloading, not running.
Hi All, I have some custom ASPX files on a SharePoint site. When you click on them, they run a html file (saved as ASPX). However, if I create a new file in the same vein, when a user clicks on i...
rogerval
Dec 05, 2025MCT
If new ASPX files download instead of executing, it usually means SharePoint Online is not treating the file as a server-rendered page. This can happen when the file is created outside SharePoint Designer or when the library has custom scripting disabled.
Key things to check:
- Ensure the site allows custom script. In modern tenants, custom scripting is disabled by default, so newly uploaded or created ASPX files are served as downloads instead of being executed.
- Files already present before custom script was disabled will continue to run, which explains why older ASPX files still work but newly created ones do not.
- Verify that the library is not in a restricted mode such as a library requiring “No script” settings.
Enabling custom script at the tenant or site level restores normal behavior, and newly created ASPX files will run instead of downloading.