c# - Downloading a file following all redirects -


I should be able to follow a URL until all redirection ends and the file starts downloading. Think of an example of the sourceforge download URL, I'm just talking about plain HTTP redirects and not JavaScript.

I am committed to pure managed WinForms .NET 2.0. I have been successfully using WebClient until this redirect problem occurred. I thought I could just use the WebBrowser , navigate to a URL and wait but I need to download it completely without user intervention and additionally monitor the download progress. An file download event appears, but it is being raised only after a successful download is completed.

Any help is appreciated. Sorry it is not possible to apologize because you have rejected the (C # wrapper).

Why do you rule with local code? The webbrower class itself is not managed either. It is built on top of native IE API.

Comments