File IO issue on a network...how?
I have a piece of code that works great. Now, I want to move my path from c:\data to h:\data (a network drive). I googled around and figured out that the Directory object doesn't work on network drives and figured I had to change my code ... but, I am kind of stumped.
(OLD CODE)
string[] XMLList = Directory.GetFiles(Session["XMLPath"].ToString(), "*.xml");
ddCustomer.Items.Add(" ");
ddOfficers.Items.Add(" ");
ddAccount.Items.Add(" ");
foreach (string XMLFile in XMLList)
{
ParseXML(XMLFile);
...ect...
(NEW CODE)
FileIOPermission FPerm;
FPerm = new FileIOPermission(FileIOPermissionAccess.AllAccess, Session["XMLPath"].ToString());
string[] XMLList = fileIOPerm.GetPathList(FileIOPermissionAccess.Read);
This "XMLList" is only a list files or folder to which I have assigned permissions. How do I get my directory list like in my old code?
Thanks.
William