Topic "webdav access help needed"

Author Message
marcvanc
[View user's profile]

Joined: 2016-04-30
Posts: 1
Location: Belgium
I have access to a webdav with WinSCP UI. No problem there. See png. I use following code snippit:
(It probably has something to do with TSL/SLL encryption, but I do not know what tot do)

Thank you for any help. Marc

Code:
Dim sessionOptions As New SessionOptions
    With sessionOptions
       .Protocol = Protocol.Webdav
       .HostName = "xxx.xxxxx.xx"
       .PortNumber = 443
       .WebdavRoot = "/xxx/"
       .UserName = "xxx"
       .Password = "xxx"
    End With

 Using session As New Session
    session.Open(sessionOptions)


I Get the following error:

WinSCP.SessionRemoteException: Could not read status line: connection was closed by server ---> WinSCP.SessionRemoteException: Connection failed.
2016-07-02 09_48_51-Clipboard.png (19.06 KB)

Description: (none)

2016-07-02 09_48_51-Clipboard.png

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
To enable TLS, you have to set the .WebdavSecure = True, not the .PortNumber.
See https://winscp.net/eng/docs/library_sessionoptions#webdavsecure

The best way is to have WinSCP generate the code for you:
https://winscp.net/eng/docs/ui_generateurl
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License