Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

directory class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AVL - 28 Jun 2007 13:08 GMT
hi,
i've used Directory.GetFiles(path, "*.*", SearchOption.AllDirectories)
method to
return the files in a given path....

but i've a small concern here...whenever I give path like "d:\", i'm getting
an unauthorizedaccess exception...this is because i'm not able to read certain
directories like 'system volume information'...etc..

is any other alternative? how can i get the file list for a given path?
Roland Dick - 29 Jun 2007 05:00 GMT
AVL schrieb:
> hi,
> i've used Directory.GetFiles(path, "*.*", SearchOption.AllDirectories)

> but i've a small concern here...whenever I give path like "d:\", i'm getting
> an unauthorizedaccess exception...this is because i'm not able to read certain

Hi AVL,
you can use GetFiles IMHO, but you have to keep in mind that whichever
account the webapplication runs under must have reading permission on
the path. If you have set up your webapplication to use the anonymous
account (most likely the local "IUSR_<MachineName>" account) then you
must add that account with reading permissions to the ACL of drive d:.
By default, that account only has permissions on the wwwroot directory
of IIS (AFAIK, and not considering GAC etc.).

If you're working on an intranet site, maybe windows integrated
authentication would be an option?

Hope this helps,

Cheers,

Roland

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.