Home All Groups Group Topic Archive Search About

upload file to web-browser

Author
24 Nov 2006 7:47 AM
reidarT
Is there an example how to upload a file from a clients machine to an
ftp-server
from a web-application? (No ftp-software!)
reidarT

Author
24 Nov 2006 7:51 AM
Spam Catcher
"reidarT" <rei***@eivon.no> wrote in news:edHMKz5DHHA.3396
@TK2MSFTNGP02.phx.gbl:

> Is there an example how to upload a file from a clients machine to an
> ftp-server
> from a web-application? (No ftp-software!)


I suggest you use a HTTP Upload instead (to the web server) and then let
the web server handle the FTP connection to the destination server. This is
a more secure and reliable method.
Author
24 Nov 2006 8:33 AM
reidarT
In a Windows form I use

My.Computer.Network.UploadFile( _
                "File to upload", _
                "ftp://ftp-address" & _
                "/path/filename".mdb", _
                "ftp-username", "ftp-password", True, 5000)

to do this uplaod.
How can I do the same in an aspx-page?
reidarT
Show quoteHide quote
"Spam Catcher" <spamhoneypot@rogers.com> skrev i melding
news:Xns98851D16AC69Ausenethoneypotrogers@127.0.0.1...
> "reidarT" <rei***@eivon.no> wrote in news:edHMKz5DHHA.3396
> @TK2MSFTNGP02.phx.gbl:
>
>> Is there an example how to upload a file from a clients machine to an
>> ftp-server
>> from a web-application? (No ftp-software!)
>
>
> I suggest you use a HTTP Upload instead (to the web server) and then let
> the web server handle the FTP connection to the destination server. This
> is
> a more secure and reliable method.
>
Author
25 Nov 2006 9:48 PM
Spam Catcher
"reidarT" <rei***@eivon.no> wrote in news:#9Kd7M6DHHA.4396
@TK2MSFTNGP02.phx.gbl:

> How can I do the same in an aspx-page?

You'll need a .NET FTP component ... I'm sure there are some free ones -
and plenty of commercial ones.
Author
25 Nov 2006 9:50 PM
Spam Catcher
Spam Catcher <spamhoneypot@rogers.com> wrote in
news:Xns9886AAD908ACAusenethoneypotrogers@127.0.0.1:

> "reidarT" <rei***@eivon.no> wrote in news:#9Kd7M6DHHA.4396
> @TK2MSFTNGP02.phx.gbl:
>
>> How can I do the same in an aspx-page?
>
> You'll need a .NET FTP component ... I'm sure there are some free ones -
> and plenty of commercial ones.

OR you can use the command line FTP client - but if you're on a restricted
server, probably better to use a component:

http://www.codeproject.com/vb/net/FtpClient.asp

Actually .NET 2.0 might have FTP support... take a look at the
FTPWebRequest class.
Author
25 Nov 2006 9:42 AM
Cor Ligthert [MVP]
Reidar,

This is a piece of cake in frontpage, aspnet, asp, php etc.

It needs however something special on the serverside to make it possible
which is provided with those uploads in the "input = file runat server" (in
the case of ASPNET)

With clean HTML it is not possible.
(And than not to an FTP server but to an IIS server).

Therefore what is the environment you are busy in.

(You never can upload a file from a client unatended to a server, that is
called hacking and prevented by all browsers).

Cor

Show quoteHide quote
"reidarT" <rei***@eivon.no> schreef in bericht
news:edHMKz5DHHA.3396@TK2MSFTNGP02.phx.gbl...
> Is there an example how to upload a file from a clients machine to an
> ftp-server
> from a web-application? (No ftp-software!)
> reidarT
>
>