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.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,409 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,615 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,565 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,784 questions
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 40,486 Reputation points Microsoft Vendor
    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