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
All was working well until the host implemented an "alternate directory" security feature. Now, attempts to download files result in a
How do I download files from the redirected directory?
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: 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 withWinSCP.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
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?