I have a webbrowser control on my form, through it I am logging into my site's forum, and I am assuming the web browser stores the cookies for the session somewhere as I can then browse the site as my logged in user. This works fine.
I want to be able to create an interface beside my webbrowser that will allow users to download specific files on the page through a HttpWebRequest. But of course when I create the request and attempt to download the file (the url that I got from the html in the webbrowser), it sends me to the login page and that is what gets downloaded because the authorisation isn't there.
I was wondering if anyone could suggest the simplest way of doing this? I have also tried passing the cookies within the browser to the HttpWebRequest cookie collection, but there is minimal cookies in the webbrowser, definately not enough for the authentication as this didn't work.
Any help would be much appreciated.
Thanks in advance.