“advancedLogging cannot be added” error
Published Mar 13 2020 08:45 PM 1,748 Views
Microsoft

Web Deploy tool helps migrating your IIS websites from one server to another. While trying to transfer a site from Windows Server 2008 R2 to Windows Server 2016 server, I got this error message:

 

Child object ‘advancedLogging’ cannot be added to object ‘site’

Nedim_0-1584132272852.png

 

Root Cause

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 and displays this error.

 

Solution

Remove Advanced Logging from the source server (You can use Programs and Features to remove it)

Sample Web Deploy import and export commands are below.

 

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"

 

Version history
Last update:
‎Mar 13 2020 01:45 PM
Updated by: