Morcos Adel

Morcos Adel

  • NA
  • 195
  • 50.4k

virtual directory problem

Jun 1 2011 9:08 AM
hi
i have a problem with web site published on windows server 2008 i think the version of the iis is 7...

scenario:
on this server i have a shared network folder (z:) and i have all the permissions to access all the documents on it,From the iis i create a 
virtual directory named test and then the alias is test and physical path
point to the (Z:) drive and when i browse this folder it realy is showing me
the data in the (Z:) drive....
what really confuses me now is how to access this folder from my code specially that i didn't create it when i built my webapplication...

in the code i wrote :
String Path = "~/test/" + Trial + "NewDocument.docx";
String Text = ReadTextFile(Path);

and i get the following error:
Could not find a part of the path
'c:\windows\system32\inetsrv\~\test\Reading Trial\NewDocument.docx'.
any ideas to solve this problem would be great...
Thanks in advance....

Answers (4)