Download file from website/server

I

Ilyas

Hi
I am using webclient downloadfile method to download a file from server Like

using system.net;
WebClient web = new WebClient();
web.DownloadFile("webaddress/filename.txt", "E:\\");

for a while it works fine but now it gives error as
401 : UnAuthorized

Submitted via EggHeadCafe - Software Developer Portal of Choice
Sending SMTP email from within BizTalk Orchestrationhttp://www.eggheadcafe.com/tutorials/aspnet/9dd0f346-baf9-4674-a50f-1...

You need to supply credentials to get access to the resource - it
might by getting through your proxy or on the actual resource itself.
See http://msdn.microsoft.com/en-us/library/system.net.webclient.credentials(VS.80).aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top