|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Hi, how do I create a partial trusted sandbox of an embedded scripting engine (IronPython for examplI'd love to enable the writing of custom scripts by users. The main purpose is to do smart merge tags for a mail merge. Each such smart merge subroutine will add an additional dimension in transforming the looked-up substitution value. For example, one such sub routine would derive a suitable default naturalized salutation in Spanish when the looked-up value is a DBNull. It would be nice to cache and host the scripting engine and serve the execution via web services. The web service would take script snippets matching a certain call signature. Verify it * doesn't try to get out of the sandbox; * makes use of a small selection of safe libraries; * enjoys completion within a certain amount of time, free of infinite loops The web service would then pre-compile the snippet and cache it for calling on the fly. Script updates would prompt recompiles. The web service will then field directives to call these subroutines. These web service calls will provide the parameter values. The web service is then responsible for loading the embedded scripting engine environment, calling the script, and then returning the value. The web service may cache the scripting environment to eliminate unnecessary initialization. I have been made aware that we should investigate CRL concepts such as AppDomains with partial trust domains. And to study recent articles embedding IronPython into MDbg. But has anyone had to do something like this? With IronPython or another scripting language engine? Any help or assistance would be greatly appreciated, thank you ahead of time! Best regards, -- Li-fan |
|||||||||||||||||||||||