Re: Resolve WebDav 405 Method not allowed problem in WinSCP
More specific documentation:
https://winscp.net/eng/docs/faq_root_path
https://winscp.net/eng/docs/faq_root_path
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
why is the generated code still broken for WebDAV?
RootPath = "/remote.php/webdav"
open davs://user:password@cloud.xxxxxx.com/remote.php/webdav
SessionOptions.RootPath
:
option batch on
option confirm off
open CloudSession
lcd test
cd test
get *.*
close
exit
open davs://user:password@cloud.xxxxxx.com/
winscp> open davs://user:password@cloud.xxxxxx.com/
Verbinde mit entferntem Rechner...
405 Method Not Allowed
Verbindung fehlgeschlagen.
winscp>
# WinSCP .NET assembly laden
Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
# Sitzungsoptionen konfigurieren
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::Webdav
HostName = "cloud.xxxxxx.com"
PortNumber = 443
UserName = "user"
Password = "password"
WebdavSecure = $True
TlsHostCertificateFingerprint = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
}
$session = New-Object WinSCP.Session