Download a File using WebClient class
I'll download some file from our client site which is accessed after
logging in through some credentials. There I have the option to download a
file. I'll set it to download, and the download is started message apprears
on the page.
After a while I get an email saying that down load is complete. Then I'll go
back to the same page where I initiated download, I'll have an option to view
I'll view the file and save the file on to my disk. This is the process I'm
following for a long time. In order to automate the download process I
researched some articles and have developed an asp.net web application using
I'm not sure why it is not working. When I run the application, it should
initiate the download process. But its not doing it.
Am I missing anything here?
This is the code I've written in the application.
public partial class _Default : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
WebClient Client = new WebClient();
NetworkCredential credential =
new NetworkCredential("userid", "pwd", "domain name");
Client.Credentials = credential;
I'm struggling with this problem for a number of days, please any body help
|All times are GMT. The time now is 01:57 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.