Fix SharePoint Embed Web Part 'File Not Found' Error for ASPX Files
Question details
Users need to resolve a 'File Not Found' error that occurs when trying to display an ASPX file via the Embed web part on a SharePoint page.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Embedding an ASPX file stored in Site Assets into a SharePoint page using the Embed Web Part.
- Observed behavior
- The Embed Web Part displays a 'File Not Found' error on a Communication Site, even though the user has site owner permissions and the file exists in the library.
Verify that you have Site Owner permissions on both your current Communication Site and an accessible Team Site, as you may need to move files between them.
Host the ASPX File in a Team Site and Re-embed
Bypass the strict security and scripting restrictions of Communication Sites by hosting your ASPX file in a standard Team Site.
SharePoint Communication Sites often have strict security settings (like NoScript policies) enabled by default, which can restrict ASPX files from executing or being embedded properly. Hosting the file on a Team Site and linking it back usually circumvents this limitation.
Open a SharePoint Team Site where you have owner or edit permissions, and go to the 'Site Contents' section to find the 'Site Assets' library.
Upload or move your problematic ASPX file into this Team Site's Site Assets library.
Click the ellipsis (...) next to the uploaded ASPX file, select 'Details' or 'Copy link', and copy the direct URL path to the file.
Return to your Communication Site, edit the target page, and add or edit the Embed Web Part. Paste the copied Team Site URL into the website address field.
Click 'Republish' on the SharePoint page and verify that the ASPX file now displays correctly without the 'File Not Found' error.

Contact SharePoint Administrator for Permission Review
If moving the file does not work, custom scripting settings might be blocked at the tenant level and require administrator intervention.
Looking for a Lightweight Alternative to Microsoft Office?
While troubleshooting SharePoint web parts and Microsoft 365 permissions can be complex, managing your everyday documents shouldn't be. WPS Office offers a free, lightweight, and fully compatible alternative for all your word processing, spreadsheet, and presentation needs.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button for your operating system.
- 2. Install the Software: Run the downloaded installer file and follow the straightforward on-screen instructions to set up the software.
- 3. Open and Edit Documents: Launch WPS Office and instantly open your existing Microsoft Office files to start editing right away.

Frequently Asked Questions
Why do ASPX files show 'File Not Found' on Communication Sites?
Communication Sites often have stricter security and scripting policies enabled by default (such as the NoScript setting). This prevents executable files like ASPX from running or displaying properly in Embed Web Parts, often resulting in a 'File Not Found' error even if the file exists.
Do I need special permissions to embed an ASPX file in SharePoint?
Yes. You typically need at least Site Owner or Full Control permissions. Additionally, the site itself must have custom scripting enabled to allow the embedding and execution of active content like ASPX files.
Can I change the settings on my Communication Site to allow ASPX files?
Site Owners generally cannot change this setting from the standard interface. A SharePoint Administrator must modify tenant-level settings or use PowerShell commands to allow custom scripts on specific Communication Sites. Using a Team Site to host the file is a much faster workaround.




