I am trying to run ActivePerl from an Azure web app. I have installed all the necessary files and can run it from the command line.
I can view the output for the test.pl script from the command line as follows
D:\home\site\wwwroot\bin\perl\bin\perl.exe D:\home\site\wwwroot\test.pl
This just outputs this text:
Content-type: text/html\n\n
Hello, World!
However when I add a handler in my Application Settings to run *.pl files with a processor path of
D:\home\site\wwwroot\bin\perl\bin\perl.exe (i.e. the same file as I ran from the command line)
I get the following FastCgiModule error: The storage control block address is invalid. (0x9)
I think this is a permissions error, but why does it work from the command line and not when running inside the web app. Are they running under different accounts?
If your script runs from the command line but not from the web app or IIS it means the CGI part is not functioning. My problem is I hadn't installed FCGI
This page explains all: http://search.cpan.org/~cosmicnet/FCGI-IIS-0.05/lib/FCGI/IIS.pm
Basically, you need to run "ppm install FCGI-IIS" from the command line (on the PC you copy the files from to include in the web app, NOT the web app you can't).
Then add as a handler argument for your *.pl handler: -MFCGI::IIS=do
If it's not working run this from your web app command line and see what the error is: D:\home\site\wwwroot\bin\perl\bin\perl.exe -MFCGI::IIS=do test.pl
The web app logs are pretty useless, much better to run from the command line if you can to see the error.