Is it possible to control certain permissions of a thread (and most particularly, threads created from it) in C#?
I am developing a C# app, where a new thread is created and executes certain user given code.
How can i control the operations that the user code CAN and CANNOT perform? is this possible?
In particular, i would like to restrict access to certain APIs from the use code.
One specific example is that i want to disable the ability to spawn off new threads from the user code.
*The reason for this is that the user code may spawn off new threads that may not handle exceptions themselves, leading to the crash of the entire application.