Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Silverlight able to change a file on a local user's computer?

I considering writing an application in C#/.NET that will programmatically alter an XML file on a user's computer and I trying to determine if Silverlight (and which versions, in what modes) will work for this task.

Here's the workflow:

  • User selects file
  • Application modifies file
  • Application saves file, overwriting original file

Is this possible in Silverlight? If so, in which versions and under what conditions?

like image 741
Ben McCormack Avatar asked Jan 19 '10 17:01

Ben McCormack


1 Answers

The silverlight runtime operates inside of a security 'sandbox'.

You can access files from the computers hard drive only via the Open file dialog. You can read and write from Isolated Storage using Silverlight 2 and up.

Coming in Silverlight 4 you will have the ability to access files from "special directories" such as My Documents, My Music, My Pictures etc. (http://weblogs.asp.net/nmarun/archive/2009/11/27/local-file-access-silverlight-4.aspx)

like image 148
Dan Avatar answered Sep 17 '22 22:09

Dan