I am creating a silverlight web application and in it I am trying to read pdf file names stored in a local folder and display them in list box while clicking a button. The folder is under my silverlight project folder. when I tried below code
List<string> list = new List<string>();
DirectoryInfo dInfo = new DirectoryInfo(@"c:\..........");//your path
FileInfo[] FilesList = dInfo.GetFiles();//can filter here with appropriate extentions
foreach(FileInfo fi in FilesList)
{
list.add( fi.Name);
}
it is giving me errors like "file operation not permitted. access to path is denied."
Please help me as I am new to silverlight. Also let me know if it is feasible or not in silverlight.