Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

amranthf

Re: HTTP result code 302 while trying to transfer WebDAV content from host to local folder

[quote="martin"]Thanks.

I have added this issue to the tracker:
[url*]https://winscp.net/tracker/2293[/url]

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.[/quote]

Hi martin, could you please send me the development version? I need the bug-fixed version to download files.
martin

Re: Promised Log

Thanks for your feedback.
klinius

Promised Log

Promised log is attached.
klinius

Success! Thank you

Martin,
The development version which you provided resolved the remote to local transfer problem. It was also used to transfer local to remote.
I've uploaded a WinSCP log of the session.
Thank you!
Richard
klinius

How to change answer from Abort to "Accept" ?

These appear to be the pertinent log lines:
* 2024-05-30 07:13:10.187 Redirected to "https://alt-UniqueReference.blackboard.com/bbcswebdav/courses/FIN505.1.FALL2023SIMON/syllabus.pdf?source_domain=uroc-livemig.blackboard.com".
* 2024-05-30 07:13:10.188 (ExtException) WebDAV resource moved to 'https://alt-UniqueReference.blackboard.com/bbcswebdav/courses/FIN505.1.FALL2023SIMON/syllabus.pdf?source_domain=uroc-livemig.blackboard.com'.
* 2024-05-30 07:13:10.188 302
. 2024-05-30 07:13:10.188 Asking user:
. 2024-05-30 07:13:10.188 Error transferring file '/bbcswebdav/courses/FIN505.1.FALL2023SIMON/syllabus.pdf'. ("WebDAV resource moved to 'https://alt-UniqueReference.blackboard.com/bbcswebdav/courses/FIN505.1.FALL2023SIMON/syllabus.pdf?source_domain=uroc-livemig.blackboard.com'.","302 ")
< 2024-05-30 07:13:10.188 Script: Error transferring file '/bbcswebdav/courses/FIN505.1.FALL2023SIMON/syllabus.pdf'.
< 2024-05-30 07:13:10.188 Script: WebDAV resource moved to 'https://alt-UniqueReference.blackboard.com/bbcswebdav/courses/FIN505.1.FALL2023SIMON/syllabus.pdf?source_domain=uroc-livemig.blackboard.com'.
 
< 2024-05-30 07:13:10.188 302
. 2024-05-30 07:13:10.189 Answer: Abort

What should be done to change the answer from Abort to Accept?
klinius

Log Files

Attaching WinSCP and Application log files.
I did alter private information without destroying log meaning.
martin

Re: HTTP result code 302 while trying to transfer WebDAV content from host to local folder

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set 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.
klinius

HTTP result code 302 while trying to transfer WebDAV content from host to local folder

I am using the WinSCP .NET NuGet package in a 4.72 .NET framework application. This application uses WebDAV to transfer host files to a machine local directory, renames the file, and then transfers it back to a different remote directory of the same host. The WebDavSessionOptions.HostName was miskatonic.edu. The WebDavSessionOptions.RootPath was /bbcswebdav.

All was working well until the host implemented an "alternate directory" security feature. Now, attempts to download files result in a SessionRemoteException error. Example:
WinSCP.SessionRemoteException: Error transferring file '/bbcswebdav/courses/FIN505.1.FALL2023WEBSTER/syllabus.pdf'. WebDAV resource moved to 'https://alt-domain.blackboard.com/bbcswebdav/courses/FIN505.1.FALL2023WEBSTER/syllabus.pdf?source_domain=miskatonic.edu' 302

I'm at a loss. How do I instruct the WinSCP .NET connection to honor the 302 redirection? Connection open and authentication only works if I stay with miskatonic.edu as the host name. The configured host name is used to form the download link. Attempts to use the alt-domain link as part of the download results in 501 errors.

How do I download files from the redirected directory?