473,657 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Downloading files woth in a web service and use t for furthue processing

Hi,
I am new to web services and i am facing a problem.

I am interested in downloading some file from internet and use it for
furthur processing For eg. i have a file at a the following URL and i
want to download that file in the web service which i am coding and
use it for furthur.

In normal window application i can achieve this by the following
code
link : http://www2.parc.com/csl/members/woo...f-WWW5-WWW.pdf

WebClient WC=new WebClient();

string fileName = "c:\\" + link.Substring( link.LastIndexO f("/")+1);

WC.DownloadFile (link,fileName) ;

But if i try to achieve the same thing in web service using c#.net
with the following code i am not able to do it.

WebClient WC=new WebClient();

string fileName = "c:\\" + link.Substring( link.LastIndexO f("/")+1);

WC.DownloadFile (link,Server.Ma pPath(fileName) );

can some one suggest me how to achieve the it web services.I am also
intrested in furthur performing some operation on this file for
example reading the data from the file and use it.

Thanks for the help.

This is my mail-id : ap****@gmail.co m

Regards,
Govardhan

Apr 3 '07 #1
1 1681
A Web Service is a form of distributed application in which a client makes
method calls to a Web Service. Since a method cannot return a file, a Web
Service cannot return a file. What you are asking is similar to asking how
to get apples from an orange tree.
--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"apondu" <ap****@gmail.c omwrote in message
news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
Hi,
I am new to web services and i am facing a problem.

I am interested in downloading some file from internet and use it for
furthur processing For eg. i have a file at a the following URL and i
want to download that file in the web service which i am coding and
use it for furthur.

In normal window application i can achieve this by the following
code
link :
http://www2.parc.com/csl/members/woo...f-WWW5-WWW.pdf

WebClient WC=new WebClient();

string fileName = "c:\\" + link.Substring( link.LastIndexO f("/")+1);

WC.DownloadFile (link,fileName) ;

But if i try to achieve the same thing in web service using c#.net
with the following code i am not able to do it.

WebClient WC=new WebClient();

string fileName = "c:\\" + link.Substring( link.LastIndexO f("/")+1);

WC.DownloadFile (link,Server.Ma pPath(fileName) );

can some one suggest me how to achieve the it web services.I am also
intrested in furthur performing some operation on this file for
example reading the data from the file and use it.

Thanks for the help.

This is my mail-id : ap****@gmail.co m

Regards,
Govardhan

Apr 3 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2327
by: Reimar Bauer | last post by:
Dear all I recognized today that if I have an echo statement on an else at the end of my script the only thing which was downloaded by wget was this string. Is this a common way to prevent uncontrolled downoading of php scripts? The software I wrote is GPL licensed so I would share it as package not as partial files.
8
3011
by: MattP | last post by:
Ok, with the help of some examples found on the web and some minor modifications on our own, we have a simple and working encrypt and decrypt solution. It runs as a service, watches for files with a specific extension in a specific directory. The files are uploaded by FTP to this directory. The service then does the following steps: 1) Verify it can open the file (so we know it's fully uploaded). 2) Try to decrypt the file with known...
4
2928
by: Joe | last post by:
I'm hosting my web service on a Windows 2003 box which is remotely located. When trying to add a web reference to a C# project I get an error message 'There was an error downloading 'http://mydomain.com:port/webservice.asmx' The operation has timed-out (I've tried with and without using a separate port for the service) The weird thing is the page does show up on the left side of the screen listing the available methods but the Add...
8
14165
by: Ken | last post by:
Can anyone point me to some info, which gives me an idea of how to go about making an ASP.NET web service to download files I plan to access the web service from a C# Windows App. Thanks. *** Sent via Developersdex http://www.developersdex.com ***
0
990
by: Bryan | last post by:
i'm trying to just download the turbogears eggs without installing it. i've read the turbogear install instructions and the easy_install help. from the easy_install web site: If you have another machine of the same operating system and library versions (or if the packages aren't platform-specific), you can create the directory of eggs using a command like this:
1
1891
by: Jens Jensen | last post by:
Hello, I use the code below to zip files to a single .zip destination. I get the expected result when i work on my developement machine (WinXP sp.2). When i deploy the web application which host the code on win2k3 , it only works for a single file. I gave the modify right to "Noetwork Service" on the folder i'm writing to. It does not help.
35
9335
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from 500000 to 3200000 of a file whose size is say 20MB... how do i request a download which starts directly at 500000th byte... thank u cheers
1
1519
by: apondu | last post by:
Hi, I am new to web services and i am facing a problem. I am interested in downloading some file from internet and use it for furthur processing For eg. i have a file at a the following URL and i want to download that file in the web service which i am coding and use it for furthur. In normal window application i can achieve this by the following code
7
2653
by: Laszlo Nagy | last post by:
Hello, I have a win32 service written in Python that starts a plain application, written in Python. The win32 service tries to launch the application in a while loop and logs the return value of the os.system call. That's all. The application is a simple Python program that connects to an https xml/rpc server, and works with the data retrieved from that server. It
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6166
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.