Blog Stats
  • Posts - 22
  • Articles - 0
  • Comments - 8
  • Trackbacks - 0


Day in the life of programming.


I have been searching for a way to use webbrowser control in conjunction with the webclient class to auto authenticate to a website and then to auto-download a file.

I thought I could use webclient.DownloadFile however the website doesn’t get my credentials for which cookies are set when I auto login to the site using the webbrowser control and navigate to the place to download the file.

The webbrowser control doesn’t have a filedownload function as the webclient control does so I thought I could just pass cookies and session from one object to the other, but no that doesn’t seem feasible.

I thought also that I could use the webclient control to navigate the site, but there are not clear methods to post authentication and then to browse through the chain of crazy-ness to get to the place to download the file I need.

I have done hours of research on this and short of writing my own webbrowser control I think I need to give up on this one for a while, or until a more feasible solution is found.

Or maybe I need to use linux and find solutions with open-source.

Microsoft has explanations generally on how to use these controls, but not in conjunction with each other.


No comments posted yet.

Post A Comment



Copyright © foxjazz