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

Hi
I am trying to call the Win32::OLE->new('Excel.Application') in my cgi application which is running in win 2003 server, but it throws the below mentioned error.
"Win32::OLE(0.1403) error 0x80070005: Access is denied"
My Application, Perl files and the Microsoft Excel is running in the same root directiory i.e.
D:/Applications/My Application/
D:/Applications/Perl/
D:/Applications/Microsoft Office/Office/Excel.Exe
Is there any configuration settings I have to take care or please let anyone can help me to handle the above error
  • Comment on Win32::OLE error 0x80070005: Access is denied

Replies are listed 'Best First'.
Re: Win32::OLE(0.1403) error 0x80070005: "Access is denied"
by puploki (Hermit) on Nov 03, 2005 at 09:04 UTC

    If you run your Perl script from the command line, does it run ok? i.e. is it just that it doesn't work when called through a browser?

    If that's the case, then it's likely to be permissions related, e.g. check that the IUSR_machinename account has execute permissions and that it has write access to any temporary files you use. You may also want to check that in IIS, you have enabled scripts + executables permissions on your website / virtual directories.

    A quick super search showed up a similar case from not so long ago: win32::ole runs under cmd line but not cgi, perhaps some of the hints there may help?

      Thanks puploki

      As you said my script is not running properly in commnad line, but where as I am running my application in Apache not in IIS , so Explain me briefly how to handle this

        In the node I mentioned in my first post, I think that's Apache not IIS - did you take a look at it?

        I assume the same comments apply - check that the user Apache runs as has all the relevant permissions. I'm also not quite clear from your reply whether running your script outside of Apache works or not - if it doesn't then I'd say you need to fix that before addressing any problems with running it via CGI.