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. Commented 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..

Sign up to request clarification or add additional context in comments.

3 Comments

Please don´t call my users "random people". They are easily offended :) .
Sorry, 'Unknown Third Parties' :p
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.
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.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.