virtual directory

G

Guest

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
 
L

Laurent Bugnion [MVP]

Hi,
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
 
L

Laurent Bugnion [MVP]

Hi,
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
 

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,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top