C#: Restricting system permission level for plug-ins
$30-5000 USD
Κλειστή
Αναρτήθηκε πάνω από 13 χρόνια πριν
$30-5000 USD
Πληρωμή κατά την παράδοση
I am developing an application that will allow C# DLL plug-ins written by 3rd parties.
My application must restrict the plug-ins' access to the file system, registry, etc. and prevent running new processes, printing documents and so forth.
I need to severely cripple what the plug-in will have access rights for. In fact the only thing that I want to allow the plugin to do, is to communicate with my app by watching some events and calling some methods. They have no business doing anything else.
So how can I restrict the permissions levels for a .net DLL?
[login to view URL] or [login to view URL] may have something useful but I'm not sure.
Currently I'm using this to load a plugin:
Assembly a = [login to view URL]("C:\\[login to view URL]" ,new [login to view URL]);
object o = [login to view URL]("[login to view URL]");
IMyApp obj = (IMyApp)o;
And I was trying to use this code but it is obsolete in .NET 4:
[login to view URL] ps = new [login to view URL]([login to view URL]);
[login to view URL](new [login to view URL]([login to view URL], "C:\\"));
[login to view URL] pl = [login to view URL]();
[login to view URL] = new [login to view URL](ps);
[login to view URL](pl);
[login to view URL] a = [login to view URL]("C:\\[login to view URL]");
But even if that part was working, it would only restrict access to the file system. The problem is, I also want to restrict the plugin dll from starting a new process, killing a process, accessing the network, etc.
## Deliverables
1) All deliverables will be considered "work made for hire" under U.S. Copyright law. Employer will receive exclusive and complete copyrights to all work purchased. (No 3rd party components unless all copyright ramifications are explained AND AGREED TO by the employer on the site per the worker's Worker Legal Agreement).
## Platform
win