Hyperlink to an FTP file

G

Guest

I'm using ASP.NET 1.1.
I have a DataGrid in which I have a hyperlink column. The NavigateUrl of the
hyperlink is an ftp file on the form "ftp://IP Address/fileName". When I
click the hyperlink the following error page appears:

The resource requested could not be accessed. The following response
received from the FTP server may contain an explanation.530 User anonymous cannot log in.

Is it correct to view an ftp file using this way or should I map this ftp
path into a virtual path? If it is correct to open the ftp file directly, how
can I supply the username and the password "I'm using script window.open() to
open the file in a new window"?

Thanks in advance,
Shehab.
 
K

Kevin Spencer

What browser are you using? Internet Explorer will supply an anonymous
password. Otherwise, you'll have to handle the linking on the server side
with an FtpWebRequest (if you have .Net 2.0).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A brute awe as you,
a Metallic hag entity, eat us.
 
G

Guest

Thanks for the reply.
I'm using Internet Explorer 6.
Here is the syntax of the HyperLinkColumn:
<asp:HyperLinkColumn
DataNavigateUrlField="Path"
DataNavigateUrlFormatString="javascript:var w=window.open('{0}','','');"
DataTextField="Name"
HeaderText="PDF/DJVU">
</asp:HyperLinkColumn>
I am sure that the "Path" is a valid file
"ftp://172.16.0.29/dlp/path/fileName.pdf".
However when I try to logon to the server using "Run -> ftp://172.16.0.29/".
The following message appears:
Either the server doesn't allow anonymous logins or the e-mail address aws
not accepted.
So my question is if I do have a username and a password how to pass them as
parameters while trying to open the file?
Thanks in advance,
Shehab.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top