“advancedLogging cannot be added” error

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

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"

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.