Download Problem

  • Thread starter Thread starter Mahesh D. Rane
  • Start date Start date
M

Mahesh D. Rane

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,pstrSourcePath);

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.
 
Mahesh said:
I am facing problem while downloading a file in web
services.
My Donwload Code in Web services :

WebClient objClient = new WebClient();
objClient.DownloadFile(pstrDestinationPath,pstrSourcePath);

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
 
Back
Top