Can you connect to that WebDAV server using any WebDAV client?
I tried WinSCP and BitKinex but I'm not able to connect. The only working option is Windows Explorer (Add a network location). I also asked the webdav URL provider to clarify on this.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
Can you connect to that WebDAV server using any WebDAV client?
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::Webdav
HostName = "webdav.domain.com"
WebdavSecure = $True
UserName = "account"
Password = "P@ssw0rd"
}
HostName
and set WebdavSecure
instead of setting PortNumber
to 443.
Session.SessionLogPath
. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.winscp> option batch on
batch on
reconnecttime 120
winscp> option confirm off
confirm off
winscp> option reconnecttime 120
reconnecttime 120
winscp> open "dav://account:***@webdav.domain.com%2F:443" -timeout=15
Connecting to host...
Authenticated.
Starting the session...
Session started.
Active session: [1] account@webdav.domain.com/
winscp> pwd
/:443
Exception calling "Check" with "0" argument(s): "Error transferring file 'C:\uploadtest.csv'. 404 Not Found"
Add-Type -Path ".\WinSCP-5.13-Automation\WinSCPnet.dll"
# Setup session options
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::Webdav
HostName = "webdav.domain.com/"
PortNumber = "443"
UserName = "account"
Password = "P@ssw0rd"
}
$session = New-Object WinSCP.Session
# Connect
$session.Open($sessionOptions)
# Upload files
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Automatic
#$transferResult =
$session.PutFiles("C:\uploadtest.csv", "subdirectory/uploadtest.csv", $False, $transferOptions)
$session.PutFiles("C:\uploadtest.csv", "/subdirectory/uploadtest.csv", $False, $transferOptions)
$session.PutFiles("C:\uploadtest.csv", "./subdirectory/uploadtest.csv", $False, $transferOptions)
$session.PutFiles("C:\uploadtest.csv", "./uploadtest.csv", $False, $transferOptions)
$session.PutFiles("C:\uploadtest.csv", "/uploadtest.csv", $False, $transferOptions)
$session.PutFiles("C:\uploadtest.csv", "./uploadtest.csv", $False, $transferOptions)
# Throw on any error
# $transferResult.Check()