473,698 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Download files with ina web service and use it furthur

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 1400
Please always tell what is the behavior you see rather than things like "not
able to do it".

My first thought would be a permission issue (your site runs under a
particular account that might well not be allowed to write to the root).
---
Patrice

"apondu" <ap****@gmail.c oma écrit dans le message de news:
11************* *********@p77g2 00...legr oups.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

4
21943
by: Kevin Muenzler, WB5RUE | last post by:
How do I force a browser to download a file instead of displaying it? In other words I have a page with MP3 and WMA files on it and I would like for the visitor to download the file instead of play it without having to right-click and save. How can I force the browser to pop up the "save file as" dialog box instead of playing it? I know that I can encapsulate it in a zip file which will download and open WinZip. Thanks
5
3411
by: SunSmile | last post by:
Hi, I am logging my exceptions to a word document(*.doc). After the size of word document is 5KB. I am archiving the word document to *.doc.1 Here when I am archiving the word document to *.doc.1, the new line characters("\r\n") are lost and the *.doc.1 document is instead displaying a null square space. I am using Log4Net to log the exceptions.
0
3288
by: CodeMotion | last post by:
I have access to an internet directory and files will be placed in this directory periodically. I am writing a service to poll that directory and download the files for processing. I have figured out how to download the files if I have the name of the file. However, I will not know the names of these files that I need to download. So, Is there a way to download a file from a directory in which you do not know the name of the file? I...
3
3558
by: Demetri | last post by:
Hello, I'm involved in developing an application which has the need to transfer files automtically once a laptop is connected back to the network. The application i'm developing will automatically realize the network is available and thus pass a file to a web service that will know what to do with the file. My question is what is the best way to transfer a file via a web service that my application will consume to invoke transfer's...
6
2704
by: Jatin | last post by:
Hey Guys I have a web application that allows users to download files. But the files are not hosted on the webserver. The files are stored on external servers and are referenced by a URL/URI. Since my application restricts the number of downloads for the file per user, i cannot show the user the URL/URI of the server hosting the file. Therefore i need to some how route the file via my webserver, and then use the Response to stream the...
2
6956
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
1
225
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
0
1351
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
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
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...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
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...
1
6525
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
4371
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
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.