Forum Discussion
euank
Jan 09, 2024Copper Contributor
Ongoing support for .aspx pages launched from document libraries
I have several solutions built on SharePoint Online, where we take advantage of a behavior of SharePoint whereby if an .aspx file is hosted in a document library, users navigating to that file will have the .aspx file open in the browser as though it was hosted from the site, in a full-screen mode.
My question is, is this behavior supported? If so, will it continue to be supported?
- This behavior enables me to develop SPA applications that interact with the host web (e.g. using Javascript calls to SPOL APIs) and make them available to users from document libraries.
- I'm not sure if this behavior is actually documented - is it part of "custom script"ing?
- Over the past couple of years I've noticed cases where newer site collections do not support this behavior, and I appear not to be able to enable scripting to make it work. In these cases, the .aspx file simply downloads from the browser, when a user navigates to it.
5 Replies
Sort By
- Sudharsan KSteel Contributor
Hi euank
The approach of storing the .aspx file directly in the library is not recommended by Microsoft. Using this approach will cause more security issues and whoever has permission can download or modify the file. The best practice is to use the SharePoint Framework(SPFx) development model which is more secure and you can implement a lot of features without any restrictions. You can get the full details on the link below.
- euankCopper Contributor
Sudharsan K Thanks so much for taking the time to respond!
I appreciate your guidance: I'm definitely aware of the security considerations, and of SpFx, and indeed the context for my question is essentially, how long do we have to progressively migrate the current apps to SpFx (or other supported scenario) - e.g. is it possible to know when this 'feature'/capability will cease to work?
Do you have a reference for "The approach of storing the .aspx file directly in the library is not recommended by Microsoft."? Is there an explicit statement from MSFT somewhere about this?
- jivetolkeinCopper ContributorWould also appreciate some clarity on this!