According guidlines of ASP.NET security with medium trust level I should able
to use file system IO with my virtual directory, but actual recieve error
500 (not appears with full trust level)
Following two examples.
"My virtual directory/Some directory/Some other directory"
within an application in "My virtual directory" I have to get
FileVersionInfo of files from "Some other directory"
string dPath = "Some directory";
ArrayList al = new ArrayList();
foreach(string d in Directory.GetDirectories(Server.MapPath(dPath)))
{
foreach(string f in Directory.GetFiles(d,"*.exe"))
{
al.Add(FileVersionInfo.GetVersionInfo(f));
}
}
string dPath = "/Some directory";
ArrayList al = new ArrayList();
foreach(string d in
Directory.GetDirectories(HttpContext.Current.Reque st.PhysicalApplicationPath+dPath))
{
foreach(string f in Directory.GetFiles(d,"*.exe"))
{
al.Add(FileVersionInfo.GetVersionInfo(f));
}
}
In both cases requests failed.
Please advice
--
Tamir Khason
"The computer is no better
than its program." [Elting Elmore Morison]
http://www.dotnet.us/