Mai Hu Na

Mai Hu Na

  • NA
  • 86
  • 130.9k

download file using webclient issue shows you are not login.

Jul 16 2013 7:07 AM
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");

Answers (1)