简体   繁体   English

用于asp.net应用程序的脚本引擎

[英]Scripting Engine for asp.net application

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´sa ASP.NET application. 我正在寻找一个线程安全的可嵌入脚本引擎,因为它是一个ASP.NET应用程序。 I Checked some engines, like Javascript.NET ( https://github.com/JavascriptNet/Javascript.Net ) but it is not Thread safe. 我查了一些引擎,比如Javascript.NET( https://github.com/JavascriptNet/Javascript.Net ),但它不是Thread安全的。 Other implementations I found do not look stable enough. 我发现的其他实现看起来不够稳定。

Any sugestions ? 任何sugestions?

Thank you, 谢谢,

Fábio 法比奥

Perhaps IronPython or IronRuby under the DLR is suitable? 也许DLR下的IronPython或IronRuby适合?

You can mark up your extension points using MEF , and allow scripts to extend your application's functionality. 您可以使用MEF标记扩展点,并允许脚本扩展应用程序的功能。

We've used it successfully in MahTweets (a WPF Application) - but I can't vouch for it's use under an ASP.NET situation. 我们已经在MahTweets (一个WPF应用程序)中成功使用它 - 但我无法保证它在ASP.NET情况下的使用。

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.. 买者自负..

You could also use Lua with something like LuaInterface (http://code.google.com/p/luainterface/). 您还可以将Lua与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. 根据您的抽象级别和/或用户编写脚本的自由度,如果要引入脚本引擎,则可能必须重构大量代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM