none
get all the filenames on specific directory, SILVERLIGHT 4 RRS feed

  • Question

  • I have the following code where I try to search and display the pdf files of a specific path

    var files = Directory.EnumerateFiles(@"\\192.168.1.216\UploadFileMobilePDF\" + transfer.IdTransfer, "*.pdf", SearchOption.AllDirectories);
                foreach (var file in files)
                {
                    System.Diagnostics.Process.Start(file);
                }
    but silverlight does not let me access that route, I want to know how to do the same function, but in silverlight, search and display the pdf files


    Edgar Rojas H.

    Wednesday, September 11, 2019 8:28 AM

Answers

  • Haven't you already asked this exact question a couple of times?

    You CANNOT access files on the client's computer from Silverlight.  It is NOT ALLOWED.

    If your web server has access to the same file share, you can write a handler in the web server to return the files, and change your Silverlight code to fetch the files from the web server.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    • Marked as answer by Eddy RH Thursday, September 12, 2019 4:15 AM
    Thursday, September 12, 2019 4:11 AM