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