I am trying to restore a SharePoint site with a backed up content database. I restored the backup of the content database to Sql server, then when i created the web application i entered the restored database name. The root site works fine but when i click on a sub site i get a 404 error for all sub sites and site content. I have been searching for 3 days now. Any assistance would be greatly appreciated.
- Delete your web application.
- Create a new one. Take care that the authentication mode is identical with the initial web application in which your backed up site collection has been created. Do not directly assign your restored content database but let Sharepoint create a new (empty) content database.
- Next, from your Central Administration => Application Management => Manage Content Databases => select the content database which has been created in step 2 => Remove content database => OK. Please note, that the content database now is removed from your web application but not yet deleted on your sql server. delete it manually from the sql server (i. e. via sql server management studio).
- Restore your backed up content database to sql server.
On your Sharepoint server run the following statement via Sharepoint Management Shell:
Test-SPContentDatabase -Name "your_db_name" -WebApplication "name_of_your_webapp"
Are there any errors listed? Try to resolve them.
Run the following statement via Sharepoint Management Shell:
Mount-SPContentDatabase "your_db_name" -DatabaseServer "your_sqlserver" -WebApplication "name_of_your_webapp"
Now try to access your site with administrative and non-administrative accounts. If necessary change the authentication mode of your web application. Don't forget to set portalsuperuser and portalsuperreader accounts.