473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

virtual directory

I want to get the file names from another virtual directory in IIS, please
let me know how can I achieve this....

The web application from which I will be accessing another virtudal
directory folder will be in the same IIS server.

ASP.NEt 2.0/C# 2.0

Raj
Jan 22 '07 #1
2 1424
Hi,

Raj wrote:
I want to get the file names from another virtual directory in IIS, please
let me know how can I achieve this....

The web application from which I will be accessing another virtudal
directory folder will be in the same IIS server.

ASP.NEt 2.0/C# 2.0

Raj
If your web server has Directory Browsing enabled for this virtual
folder, then it will return a HTML formatted list of files when you use
the virtual folder's URL in a web request. The file names are quite easy
to extract.

I am not aware of another way to get a list of files in a virtual
folder. What you could do is use IIS' API to retrieve the name of the
physical folder, and then use that to retrieve the content.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 22 '07 #2
Hi,

Raj wrote:
Hi,

I have Directory Browsing permission, currently I have done by scrapping the
page in HTML form and doing some string operation get the file name. Is there
any better way to do.

Note: I do not have access to physical path of the file.
As said, I am not aware of another way to get the list of files. That
is, unless you install a web service or any other server-side logic
(ASHX comes in mind) able to handle to web request. But I guess that
it's not an option for you, since you don't have access to the other
virtual folder.

The content of a web folder is quite well protected to avoid security
issues.

Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Zenobia | last post by:
I copy an application to wwwroot: wwwroot +--- myApp +--- common | +--- images | default.asp global.asa
2
by: Jeffry van de Vuurst | last post by:
Hi, (sorry for the crosspost, I wasn't sure which was the best place to put this). I was just thinking about something and wondered if any of you has some ideas about this. I'm using the...
5
by: Leszek | last post by:
Hello, Could anybody explain what's a difference between a virtual directory and an application root under IIS? I'm a little bit confused. This is mu problem: Let's assume the following...
10
by: Wm. Scott Miller | last post by:
We have a intranet site that allows one of our departments to search a set of pdfs and then look at them. Only problem is that only they and us geeks should be allowed to see the pdfs. We have it...
2
by: Danny Miller | last post by:
Hi there, I'm facing a problem that is driving me nuts. The scenario is as follows: 1) Create an empty directory structure e.g. C:\Dev1\TestWebApp 2) Map a virtual directory e.g. TestWebApp...
4
by: david | last post by:
I basically use the following code to display the directory and file names in the WWWROOT, but can not show the virtual directory. ---- Dim path As String = Server.MapPath(x) Dim di As...
6
by: Saar Carmi | last post by:
Hi How can I get the application's virtual directory from the Application_Start method in Global.asax ? Keep in mind there is no request/response object available yet in this stage. Thanks...
8
by: Nate | last post by:
I am running on Window 2003. I have a website built in ASP.NET 2.0. I need to have a Virtual Directory running an application in 1.1. I have configured each in its own Application Pool. The 1.1...
6
by: ManagedCoder | last post by:
Hi, My requirement is as follows: I need to set the HttpExpires (enable content expiration - set to 7 days) on a folder within a virtual directory. I have been able to set the HttpExpires...
6
by: Scott M. | last post by:
I didn't get a resolution to this in my earlier post, so I'll try again: System: Windows XP Pro. (SP2) with IIS installed and running PRIOR to VS 2008 Pro. installation. VS 2008 Pro. (full...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.