SharePoint Wiki Pages Migration (Downloading instead of Opening)

Michel AL HAYEK 187 Reputation points
2022-01-28T11:05:47.743+00:00

Hello everyone,
I am trying to migrate SP2016 Wiki pages to SP Online by moving the pages to Site Assets and then using SPMT to migrate Site Assets to SPO. But after the migration is done when I click on any .aspx page in Site Assets it will be downloaded instead of opening in the browser. I tried also to move the pages to the wiki pages library using PNP and still, the pages are downloaded when I click on any of them. Any idea why the Url got changed to include a download option instead of web=1?
@JulieWang-MSFT sharepoint-wiki-pages-migration.html your solution worked here but stuck with the download option.

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,846 Reputation points Microsoft External Staff
    2022-01-31T06:23:55.273+00:00

    @Anonymous

    You could follow below steps to open migrated ASPX files.

    1.Enable custom script by using PowerShell.

    #Config Parameters  
    $AdminSiteURL="https://tenant-admin.sharepoint.com"  
    $SiteURL="https://tenant.sharepoint.com"  
    
    #Get Credentials to connect  
    $Cred = Get-Credential  
    
    #Connect to SharePoint Online Tenant Admin  
    Connect-SPOService -URL $AdminSiteURL -Credential $Cred  
    
    #sharepoint online enable custom scripts powershell - Disable DenyAddAndCustomizePages Flag  
    Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False  
    

    2.Download all ASPX files, delete all ASPX files in the document library, upload them into document library again by using upload button. Then you could open migrated ASPX files.


    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.