Not able to access ftp directory with asp.net

V

vishnu

Hi,

Am trying to access the directory and its files from the ftp path \
\135.51.103.13\ftpshare.But when i try to do it , it is telling
Directory not found.What is the reason for this. Is there any secuirty
settings that i need to set?


Here is the code below:


Public spath As String = "\\135.51.103.13\ftpshare"
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim dir As Directory
Dim drNames() As String


If Not IsPostBack Then


If Not Directory.Exists(spath) Then
'Directory.CreateDirectory(spath)
' Response.Write(Directory.Exists(spath))
ShowMessageBox(Me, "Directory not Found")


Else
drNames = dir.GetDirectories(spath)
Dim i As Integer


For i = 0 To drNames.Length - 1


ddlDirectory.Items.Add(drNames(i))


Next
End If


End If


End Sub


Please let me know why am not able to access the directory.When i run
it from the command window it is opening.


Thanks,
Vishnu
 
A

Aidy

The anon user account is local to the machine and doesn't have permissions
to acccess network folders.

Create an account that has the right permission and use that user as the
anon user.
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top