You can use Web Deploy tool to migrate your IIS websites from one server to another. I have been trying to transfer a site from Windows Server 2008 R2 to Windows Server 2016 server. I came across this error message:
Child object ‘advancedLogging’ cannot be added to object ‘site’. The ‘site’ provider may not support this deployment
This issue occurs because Advanced Logging extension is not available for IIS versions that are 8.5 or newer. Since this extension is not available, Web Deploy can’t import the package.
For a list of IIS versions, please check this post: A summary of IIS versions
Solution for “Child object ‘advancedLogging’ cannot be added”
In order to solve this issue, remove Advanced Logging from the source server. You can remove it via Programs and Features window.
Sample Web Deploy import and export commands are below for reference.
Export without a manifest file (run in the old server):
msdeploy -verb:sync -source:apphostconfig="Default Web Site" -dest:package=c:\backup\package.zip
Export with a manifest file (run in the old server):
msdeploy -verb:sync -source:manifest=c:\manifest.xml -dest:package=c:\backup\site-exported-with-manifest.zip
A sample manifest file:
<sitemanifest> <appHostConfig path="test.com" /> <Contentpath path="E:\test_www" /> <Contentpath path="E:\test_www2" /> </sitemanifest>
Import (run in the new server):
msdeploy -verb:sync -source:package=c:\backup\package.zip -dest:appHostConfig="Site1"
If the 4GB limit in web deploy export causes an issue, check this post for alternative commands: How to migrate website between IIS servers using Web Deploy (msdeploy)
You can also try removing the Advanced Logging reference from the web deploy package to get over “Child object ‘advancedLogging’ cannot be added” error. Follow the steps below for this alternative solution:
- Unzip the web deploy package
- Remove Advanced Logging reference. Example:
<advancedLogging directory="E:\Logfiles\AdvancedLogs\test.com" MSDeploy.MSDeployLinkName="advancedLogging" />
- Zip the folder
- Try to import it
Note: Depending on how you are importing the package, you may run into this error:
Error: Source <contentPath> and destination <sitemanifest> are not compatible for the giving operation
The root cause of this issue is that the type of the web deploy package changes if you unzip and zip it back. If you can’t get rid of this issue, you will have to use the main solution above (Remove Advanced Logging extension before exporting web deploy package).
In your old server, if the Advanced Logging is not working, check this solution: Advanced Logging is not working – Enable Advanced Logging per site. You may also see identical or wrong logs: IIS is logging 200 instead of 404 status code