473,320 Members | 1,950 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,320 software developers and data experts.

Medium Trust level and Filesystem

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/

Apr 21 '06 #1
0 1511

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Michael Howes | last post by:
I have a webservice and use WSE so a user can upload a good sized file. The entire ASP.Net projects, web.config sets a Medium trust level IIS is set up to use "Integrated Windows authentication"...
0
by: Stu | last post by:
I x-posted this in the enhancements group as well, looking for some help: Need help with a CAS issue with WSE3. Enable an asp.net2 webapp to use WSE3. Create a new webservice in the app via...
7
by: AmitKu | last post by:
I am trying to do a URL post using HttpWebRequest, but it fails because I am hosting on Network Solutions, and their servers are all medium trust. Apparently HttpWebRequest doesn't work on medium...
2
by: binujose | last post by:
I am trying to access a folder which resides outside the application.My application hosted in a medium trust level server. I am getting error in the below line of code. ...
1
by: Jordan M. | last post by:
Hi, Hopefully someone can help or at least point me in the right direction... I have developed a site that uses the CyberSource system to process credit cards. All works great locally on my...
3
by: Mukesh | last post by:
Hi all I have Created an web application using VS 2005, asp.net2.0, Ajax Extensions 1.0, Ent Lib 3.1 , MS sql Server 2005, ajax Control tool kit Version 1.0.10618.0
3
by: Steven Voordijk | last post by:
I'm writing code to copy, manipulate and save an image file. The code written is based on this article by Microsoft; http://support.microsoft.com/?id=814675 Unfortunately, the...
4
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
Is it possible for a medium trust web application to read the Membership providers? The following throws a SecurityException: MembershipSection membershipSection =...
5
by: Michael Howes | last post by:
I'm upgrading a VS 2003/.Net 1.1 ASP.Net application to VS 2008/.Net 3.0 The application uses an older version of the Microsoft Data Blocks for database access. The version in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.