IIS 7 and Above
Last post May 09, 2015 06:35 AM by lextm
May 08, 2015 04:58 PM|Russ_W|LINK
I've got IIS8 working with fastcgi & perl in general, but when my test perl script tries to use Win32::OLE to create a COM object, the weirdness begins in earnest. If I run the perl script in a cmd.exe window, it works fine. The script attempts to create
two different COM objects:
Again, from cmd.exe window it works fine. The user account I'm using is in the local administrators group. The same user is being used for the DefaultAppPool, so I'm pretty sure it's not security related. Here's what's weird: creating the COM object when
the script executes in the fastcgi context fails with 0x800401f3 'Invalid class string'. So, I built a debug version of the Win32::OLE perl module & stuck a whole bunch of debugging messages in it. The call to CLSIDFromProgID is the culprit. Same object, works
in one context and not the other. So, I fired up procmon to see what I could find there. This turned up a 'CreateFile' from perl.exe on 'C:\perl\bin\%systemroot%\Registration\R000000000012.clb', which clearly fails with 'PATH NOT FOUND'. Just for grins, I
created a symlink in c:\perl\bin named '%systemroot%'. With that in place, creating the 'Scripting.FileSystemObject' object actually works, but not the 'clearquest.session'.
So, my general question is: what is different between the context of running from a command window vs. under IIS's fastcgi module that would cause this behavior and is there anything I can do to alter it?
A few items I forgot to mention:
May 09, 2015 06:35 AM|lextm|LINK
IIS FastCGI is for PHP primarily, so when you use Perl any issue can be expected.
Have you tried HttpPlatformHandler? http://www.iis.net/learn/extensions/httpplatformhandler/httpplatformhandler-configuration-reference
That is designed for general usage and can integrate a lot of third party frameworks with IIS.