I am using windows web browser control to automatic download files using web client from secured site but it show message
Servlet Response Message
You are not logged on. Please logon first.
here is my code
WebClient client = new WebClient();
client.Credentials = new NetworkCredential("username", "pwd");
client.DownloadFile(new Uri("https://infodirect.pershing.com/cehttp/servlet/MailboxServlet?operation=DOWNLOAD&mailbox_id=id3auhfu&batch_num=0069843&data_format=A&batch_id=071213.ACCT"), @"C:\Downloads\071213.ACCT");
Download file using webclient issue shows you are not login.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Iftikar HussainRank #423 · 5.9K reputationPosted Jul 16, 2013, 3:11 AM EDT
Is the source page using form authentication?
Regards,
Iftikar