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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tuhin PaulPosted Oct 24, 2024, 3:18 PM
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 MaitiPosted Oct 24, 2024, 4:39 PM
Set-SPOSite -Identity -DenyAddAndCustomizePages 0 This will allow
.aspxpages to render as expected, and custom scripting will stay enabled across sessions.