1

If I upload an ASPX file to the documents library in a regular SharePoint site, it renders properly when a user clicks on the file.

If I do the same for an ASPX file uploaded to the documents library in a SharePoint site that backs an Office 365 Group, the ASPX file is not rendered, but downloaded instead. Is there any way to get SharePoint to render ASPX files?

Additional information:

  • Setting the "Default open behavior for browser-enabled documents" in the advanced library settings to "open in the browser" does not help.
  • A SharePoint site behind an Office 365 group has a Pages library that obviously allows ASPX files. I am unable to upload to that library via the browser, but I suspect I could do this via code. I wonder if there is some specific setting on the document library that turns on this behavior. If so, I couldn't find it.
  • I am aware of permissive file handling and that the default value for this does not allow rendering of HTML files. However, this does not appear to affect ASPX files. Interestingly, I am now unable to perform a set-spotenant -PermissiveBrowserFileHandlingOverride $true in my test tenant. I get back a message indicating that "Permissive browser file handling setting is deprecated and can't be enabled."
0

AS i remember, this is only possible through ghost pages in the SP Farm on Prem, as ghost pages are not available on SP 365 i think this is not possible anymore

  • It works in O365 if the site is not within an Office 365 group. – Kirk Liemohn Mar 16 '18 at 19:38
0

Custom scripts are likely disabled on the group site. By default, scripts are not enabled on sites that are created by non administrators (groups are generally considered self service sites). One of the side effects on having this feature enabled is the inability to upload files like .aspx. The tenant admin can disable this using the SharePoint Online PowerShell.

Set-SPOSite <url> -DenyAddAndCustomizePages 0

Allow or prevent custom scripts article

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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