How do I choose files from the local filesystem in Windows Phone 7

Posted by Kris Erickson on Stack Overflow See other posts from Stack Overflow or by Kris Erickson
Published on 2010-03-22T03:31:46Z Indexed on 2010/03/22 3:41 UTC
Read the original article Hit count: 353

I'm trying to choose some files to upload in Windows Phone 7 (in the emulator), and any attempt to ShowDialog of the OpenFileDialog leads to a Security Exception. The open file dialog is being called from an event on a button click but I get a

SecurityException

[FileDialog_ActiveScripting]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=3.0.40806.0&File=System.Windows.dll&Key=FileDialog_ActiveScripting

Looking up the SecurityException in the Silverlight version of OpenFileDialog.ShowDialog states that the error is:

Active Scripting in Internet Explorer is disabled.

-or-

The call to the ShowDialog method was not made from user-initiated code.

Anyone had any luck with the OpenFileDialog and ShowDialog in Windows Phone 7?

© Stack Overflow or respective owner

Related posts about windows-phone-7

Related posts about Silverlight