Why does FotoWeb return 405 errors on requests with verbs like PUT or DELETE?
Symptom
Some features in FotoWeb or the FotoWeb REST API are not working, because FotoWeb returns 405 Method not Allowed
on requests with verbs such as PUT or DELETE.
Typical symptoms (user point of view):
- Failure to create or delete taxonomy items
- Failure to delete albums
Typical causes
1. Proxy
A proxy is blocking or not understanding requests with verbs other that GET or POST.
Typical symptoms:
- Also affects requests with custom verbs such as PUBLISH (CMS export)
- These verbs work fine if Fiddler is running but not if Fiddler is not running.
For a complete list of custom verbs used in Fotoware HTTP requests, see AFotoWare custom verbs in HTTP requests.
2. WebDAV
The WebDAVModule in IIS is handling DELETE and PUT requests
This only happens with IIS, and does not affect custom verbs such as PUBLISH (used in FotoWeb CMS export)
It does not happen with a standard (automatic) installation of IIS made by the FotoWeb installer, but may occur if IIS has been manually installed or customized.
To disable WebDAV
- Uninstall WebDAV or never install it (it is an IIS feature).
-
Alternatively (e.g., if you need WebDAV), add the following code to web.config in the Documents folder of the site (under Site Settings):
<system.webServer> <modules> <remove name="WebDAVModule"/> </modules> <handlers> <remove name="WebDAV" /> ...
Note:
- Configuration locking may prevent the <modules> tag from being used in web.config. If you get 500.19 errors from IIS after this change, see https://www.iis.net/learn/get-started/planning-for-security/how-to-use-locking-in-iis-configuration
- The web.config file will be overwritten if you upgrade FotoWeb or run "Setup IIS" from the FotoWeb Administration Console.