Not able to access ftp directory with asp.net

  • Thread starter Thread starter vishnu
  • Start date Start date
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
 
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.
 
Back
Top