Monday, March 19, 2012

Failed file operations with WebDAV using customer error pages on 404 (Not Found)

 

If you configure custom error pages for 404 (Not Found) as redirect to an URL inside the Website may cause problems with file operations via WebDAV.

This setting may be configured using IIS Manager:

image

or with directly editing the Web.config:

<httpErrors>
        <remove
               statusCode="404"
               subStatusCode="-1"/>
        <error 
               statusCode="404"
               prefixLanguageFilePath=""
               path="/index.html" 
              
responseMode="ExecuteURL"/>
  </httpErrors>

When the default 404 handling error pages are configured as above you may encounter problems using WebDAV file operations:

image

image

“File too large”

image

“The parameter is incorrect”

The solution is: each before starting a WebDAV file operation toggle the redirection setting at least fir “Not found” (404) off, perform required file operation and revert the redirection configuration.

Enjoy!

No comments: