Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


enumerating files in a virtual directory

Posted on 2004-10-29
Medium Priority
Last Modified: 2013-11-15
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
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

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?
Question by:Pasdargent
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 17

Expert Comment

ID: 12448086
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()


       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)

       ddlPages.DataSource = ds
       ddlPages.DataTextField = "FileName"
       ddlPages.DataValueField = "path"

End Sub


Author Comment

ID: 12636043
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.

Accepted Solution

modulo earned 0 total points
ID: 12663685
PAQed with points refunded (250)

Community Support Moderator

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question