Is it possible to use V8 in ASP?

2019-09-06 20:58发布

问题:

Since ASP (Active Server Pages) seems to be supported for at least 10 years, would it be possible to run ASP on V8? (Have anyone tried that?)

(Note: I know that there is node.js or owin and advantages of these:)

UPDATE: According to Wikipedia it also supports third party scripting languages for instance PerlScript. So, it seems to me that scripting layer is provided by a COM, therefore it might by possible to create COM wrapper for V8 that could be used in ASP.

回答1:

As many people have said Classic ASP supports both VBScript and JScript (Microsoft's implementation of the ECMAScript standard) out of the box.

This doesn't mean that you can't use other scripting languages with Classic ASP, but finding information on how to implement what Microsoft coins an "Active Scripting" (Originally called "ActiveX Scripting") language is going to be difficult.

The only information I have been able to find that may help is ActivePerl which has an Active Scripting language component of Perl called PerlScript.

If you do have an Active Scripting language installed in IIS other then VBScript or JavaScript you can use the ASP Processing Directive @LANGUAGE to switch to using them.


So in conclusion;

If V8 supports Active Scripting then the answer is Yes.


Useful Links

  • Active Scripting (Wiki)
  • Chapter 6 - Developing Web Applications (MSDN)
  • Windows Script Interfaces (recommended reading)


回答2:

If by V8 you mean the javascript engine which comes with Google Chome then no. Classic ASP supports either VBScript or Javascript as its scripting language. Basically what is available server side is what Internet Explorer can use client side.

If you're using Javascript with Classic ASP then you're using Microsoft's own implementation - JScript - rather than V8

If by V8 you mean IIS8 then yes, ASP runs fine on IIS8. It's not enabled by default, you need to enable it through IIS manager