473,769 Members | 4,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Uploading to remote server

Browsing in the web I find a lot of articles that argue: "With ASP.NET
2.0. uploading files is pretty easy!". I spent on that problem last
three days but didn't found my way through it.

I have to develop a web page that uploads files from my computer to a
remote server. I tried to do it in many different ways, the last one
is:

Dim c,s As String
Dim v() As String
Dim sql As New StringBuilder
c = fileToUpload.Po stedFile.FileNa me
ReDim Preserve v(10)
v = c.Split("\")
s = v(UBound(v))

' c is the entire path, s is only the filename, ex. frog.jpg

Label1.Text = c
Dim up = New System.Net.WebC lient
up.Credentials = New Net.NetworkCred ential("......" ,
"........")
up.UploadFile(" http://www.spaziomio.n et/public/" & s, s)

But doesn't work, it returns me a WebException.

Can you tell me a simple way to upload files from my computer to a
remote server?

Thanks a lot, excuse me for my approximate English!!

Mar 27 '06 #1
0 864

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

Similar topics

6
2828
by: Chamomile | last post by:
can anyone point me to some straightforward information on file uploading without using an html form? That is, direcly from within a php script. if I know the local path etc. to a particular requested file how can I send it directly to a location on a remote webserver following a request from the remote server? The motivation is that I have a large number of image files that are
2
17412
by: genc ymeri | last post by:
I'm uploading a text through http server but I keep getting the below error. Is the below error coming from my code or from the http server ???? Any help/tip will be very much appreciated. Thank You very much in advance. try { //create an instance of the WebClient. System.Net.WebClient MyClient = new System.Net.WebClient();
0
1875
by: lknight643 | last post by:
I have an asp.net application that works with a SQL server database on server No. 1 but I want to upload files for storage to Server No. 2 that is accessible only from the Internet. If the file storage was on server No. 1, I would specify a physical file path (ChosenDirectory) for storage of the uploaded file but in my case I need to specify a virtual path like http://server2/folder1/. I'm trying to use server.mappath to convert the...
1
2026
by: Orgil | last post by:
Hi all, I'm working on a ASP web site. The site has some pages for uploading files to its server. I'm working on my computer as a local server. When pages of the web become ready, I copy the pages to a remote directory of a remote web server . When I upload files to the local server, any file is completely uploaded. But when files are uploaded to a remote server, the size of each file is 20 bytes less than the original file size and...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10211
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...
1
9994
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
9863
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
8870
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
7408
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
6673
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();...
1
3958
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
2815
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.