i have a project that receives virtual directories from IIS, and show the files in directories as an windows application form. Here my problem with defining the path as

Directory.GetDirectories(dataDirectory)

dataDirectory including the code is: //LM//W3SVC//1//Root//Data//
also when i try another format as
iis://localhost//w3svc//1//root//data and //localhost//W3SVC//1//Root//Data// anad also one back slash, same error result i took...

public void CreateFormsMenuItems(BarManager barManager, BarSubItem formsBarSubItem, ItemClickEventHandler formsBaritem_ItemClick, string dataDirectory)
      {
         foreach (string dirName in Directory.GetDirectories(dataDirectory))
         {
            BarSubItem barsubitem = new BarSubItem();
            barsubitem.Category = barManager.Categories["Forms"];
            barsubitem.Caption = Path.GetFileNameWithoutExtension(dirName);
            barsubitem.Tag = dirName;
            //baritem.ItemClick += new ItemClickEventHandler(formsBaritem_ItemClick);
            barsubitem.ImageIndex = 5;
            barManager.Items.Add(barsubitem);
            formsBarSubItem.AddItem(barsubitem);
            CreateFormsMenuItems(barManager, barsubitem, formsBaritem_ItemClick, dirName);
         }

         foreach (string fileName in Directory.GetFiles(dataDirectory))
         {
            BarButtonItem baritem = new BarButtonItem();
            baritem.Category = barManager.Categories["Forms"];
            baritem.Caption = Path.GetFileNameWithoutExtension(fileName);
            baritem.Tag = fileName;
            baritem.ItemClick += new ItemClickEventHandler(formsBaritem_ItemClick);
            baritem.GroupIndex = 1;
            baritem.ButtonStyle = BarButtonStyle.Check;
            baritem.ImageIndex = 4;
            barManager.Items.Add(baritem);
            formsBarSubItem.AddItem(baritem);
         }
      }
DirectoryEntry dataDir = new DirectoryEntry("IIS://localhost/w3svc/root/1/Data/");

how i get rid of the format error? could you help me, please...

I think this is more of an issue in an ASP forum.

hmmm, Yes Danny, but I think he has a problem in undertanding what virtual directory is!! What you are doing Mkn is going to shared folder on network not virtual directory!!
I'll search in this topic and reply you soon, but better go to ASP.NET forum and discuss that there http://www.daniweb.com/forums/forum18.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.