473,386 Members | 1,720 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.

Again Virtual Directory

Hi guys,
Again asking Question regarding Virtual Directories. now i've got the
Virtual Directories list with the help of Michael.
the code is used to get the virtual directory is

System.DirectoryServices.DirectoryEntry iisServer = new
System.DirectoryServices.DirectoryEntry("IIS://" + serverName +
"/W3SVC/1/Root");

now, to take my application further i need to retrive some files
information in that virtual directory or from the directory that
virtual
directory is pointing to.

the path return by the iisServer object is the "IIS://......." that is
not the physical path of the directory. and i want to know the physical
path of the directory.

can anyone please help me to get through this problem?

thanks,
Lucky

Aug 17 '06 #1
2 1796
Hi Guys,
I forgot to mention the tools i'm using.
those are :

c#.net 2005 (VS.NET 2005)
IIS 5.0 oir later

Lucky
Lucky wrote:
Hi guys,
Again asking Question regarding Virtual Directories. now i've got the
Virtual Directories list with the help of Michael.
the code is used to get the virtual directory is

System.DirectoryServices.DirectoryEntry iisServer = new
System.DirectoryServices.DirectoryEntry("IIS://" + serverName +
"/W3SVC/1/Root");

now, to take my application further i need to retrive some files
information in that virtual directory or from the directory that
virtual
directory is pointing to.

the path return by the iisServer object is the "IIS://......." that is
not the physical path of the directory. and i want to know the physical
path of the directory.

can anyone please help me to get through this problem?

thanks,
Lucky
Aug 17 '06 #2
The "Path" property of the DirectoryEntry is the actual physical path to the
folder of th IIS Vroot.

You can use this with regular FileStream, etc. objects to manipulate files.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Lucky" wrote:
Hi guys,
Again asking Question regarding Virtual Directories. now i've got the
Virtual Directories list with the help of Michael.
the code is used to get the virtual directory is

System.DirectoryServices.DirectoryEntry iisServer = new
System.DirectoryServices.DirectoryEntry("IIS://" + serverName +
"/W3SVC/1/Root");

now, to take my application further i need to retrive some files
information in that virtual directory or from the directory that
virtual
directory is pointing to.

the path return by the iisServer object is the "IIS://......." that is
not the physical path of the directory. and i want to know the physical
path of the directory.

can anyone please help me to get through this problem?

thanks,
Lucky

Aug 17 '06 #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
0
by: CM | last post by:
Hi there: I have a web project which can be open and run without problem. I didn't open the web application for a period and during which I didn't modified any IIS items, but now I cannot open any...
4
by: CM | last post by:
Hi there: I have a web project which can be open and run without problem. I didn't open the web application for a period and during which I didn't modified any IIS items, but now I cannot open any...
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...
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...
2
by: Lucky | last post by:
Hi guys, Again asking Question regarding Virtual Directories. now i've got the Virtual Directories list with the help of Michael. the code is used to get the virtual directory is ...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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.