Webdav script 405 Method Not Allowed
When used over GUI everything works fine. When you open an already existing Session in a batch script everything works fine.
But when you generate your session code to do a batch or powershell script the "405 Method not allowed" error is shown.
Here is a working example:
When i connect to the session via gui and generate a session code it looks like this:
When connecting with winscp.com:
Same error on this Powershell code:
Ausnahme beim Aufrufen von "Open" mit 1 Argument(en): "405 Method Not Allowed Verbindung fehlgeschlagen."
Any ideas what could be wrong here?
But when you generate your session code to do a batch or powershell script the "405 Method not allowed" error is shown.
Here is a working example:
option batch on option confirm off open CloudSession lcd test cd test get *.* close exit
When i connect to the session via gui and generate a session code it looks like this:
open davs://user:password@cloud.xxxxxx.com/
When connecting with winscp.com:
winscp> open davs://user:password@cloud.xxxxxx.com/ Verbinde mit entferntem Rechner... 405 Method Not Allowed Verbindung fehlgeschlagen. winscp>
Same error on this Powershell code:
# 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.SessionAny ideas what could be wrong here?