“advancedLogging cannot be added” error

  • Thread starter Thread starter IIS
  • Start date Start date
I

IIS

Guest
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’

medium?v=1.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"

Continue reading...
 
Back
Top