473,802 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Download and save file to server from a URL (HTTP)

Max
I need help in vb.net to download a binary file off another web site and
save to it to the server. Not from the client. Server to server. Can anyone
point me to the right classes to use at least? filestream.. one of the web
classes... ??

-Max

Nov 18 '05 #1
2 3724
Max wrote:
I need help in vb.net to download a binary file off another web site
and save to it to the server. Not from the client. Server to server.
Can anyone point me to the right classes to use at least?
filestream.. one of the web classes... ??


There is no such thing as server to server in HTTP. One participating server
will always act as a client from a logical POV. Check out
System.Net.WebC lient or System.Net.WebR equest/WebResponse for advanced
applications.

Cheers,
--
Joerg Jooss
jo*********@gmx .net

Nov 18 '05 #2
Max
Thanks for the clearification. Amazingly the webclient class did the trick
with only one line of code! Wohoo!
---------------------------------
Dim client As New WebClient
Dim strURL As String = "http://www.someurl.com/sendfile.php?fi le=myfile.gz"
Dim strFilename As String = Server.MapPath( "myfile.gz" )

client.Download File(strURL, strFilename)
----------------------------------

"Joerg Jooss" <jo*********@gm x.net> wrote in message
news:e1******** ********@TK2MSF TNGP09.phx.gbl. ..
Max wrote:
I need help in vb.net to download a binary file off another web site
and save to it to the server. Not from the client. Server to server.
Can anyone point me to the right classes to use at least?
filestream.. one of the web classes... ??
There is no such thing as server to server in HTTP. One participating

server will always act as a client from a logical POV. Check out
System.Net.WebC lient or System.Net.WebR equest/WebResponse for advanced
applications.

Cheers,
--
Joerg Jooss
jo*********@gmx .net

Nov 18 '05 #3

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

Similar topics

5
5836
by: peetm | last post by:
I'd like to write to a log whenever a visitor to my site downloads a file. So, I'd like the link they click to be to a php 'page' that returns the file. Don't know how to do that! Side Question ... Presumably, the dialog that you see when you download a binary (asking for a 'Save As...' file name) is put up by your browser when it 'sees' non-text data coming back as a response? So, how would you download a text file - and cause...
6
18629
by: Don Grover | last post by:
How can I force a download of a csv file by user clicking on hyperlink. Don
4
21956
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
0
1572
by: mizi | last post by:
I am writing an ASP page for downloading some files, such as jpg, doc which are known MIME type. I want to force user save these files through a "file download" dialog instead of open them on the IE by default. I search the Internet and found the best way to do it is by using stream. The following is my code for the download.asp. There are 2 problems, one is when I use firefox and click the link to download.asp, I found the system become...
8
2407
by: kieran | last post by:
Hi, I want to download an image from the web and save it locally. I have spent all day messing about with this and am still no where. We have a firewall so i use the below code. I know it works down to the line as i also use this code to download an xml file from the net. I have been messing around with all sorts of ways to stream the image into a local file and save it. but no luck. Am i totally off key here, can anyone point me...
0
1750
by: Rhys666 | last post by:
Basically I have a link that opens my download page and the querystring identifies the type of 'template' Excel spreadsheet has asked to download. The download page reads the querystring, identifies the template required then uses Response.AppendHeader to amend the response to create the file download dialogue. On my local machine this works fine and the download dialogue correctly identifies the file name and type attempting to be...
2
6971
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
47493
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
3
6488
colinod
by: colinod | last post by:
I am trying to get my site to download mp3 files without having to right click - save as on a link. I have found this code, which works as long as the file names are short, if they get a bit long it just opens a blank page, can anyone help <%@Language="VBScript"%> <%Option Explicit%> <%Response.Buffer = True%> <% On Error Resume Next Dim strPath strPath = CStr(Request.QueryString("file"))
0
9562
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,...
1
10285
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
10063
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
9115
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
7598
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
6838
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
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
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
2966
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.