enumerating files in a virtual directory

Setup:  ASPX application residing on a Windows 2000 server; virtual directory pointing to a Windows 2000 server that contains a few subfolders and a handful of textfiles
Experiences:
1.)  the application is supposed to create a list box of all the *.txt files in one of the subfolders but the list box only shows up blank - no errors reported;  this would make me believe that it cannot find the files in the virtual directory but that isn't the case because I can type in the virtual directory path and see all the files I should be seeing in the list box
2.)  I can create a simple ASP page that will enumerate the files in the UNC location on the 2000 IIS server and it correctly enumerates and lists the files in the remote location

Question(s):
1.)  Is this an issue with the .NET Framework that security or permissions needs to be relaxed in order to be able to enumerate files in a virtual directory located on another server?
2.)  What needs to be done to be able to have my .NET app correctly enumerate the files in this virtual directory?
LVL 3
PasdargentAsked:
Who is Participating?
 
moduloConnect With a Mentor Commented:
PAQed with points refunded (250)

modulo
Community Support Moderator
0
 
AerosSagaCommented:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
   If Not IsPostBack Then
       Dim di As DirectoryInfo = New DirectoryInfo("c:\Events\HTML\Event\")
       Dim ds As DataSet = new DataSet()
       Dim fis as FileInfo()
       Dim fi as FileInfo()

       ds.Tables.Add()
       ds.Tables(0).Columns.Add("FileName")
       ds.Tables(0).Columns.Add("path")

       fis = di.GetFiles()
       For Each fi in fis
           Dim dr as DataRow = ds.Tables(0).NewRow()
           dr(0) = fi.Name
           dr(1) = "your web application virtual directory name" & fi.Name
           ds.Tables(0).Rows.Add (dr)
       Next

       ddlPages.DataSource = ds
       ddlPages.DataTextField = "FileName"
       ddlPages.DataValueField = "path"
       ddlPages.DataBind()

End Sub

Aeros
0
 
PasdargentAuthor Commented:
The comment provided  by AerosSaga did not work.  We have since learned that what we are trying to do is not supported.  Please delete this question and refund points or give 50 points to AerosSaga for providing the only assistance.
0
All Courses

From novice to tech pro — start learning today.