409 conflict when uploading files
Hello,
I have installed the WinSCP, Version is 6.1
Connected via WebDAV to our Nextcloud.
Always when I start the session from the desktop – it works fine.
I am always able to upload files (drag & drop).
But I have created a session in C# too
(using "WinSCP.exe" and "WinSCPnet.dll" from the same version 6.1).
In this case – the connection also seems to work.
Because the command
But when this command is being executed
the error "409 conflict" occurs.
Here is the imoportant part of my code:
Thanks for help!
Sincerely yours
Axel Goede
I have installed the WinSCP, Version is 6.1
Connected via WebDAV to our Nextcloud.
Always when I start the session from the desktop – it works fine.
I am always able to upload files (drag & drop).
But I have created a session in C# too
(using "WinSCP.exe" and "WinSCPnet.dll" from the same version 6.1).
In this case – the connection also seems to work.
Because the command
session.Open(options)
shows NO error.
But when this command is being executed
result = session.PutFiles(myLocalPath + myFileName, myRemotePath, false, transferoptions);
Here is the imoportant part of my code:
public ClassWinSCP(string thepath,string thefilename) { myLocalPath = @"L:\ITORG\2_Teamassistenz, Verwaltung\Teammitglieder\\goede\_AKTUELL\"; myFileName = "*"; string myRemotePath = "/nextcloud/public.php/webdav"; string myLogfile = "Nextcloud-Upload.log"; string myLogPath; Session session = new Session(); SessionOptions options = new SessionOptions(); TransferOptions transferoptions = new TransferOptions(); TransferOperationResult result; myLogPath = myLocalPath + myLogfile; session.DebugLogPath= myLogPath; options.Protocol = Protocol.Webdav; options.HostName = "myserver"; options.PortNumber= 9999; options.Secure= true; options.RootPath= myRemotePath; options.UserName = "XXXXXXXXX"; options.Password = "YYYYYYYYY"; session.Open(options); transferoptions.TransferMode = TransferMode.Binary; result = session.PutFiles(myLocalPath + myFileName, myRemotePath, false, transferoptions); result.Check(); }
Sincerely yours
Axel Goede