Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

PerlScript on IIS

by Sue (Initiate)
on Jul 19, 2004 at 03:57 UTC ( [id://375454]=perlquestion: print w/replies, xml ) Need Help??

Sue has asked for the wisdom of the Perl Monks concerning the following question:

My .asp files containing perlscript don't run in either IE or Netscape. Running them with FrontPage is ok. I assume I need a reference for IIS or an environmental variable set or something in my path but I can't figure out what. PlEASE REPLY!

Replies are listed 'Best First'.
Re: PerlScript on IIS
by theAcolyte (Pilgrim) on Jul 19, 2004 at 04:16 UTC

    Perlscript is an ActiveX extention, provided by Activestate. Since perlscript is a client-side language, the end user must have the activeX component on thier systems for perlscript to work.

    Its really meant for things like automation, or building apps where you control the end users environment. I imagine you can embed the ActiveX control in the browser (in the case of IE only) but ... really kinda an ugly way to go.

    theAcolyte

Re: PerlScript on IIS
by dfaure (Chaplain) on Jul 19, 2004 at 07:41 UTC

    Activestate dixit: PerlScript is an ActiveX scripting engine that allows you to use Perl with any ActiveX scripting host. At this time, ActiveX scripting hosts include:

    • Internet Information Server 3.0/4.0/5.0
    • Peer Web Services 3.0/4.0
    • Microsoft Internet Explorer 5.0x
    • Windows Scripting Host

    In other words, PerlScript can act a a scripting engine on either side (client or server):

    Client-side
    Perlscript may be use like VBScript or JavaScript in html pages and runs in the context of the browser.
    Server-side
    The scripting engine is driven by the web server (IIS) in order to generate html to be send to client browser (like PHP).

    Pages sources may become difficult to read if they both are server-side generated and contain client-side script...

    ____
    HTH, Dominique
    My two favorites:
    If the only tool you have is a hammer, you will see every problem as a nail. --Abraham Maslow
    Bien faire, et le faire savoir...

Re: PerlScript on IIS
by strat (Canon) on Jul 19, 2004 at 06:27 UTC
    Maybe PerlScript could help you... If not, do VBScript-ASP's run?

    Best regards,
    perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

      Javascript runs. I haven't tried VBScript. This is what I get
      URL: http://e9ew8/PerlScript/ado10.asp
      Active Server Pages error 'ASP 0201'
      Invalid Default Script Language
      The default script language specified for this application is invalid.
      The default script language is PerlScript. I set it in IIS for the PerlScript virtual directory.
      If I don't set it, I get a different but similar error message.

        This is possibly because PerlScript was not registered as an ActiveScripting provider when you installed Perl - you can check this by opening regedit and looking for a key:

        HKEY_CLASSES_ROOT\CLSID\{F8D77580-0F09-11D0-AA61-3C284E000000}
        This should have have an InProcServer sub-key with a value of c:\perl\bin\perlSE.dll as well as an OLEScript key.

        You could hand edit the registry to put this in - (you will also need to set the correct ImplementedCategories key) - but the easiest way to remedy is to reinstall ActivePerl

        /J\

Re: PerlScript on IIS
by NetWallah (Canon) on Jul 19, 2004 at 04:23 UTC
    I'm afraid theAcolyte 's reply is plain wrong.

    Update: Based on theAcolyte 's reply to my post, I revoke this statement, and offer apologies. If the OP had asked about Client-side scripting (Why would he want to do that in perl?), his reply is valid.

    The .asp files need to be server by a WEB SERVER, such as IIS.

    The client browser is irrelevent. What the web server does is convert/run the asp code (regardless of whether it is Javascript, VB or perl), and send HTML to the browser.

    What you need to do is to place the asp code on a web server (which could be your own machine), and view it using a URL pointing to that page within the server.

    Your URL should NOT be something like C:\pathname\file.asp - that will be served by the file system, not by the web server.

    Your URL should be http://Servername/pathname/file.asp

        Earth first! (We'll rob the other planets later)

      Um ... no, its not wrong (my answer). The orignal question said:
      My .asp files containing perlscript don't run in either IE or Netscape.

      So I'm assuming the poster means Client-Side perlscript (to be executed in the browser) ... and to quote from the activestate documents:

      Client-Side PerlScript has Perl embedded within your HTML documents. All PerlScript code must be contained within <SCRIPT LANGUAGE="PerlScript"> </SCRIPT>
       
      Client-side PerlScript has the added requirement that both ActivePerl and PerlScript be installed on each computer will will be loading PerlScript pages.

      So I guess the client browser isn't irrelavant, eh? If the poster meant server-side perlscript (and I misunderstood) then you are right and the poster needs to look at an ASP manual to get things working right

      theAcolyte

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://375454]
Approved by Ao
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found