4

I am trying to understand the Windows Phone 7 application sandbox in detail. So I want to understand things such as:

  • Does each app. run as its on unique user?

  • Where is the home (installation. data) directory for each app.?

  • What are the file system permissions on the application home (installation, data) directory etc.?

I am trying to learn this by writing and running sample code (which prints out the current user, current directory etc.) on the emulator. However, the "Security Critical" and "Trusted application" methods within Silverlight are "turned off" for the windows phone 7 applications.

Following are my questions:

  1. Is there a way to print out the current user name, current directory while running the application within the emulator?

  2. Is there a way to run "security critical" code within an app. in the WP7 emulator? Can I somehow configure in the emulator settings to allow these "security critical" api's or make my application a "trusted application"

  3. Is there any documentation out there that details this sandbox architecture?

I have tried searching but I haven't found any in-depth documentation about the WP7 sandbox architecture which would deal with the above detail I want to understand how WP7 sandbox and security works and is implemented per application.

Thanks,

WinPhone7_Developer

1 Answers1

4

The sandboxing model for applications on the phone means that, 3rd party, applications can't run in the background, can only access IsolatedStorage not a shared file system, and can't directly interact with user data or phone functionality.

  1. Details of the account the application is running as cannot be accessed. You can't even get details of the owner of the phone. The nearest you can get is an anonymized Id of the user of the phone http://msdn.microsoft.com/en-us/library/microsoft.phone.info.userextendedproperties.getvalue(v=vs.92).aspx

  2. No, you can only use APIs in the public SDK.

  3. There is extensive and very good documentation at http://msdn.microsoft.com/en-us/library/ff402535(v=vs.92).aspx
    You may be particularly interested in the following sections:

In terms of learning about the platform I'd start by learning from the many resources available and which explain what you can do on the phone, rather than attempting to do things you can do on other platforms. (Even ones which are "Windows" platforms.)

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
  • 1
    Matt's answer is very good! The only thing I'd add is that if you want to get inside the core of WP7 inner implementation (including sandbox) then it's worth spending some time browsing http://forum.xda-developers.com/forumdisplay.php?f=606 - these guys build ROMs for fun. – Stuart Mar 03 '11 at 22:43