Posted in : Microsoft, Office 365, Uncategorized By Anton Korner Translate with Google ⟶
1 year ago
According to Microsoft, the issue regarding open the .aspx sites from the SharePoint-Library are well known but the solution can be a little unclear if you ask me. The issue is that when we upload a customized .aspx site into our library and then try to open it, we would expect that our sites will open as a HTML page but instead it automatically download it as a file. When this occurs, this guide can be useful.
First, if we’re trying to find the solution on Google, we will see the Tenant Wide setting that allows the users to run the customized Scripts on personal sites and Self-Service created sites. This is a setting that is required for this to work. Make sure that both are allowed.
We find the setting under the following link:
Note: changes to this setting might take up to 24 hours to take effect.
After this we might think that everything should work properly since this is a tenant wide setting, but there is a risk that the issue still exists. I understood from an earlier investigation from Microsoft that there is a bugg that doesn’t make the sites inherit this setting. So, there is a Site level setting that we also need to adjust, and this is the parameter in PowerShell that is called “DenyAddAndCustomizePages”.
We need to make sure that this one is disabled and that will be done with the following commands:
1. Connect-SPOService https://”YOURTENANT”-admin.sharepoint.com/” 2. Set-SPOSite “SiteURL” -DenyAddAndCustomizePages 0
Every setting that we need to change is now adjusted and the only thing left is to upload the .aspx file into the library. But not every user can do this because it’s permissions on user-level that we need to consider.
I’ve noticed that an Owner and admin to the Site (that have full access to modify the Site) Couldn’t get the uploaded .aspx to open as a Site. The user that is uploading the .aspx need to have the permission that is called “Add and Customize Pages” that isn’t per default as permission in group that has full access:
Therefore, make sure that the permission is correct with the Check permission tool and try to upload the .aspx.
This is a summary after an investigation of my own and everything seems to work properly after these instructions.
If you and your company, in any case, need help or advice with your SharePoint environment or other Microsoft 365 questions, feel free to contact me at Anton.email@example.com
Tags : .aspx, Microsoft, Office 365, SharePoint
Vi erbjuder personlig rådgivning med författaren för 1400 SEK per timme. Anmäl ditt intresse i här så återkommer vi så snart vi kan.