By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,117 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,117 IT Pros & Developers. It's quick & easy.

Download Problem

P: n/a
Hi,

I am facing problem while downloading a file in web
services.
My Donwload Code in Web services :

WebClient objClient = new WebClient();
objClient.DownloadFile(pstrDestinationPath,pstrSou rcePath);

But Every time its downloading only 4k file. But my actual
file file is 10MB.

Is there any other method for downloading file in web
services ?

Regards,
Mahesh D. Rane
LnTInfotech, Powai.
Mumbai.

Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Mahesh D. Rane wrote:
I am facing problem while downloading a file in web
services.
My Donwload Code in Web services :

WebClient objClient = new WebClient();
objClient.DownloadFile(pstrDestinationPath,pstrSou rcePath);

But Every time its downloading only 4k file. But my actual
file file is 10MB.

Is there any other method for downloading file in web
services ?


What content are you getting back? It sounds like the webserver doenst
like you leeching its files, but there are ways to get around this:

- Send a "Referer" header up from the same site
- Spoof the client version string as something well know (lets say IE)
- You may even need to store cookies from a refering page

What are you trying to download, and again what content do you get
back? I'm just guessing here ;) As for another method, look into the
HTTP* objects lying around in the framework.

Hope it helps

--
Phil Price
Student at The University Of Hull
http://www.philprice.net
http://www.dcs.hull.ac.uk
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.