Ask A Question

Download image with link direct authen in C#

Asked by Love Grass on 07/17/2013 at 3:36 AM

i want download image captcha code with link, but captcha code only just show when i login. I download it using Web Client, but i'm not way to add request cookie login when download.

  System.Net.WebClient wc = new System.Net.WebClient();
                    wc.Credentials = new System.Net.NetworkCredential("minhtrung3811", "Nguyen123"); //Authenticates to the website - Call it only if the image url needs authentication first
                    wc.DownloadFile(url, "d:\\downloadedImage.jpg"); //Downloads the imageURL to the local file downloadedImage.jpg

Please help me?

View Full Answer On Stackoverflow


No responses yet. Be the first one!

    [Some content on this page is from Stackoverflow]