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