http://qs321.pair.com?node_id=181276

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

Anyone else trying desperately to make Perl work in the ASP.NET environment? I have been for a long while, but I keep running into unusual errors, and finding help or even documentation is a nightmare.

For instance, right now I have a web server set up with the .NET framework running VB.NET scripts flawlessly, but the ASP object model($Response, etc) never seems to be initialized, so $Response->Write yields "can't call method Write on an undefined value."

*sigh* If only I didn't work at a company that's a whore to Microsoft, I wouldn't have to deal with such things. If anyone else out there has been developing Perl ASP.NET applications and can offer any help, I'd be very appreciative. Until then, I guess I'll continue my futile attempts at making it work via shotgun debugging and educated(but not nearly as much as I'd like) guesses.

Replies are listed 'Best First'.
Re: ASP.NET and PerlScript
by Moonie (Friar) on Jul 12, 2002 at 18:08 UTC
    I'm not sure what version of Perl you're using, but for a reference and some downloads, you may want to check out ASPN:.NET and download PerlNET.

    - Moon
Re: ASP.NET and PerlScript
by Theseus (Pilgrim) on Jul 12, 2002 at 19:33 UTC
    This is perl, v5.6.1 built for MSWin32-x86-multi-thread... Binary build 631 provided by ActiveState...
    I did download Perlscript from Activestate's site and Perlscript itself is working in aspx files on my server, I can do just about anything besides access the intrinsic ASP objects or load Win32::ASP(because it uses ASP's objects, and so it won't run since $Response keeps coming back undefined).

    I'll take a look at PerlNET, but I was under the impression I had installed all the utilities I needed to run Perlscript under ASP.NET. Unfortunately, I'm not interested in the Perl Dev Kit or any other of Activestate's retail software(I doubt my employer will pay for it), I only need whatever is out there and freely downloadable that will make what I need to do possible.

    To illustrate my problem, perhaps I should show you two different snippets of code, one that works, and one that doesn't.

    This code works:
    <%@ Page Language=Perlscript Debug="True" %> <html> <head> </head> <body> <% for $i (1 .. 10) { %> <%= $i %><BR> <% } %> </body> </html>

    This code doesn't:
    <%@ Page Language=Perlscript Debug="True" %> <html> <head> </head> <body> <% for $i (1 .. 10) { $Response->Write("$i<BR>"); } %> </body> </html>

    Both of those pages should print the exact same thing, and the second one doesn't work because $Response doesn't seem to ever be initialized as an object. I did some poking around some symbol tables, and I found $Win32::ASP::Response, but that is also undefined. Help!