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
Name: DefaultAppPool
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)
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:
PerlHelloWorld.pl
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
print "Hello world!\n\n";
print "Press the Enter key to exit.\n";
<>; #pause
Calling GetProcAddress on ISAPI filter "C:\Perl\bin\perlis.dll" failed
Detailed Error Information
<div id="details-left">
Module
IIS Web Core
Notification
Unknown
Handler
ActiveState Perl for .pl
Error Code
0x8007007f
</div><div id="details-right">
Requested URL
http://localhost:80/perlTest/PerlHelloWorld.pl
Physical Path
C:\TextCatIIS\PerlHelloWorld.pl
Logon Method
Not yet determined
Logon User
Not yet determined
</div>
Most likely causes:
The ISAPI Filter has dependencies that are not available on the Web server.
IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
IIS was not able to process configuration for the Web site or application.
The authenticated user does not have permission to use this DLL.
Things you can try:
Try running Reskit tool "depends" on the ISAPI DLL.
Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
Check the event logs to see if any additional information was logged.
Verify the permissions for the DLL.
Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click
here.
HCamper
8048 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
May 31, 2011 09:10 AM|LINK
Hello,
Check this post also http://forums.iis.net/p/1178048/1981396.aspx#1981396 .
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.
Martin
Community Member Award 2011
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
May 31, 2011 09:47 AM|LINK
Thanks HCamper,
Let me check the link you send to me.
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 01, 2011 02:45 AM|LINK
Hi HCamper,
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-5.12.3.1204-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
PS.
1) I still set the DefaultAppPool, .netframework : v4.0 ; Identity : NetworkService ; Load User Profile : false
2) I remove the CgiModule Handler mappings.
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 01, 2011 08:04 AM|LINK
BTW,
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
HCamper
8048 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 01, 2011 12:35 PM|LINK
Hello,
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 http://learn.iis.net/page.aspx/624/application-pool-identities/ .
General Note: You can have several Handlers and mappings for perl to use CGI and SCRIPT you create
each with unique name and settings.
Martin
Community Member Award 2011
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
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
Name: DefaultAppPool
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:
1. http://localhost/PerlTest/PerlHelloWorld.pl
I get result :
2. http://myServerName/PerlTest/PerlHelloWorld.pl
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:
PerlHelloWorld.pl
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
print "Hello world!\n\n";
print "Press the Enter key to exit.\n";
<>; #pause
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
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?
HCamper
8048 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 03, 2011 01:41 PM|LINK
Hello,
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 .
Reference: http://en.wikipedia.org/wiki/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
will work.
Martin
Community Member Award 2011
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 07, 2011 07:05 AM|LINK
Now, I set the website ISAPIFilters
Name: PerlISAPIFilter
Executable: C:\Perl\bin\perlis.dll
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 :
HTTP Error 500.0 - Internal Server Error
Calling GetProcAddress on ISAPI filter "C:\Perl\bin\perlis.dll" failed
Detailed Error Information
<div id="details-left">Logon User
Most likely causes:
Things you can try:
======================Web.config===============================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="PerlHelloWorld.pl" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 07, 2011 09:46 AM|LINK
The Location section in applicationHost.config is like below:
<location path="Default Web Site/perlTest">
<system.webServer>
<handlers>
<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" />
</handlers>
</system.webServer>
</location>
<location path="Default Web Site">
<system.webServer>
<handlers>
<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" />
</handlers>
<isapiFilters>
<filter name="PerlIsapiFilter" path="C:\Perl\bin\perlis.dll" preCondition="bitness32" />
</isapiFilters>
</system.webServer>
</location>