IIS 7 & IIS 8
Configuration & Scripting
Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result...
Last post Jul 16, 2011 06:21 PM by HCamper
May 31, 2011 09:10 AM|LINK
Check this post also
As I posted early on you have two account that require access IUSR then IIS_USRS permissions to the perl directories.
The IUSR and IIS_USRS need to have permissions in IIS Server and the Web Sites for access
the permissions are read,execute,list.
The IUSR and IIS_USRS need to to have permissions and access to the C:\Windows\Temp folders
and require read,execute,list and write.
In addition to the permissions check that the perl path is after the C:\Windows...\ and not before C:\Windows...\
you will experience very slow start up of the windows system the path also prevents checking for Windows Commands to
use to open perl or other files.
May 31, 2011 09:47 AM|LINK
Let me check the link you send to me.
Jun 01, 2011 02:45 AM|LINK
Thanks for your response at first.
unfortunately, the script still not exec when the url not localhost.
It pop the savefile dialogureBox
I follow these step:
1. install perl -- ActivePerl-184.108.40.2064-x86,
2. perl install Path: C:\Perl
3. set IUSR and IIS_IUSRS permissions, read,execute,list for C:\Perl
4. Add CGI to Role "Web Server(IIS)"
5. Create perl file "perlhelloworld.pl", which include "print "Content-type: text/plain\n\n";"
6. Add Module mapping, Request path: *.pl ; executable c:\Perl\bin\perlex30.dll
7. Set IUSR and IIS_IUSRS permissions, read,execute,list for this web site
8. Set IUSR and IIS_USRS permissions C:\Windows\Temp folders, read,execute,list, write
9. Set the DefaultAppPool , Enable 32-Bit Applications : true
1) I still set the DefaultAppPool, .netframework : v4.0 ; Identity : NetworkService ; Load User Profile : false
2) I remove the CgiModule Handler mappings.
Jun 01, 2011 08:04 AM|LINK
when I set isapimodule and cgimodule, the locahost link work
but, after I replace localhost to server name, the perl script will not exec but pop a download dialogure box.
and, isapimodule can not follow paramteters. its means localhost?XXX not work in isapimodule
Jun 01, 2011 12:35 PM|LINK
The current failures likely are " DefaultAppPool, .netframework : v4.0 ; Identity : NetworkService ; Load User Profile : false"
change the Application Pool settings to Net 2.0 Framework and select Classic Mode and select the Identity.
Undo the setting for Set the DefaultAppPool , Enable 32-Bit Applications : true.
Check this guide for settings http://www.iis.net/ConfigReference/system.applicationHost/applicationPools/applicationPoolDefaults .
And use this for operations
General Note: You can have several Handlers and mappings for perl to use CGI and SCRIPT you create
each with unique name and settings.
Jun 02, 2011 02:24 AM|LINK
Thanks Martin again.
I set the Default AppPool as you said.
but my current VM is windows server 2008 sp1
I cannot find the "ApplicationPoolIdentity " in the Identity drop down box in the pool advance setting.
I think it just in 2008 sp2.
So, my current setting is like below
.net framework version : v2.0
Enable 32-bit applications : true
Managed Pipeline Mode : classic
Identity: LocalService (I use this setting, because as I know this setting has the most powerful)
Load User Profile: False
But the result is nothing changed.
So, I try everything in my local machine (window 7 enterprise, IIS 7.5)
I set Isapi mapping and CGI mapping.
and the pool setting is totally same to you said.
below is my test:
I get result :
Press the Enter key to exit.
I get result :
A pop box. title is : Do you want to open or save PerlHelloWorld.pl (43 bytes) from myServerName? (in Server 2008 sp1 always get this result, even I use local host)
Below is my PerlCode:
print "Content-type: text/plain\n\n";
print "Hello world!\n\n";
print "Press the Enter key to exit.\n";
Jun 03, 2011 09:37 AM|LINK
Why the perl host on IIS work correct in LocalHost url.
And not work in the ServerName URL
Is there the reason not the handler mapping but the IIS publish issue?
Jun 03, 2011 01:41 PM|LINK
General Note: For Web Servers and Script Engines have pretty much the same requirements for operations:
A ) A fully defined path to the Script Engine.
B) A short path to the Script Engine.
C) A method to deliver proper headers for first request.
D) A method to allow passing parameters as part of the Scripting Engine.
The format for parameters and passing values follow the general
rules for C, C++ and Main Function .
E) A mapping of an extension or Mime type that is a form of request for files.
F) Enabling the Web Server to allow the execution of the Script Engine.
G) Security restrictions for User Accounts, File System access that are in effect to protect the System.
H) The items A-G are true for PHP,Perl, Ruby,Python and others.
I) There may be variations for types of Web Servers, but you can generalize that A-G must be handled first.
The problem is likely that you have not enabled the Handler in IIS Server or in the location the script is running from.
Yes The items A-I from above are a long description for rules. If you use A-I as a general Work Flow all the scripting engines
Jun 07, 2011 07:05 AM|LINK
Now, I set the website ISAPIFilters
after all ISAPIFilters setting, I reset iis
Access the perl file by IE again.
the download Dialogure box has gone.
but, I get new error. like below
I have check the Perlis.dll permissions. I have add the IUSR and IIS_IUSRS , and give them full control right.
Error Summary :
Detailed Error Information
Most likely causes:
Things you can try:
<?xml version="1.0" encoding="UTF-8"?>
<add value="PerlHelloWorld.pl" />
Jun 07, 2011 09:46 AM|LINK
The Location section in applicationHost.config is like below:
<location path="Default Web Site/perlTest">
<remove name="CGI-exe" />
<remove name="ISAPI-dll" />
<remove name="Perl Script (PL)" />
<remove name="Perl Script (CGI)" />
<add name="ActiveState Perl for .pl" path="*.pl" verb="*" modules="IsapiModule" scriptProcessor="C:\Perl\bin\PerlEx30.dll" resourceType="Either" requireAccess="Script" preCondition="bitness32" />
<location path="Default Web Site">
<remove name="Perl Script (PL)" />
<add name="Perl Script (PL)" path="*.pl" verb="GET,HEAD,POST" modules="CgiModule" scriptProcessor="c:\Perl\bin\perl.exe "%s" %s" resourceType="Unspecified" />
<add name="Perl ISAPI" path="*.pl" verb="*" modules="IsapiModule" scriptProcessor="C:\Perl\bin\perlis.dll" resourceType="Unspecified" preCondition="bitness32" />
<filter name="PerlIsapiFilter" path="C:\Perl\bin\perlis.dll" preCondition="bitness32" />