6

I want to allow my users to use a script language to further customize my application.
I´m looking for an embeddable script engine that is thread safe, because it´s a ASP.NET application. I Checked some engines, like Javascript.NET (https://github.com/JavascriptNet/Javascript.Net ) but it is not Thread safe. Other implementations I found do not look stable enough.

Any sugestions ?

Thank you,

Fábio

1
  • JavaScript.Net is thread safe these days, though you'll need to do some of your own locking if you want multiple threads to call into the same instance of the engine. Jan 17, 2018 at 4:31

2 Answers 2

3

Perhaps IronPython or IronRuby under the DLR is suitable?

You can mark up your extension points using MEF, and allow scripts to extend your application's functionality.

We've used it successfully in MahTweets (a WPF Application) - but I can't vouch for it's use under an ASP.NET situation.

Of course, thread safety is going to be your least concern if you're allowing random people to run arbitrary code within your application. They'll have full capabilities to completely bypass any security functionality you have, and alter/copy any user data. Caveat Emptor..

3
  • Please don´t call my users "random people". They are easily offended :) .
    – Fabio
    Jan 3, 2011 at 17:21
  • Sorry, 'Unknown Third Parties' :p
    – user111013
    Jan 4, 2011 at 15:53
  • 2
    if you fire up a new AppDomain for running your script engine and set heavy restrictions on it you should be able to lock down the scripting environment pretty much. Jan 5, 2011 at 20:49
2

You could also use Lua with something like LuaInterface (http://code.google.com/p/luainterface/). Depending on your level of abstraction and/or freedom for the user writing the script, you may have to refactor a lot of code if you want to introduce a scripting engine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.