How long until .aspx file format is no longer supported in SharePoint document libraries

EmbedTek_IT 20 Reputation points
2025-01-20T19:00:22.22+00:00

Hi,

We at EmbedTek are a lean computer manufacturing company that uses a SharePoint Document Library to manage our build instructions and, importantly, view them in a web page format.

The instructions are created as .htm files locally in Microsoft Word, renamed as .aspx, then uploaded to the SharePoint library where our assembly team can view them.

The issue we are facing is the .aspx files are now being blocked upon upload. A workaround we have found is running a PowerShell script to disable "DenyAddAndCustomizePages" as it automatically resets back to true after 24 hours. To my understanding, since November 2024, it is no longer possible to delay the automatic 24 hour reset.

How long do we have before this script workaround no longer works? Will our existing .aspx files in the library continue to be supported indefinitely?

Another workaround we found is uploading the .htm file, opening the library in explorer view, and renaming the .htm to .aspx. No idea how long 'Open with Explorer' will be around as that is on its way out as well, so this isn't a good long-term solution.

Thank you,

Brian

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,230 questions
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 49,156 Reputation points Microsoft Vendor
    2025-01-21T08:52:33.7466667+00:00

    The DenyAddAndCustomizePages setting in the SharePoint online is a policy that controls whether users can add or customize pages with custom scripts, which can include JavaScript, HTML, and other code that could potentially pose security risks.

    So, you must need to disable DenyAddAndCustomizePages when you want to upload .aspx files to the document library.

    As you mentioned in the original post, currently by designed that "DenyAddAndCustomizePages" automatically be reset back to disabled after 24 hours.

    In order to be able to upload aspx file into the document library at any time, I suggest you automate run PowerShell to disable DenyAddAndCustomizePages daily, you can use Windows Task Scheduler:

    Task scheduler is a Windows-related app, not my field of expertise, you could refer this post to configure task scheduler with SharePoint online.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.