Connecting to WebDAV doesn't work
Hi,
I have following data (some text changed for here!) which allows me to connect to a WebDAV via WinSCP client, but doesn't work with the assembly:
HostName: webdav.example.com/storage/me
UserName: MyWebDav
Password: foobar
If I use these data with the Windows client WinSCP, the connect works without any problems!
Now, I tried several things to use these within the assembly, but I get error responses all the time. Here are some examples of my tries:
Result:
same result:
Has somebody helpful infos for me?
Thanks!
I have following data (some text changed for here!) which allows me to connect to a WebDAV via WinSCP client, but doesn't work with the assembly:
HostName: webdav.example.com/storage/me
UserName: MyWebDav
Password: foobar
If I use these data with the Windows client WinSCP, the connect works without any problems!
Now, I tried several things to use these within the assembly, but I get error responses all the time. Here are some examples of my tries:
WinSCP.SessionOptions SessOpts = new WinSCP.SessionOptions { Protocol = WinSCP.Protocol.Webdav , PortNumber = 443 , RootPath = "/" , HostName = "webdav.example.com/storage/me" , UserName = "MyWebDav" , Password = "foobar" }; WinSCP.TransferOptions TransOpts = new WinSCP.TransferOptions(); TransOpts.TransferMode = WinSCP.TransferMode.Binary; using (WinSCP.Session sess = new WinSCP.Session()) { sess.Open(SessOpts); WinSCP.TransferOperationResult TransferResult = sess.GetFiles("/export/export_*.csv", @"\\srv-11\data\export\", false, TransOpts); TransferResult.Check(); }
WinSCP.SessionRemoteException: Error listing directory '/export'.
WinSCP.SessionOptions SessOpts = new WinSCP.SessionOptions { Protocol = WinSCP.Protocol.Webdav , PortNumber = 443 , WebdavSecure = true , RootPath = "/export" , HostName = "webdav.example.com/storage/me" , UserName = "MyWebDav" , Password = "foobar" }; WinSCP.TransferOptions TransOpts = new WinSCP.TransferOptions(); TransOpts.TransferMode = WinSCP.TransferMode.Binary; using (WinSCP.Session sess = new WinSCP.Session()) { sess.Open(SessOpts); WinSCP.TransferOperationResult TransferResult = sess.GetFiles("/export/export_*.csv", @"\\srv-11\data\export\", false, TransOpts); TransferResult.Check(); }
I'm honest, I haven't any idea what's my mistake, but I know I do something wrong.WinSCP.SessionRemoteException: Error listing directory '/export'.
Has somebody helpful infos for me?
Thanks!