WebDAV must be disabled on Content Delivery Server

Avatar de Vinicius

While I was playing around with Sitecore Diagnostics Tool, I faced some problems with a WebDAV error in my Content Delivery node that says

sitecore diagnostics tool webdav error on report blog vinicius deschamps

WebDAV must be disabled on Content Delivery server

WebDAV is enabled. It is recommended to disable this feature on CD servers using the WebDAV.Enabled setting

After googled it, I’ve followed these steps from Alex Shyba’s blog

  1. Remove WebDAV config references within log4net
  2. Remove WebDAV config references within system.WebServer
  3. Remove WebDAV config references within httpHandlers
  4. Disable Sitecore.WebDAV.config

THE ERROR SIMPLY DIDN’T GO AWAY! What would be my next option?!?! Let my friends from Sitecore StackExchange know, and that’s what I did when I asked this question

Sitecore Diagnostics Tool shows WebDAV must be disabled on CD but it is already

One more time João Neto shows up and said

The assembly that evaluates if the WebDAV is enabled is the Sitecore.DiagnosticsToolset.Tests. I managed to disassemble it and found that it checks the following Sitecore configuration to determine whether WebDAV is enabled or not:

/configuration/sitecore/settings/setting[@name=’WebDAV.Enabled’]
/configuration/sitecore/pipelines/initialize/processor[@type=’Sitecore.Pipelines.Loader.CheckWebDAVConfiguration, Sitecore.Kernel’]
/configuration/sitecore/pipelines/preprocessRequest/processor[@type=’Sitecore.Pipelines.PreprocessRequest.WebDAVCustomHandler, Sitecore.Kernel’]
/configuration/sitecore/pipelines/group[@name=’WebDAV’]
/configuration/sitecore/webdav
/configuration/sitecore/scheduling/agent[@type=’Sitecore.Tasks.CleanupFDAObsoleteMediaData’]
/configuration/sitecore/scheduling/agent[@type=’Sitecore.Tasks.WebDAVOptionsCleanupAgent’]
/configuration/sitecore/mediaLibrary/mediaPrefixes/prefix[@value=’$(webDAVPrefix)’]

Based on that answer, I went back to my Sitecore instance and thought that ShowConfig.aspx might show it if still enabled

Once I accessed http://sc81u0/sitecore/admin/showconfig.aspx, I searched item by item listed in the Sitecore.DiagnosticsToolset.Tests

  • WebDAV.Enabled
  • Sitecore.Pipelines.Loader.CheckWebDAVConfiguration, Sitecore.Kernel
  • Sitecore.Pipelines.PreprocessRequest.WebDAVCustomHandler, Sitecore.Kernel
  • WebDAV
  • Sitecore.Tasks.CleanupFDAObsoleteMediaData
  • Sitecore.Tasks.WebDAVOptionsCleanupAgent
  • webDAVPrefix

It turns out that the parameter Sitecore.Tasks.CleanupFDAObsoleteMediaData was in ShowConfig.aspx, which means it was enabled, and to my surprise inside of SwitchMasterToWeb.config as you notice in the image below

sitecore tasks cleanup ofda obsolete mediadata Blog Vinicius Deschamps

As SwitchMasterToWeb.config must be enabled in a Content Delivery environment, the solution was to comment out the following code

Before comment

Sitecore Comment Switch Master to Web Blog Vinicius Deschamps

After comment

Sitecore Comment Switch Master to Web Blog Vinicius Deschamps

After saving SwtichMasterToWeb.config, I ran the Sitecore Diagnostics Tool again and the error didn’t show up!

IMPORTANT

Ensure that the SwitchMasterToWeb.config file is applied as the latest one in the list of configuration changes.

BONUS

For those – as myself – didn’t know what Sitecore.Tasks.CleanupFDAObsoleteMediaData is used for, I’ve asked in Sitecore StackExchange group prior to publishing this post.

What is Sitecore.Tasks.CleanupFDAObsoleteMediaData in SwitchMasterToWeb.config?

Accordingly to Mark Cassidy

“FDA is short for File Drop Area – as in WebDAV File Drop Area
It’s a field type that allows content editors to drag and drop media data (well files) directly into the CMS via WebDAV.
It machine generates folder names to drop these files into; this cleanup task will remove any of these machine generated folders that may no longer be in use.”

And by enabling SwitchMasterToWeb you enable the CleanupFDAObsoleteMediaData, and seems that Sitecore Diagnostic Tool understands that this option is related to WebDAV.

Thanks for reading, and I hope you enjoyed it!

And I’ll see you on my next post!

Tagged in :

Avatar de Vinicius

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *