I created a document library, and put my aspx files into it. The files are working fine till last Friday.

From last Friday, after I made changes and re-attached the file, instead of opening the file from browser, it downloads the file when clicking on it. And if I copied the URL and pasted it into the address box, it says "Sorry, something went wrong. File was not found".

2 Answers 2


Whether the aspx files are SharePoint pages? Per my test, after download, edit the aspx file and reupload the file, the aspx file is broken.

If we want to customize a SharePoint page, we can use using SharePoint Designer to achieve it.

Open SharePoint site in SharePoint Designer, click All Files in the left panel, click relevant document library and aspx file, right click Edit file in Advanced mode.


Disable parameter setting "DenyAddAndCustomizePages".

Here's the PowerShell code to do so:

Set-SPOsite https://xxx.sharepoint.com/sites/teamxyz -DenyAddAndCustomizePages 0

Then upload the .ASPX file as Site Owner to the document library. It won't work if you just have "Member" permissions to the site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.