Hi All,
I am working on SharePoint online and facing some issue on .aspx access instead getting downloaded.
I have enabled custom scripting then it's working fine however we have to enable custom script in every 24 hrs.
Thank You
Hi All,
I am working on SharePoint online and facing some issue on .aspx access instead getting downloaded.
I have enabled custom scripting then it's working fine however we have to enable custom script in every 24 hrs.
Thank You
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tuhin PaulRank #7 · 71.9K reputationPosted Oct 24, 2024, 11:18 AM EDT
The issue you're facing is due to SharePoint Online's security restrictions. When you access an .aspx page, it's being downloaded instead of rendered. Enabling custom scripting resolves this temporarily, but you need a more permanent solution.
Instead of enabling custom scripting every 24 hours, you can request your SharePoint administrator to enable it permanently. This requires:
SharePoint Administrator privileges
Running the PowerShell command:
Set-SPOsite -DenyAddAndCustomizePages $false Anupam MaitiRank #295 · 8.5K reputationPosted Oct 24, 2024, 12:39 PM EDT
Set-SPOSite -Identity -DenyAddAndCustomizePages 0 This will allow
.aspxpages to render as expected, and custom scripting will stay enabled across sessions.