Sandboxing
You can execute partially trusted code within a sandbox that runs with the specified permissions set. Code, including assemblies, executed within the sandbox will be also granted to just the specified permissions set. To create and run a sandbox, you need an instance of the AppDomain class. The example here creates a sandbox for running an external assembly given the LocalIntranet zone’s permissions. Before showing the sandbox example, follow these steps:
1. Create a new Console application and name the new project as ExternalApp.
2. In the Main method simply add a Console.Writeline statement for showing whatever text message you like.
3. Build the project; then create a new folder named C:\MyApps and copy the newly generated ExternalApp.exe ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access