Failed to create COM object : Access is denied. (IIS6/PHP/FastCGI) RRS feed

  • Question

  • User326339453 posted


    Just moved from Apache 2.x to IIS6 (running on Windows Server 2003). I'm using FastCGI for my PHP application on IIS6. All settings very done accordingly to article http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/

    Everything works pretty fine but pages where I'm using COM objects (excel,word) failed with 500 Internal Server error. Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `excel.application': Access is denied. ' in I:\AlphaWorks\reports\_form81.php:10 Stack trace: #0 I:\AlphaWorks\reports\_form81.php(10): com->com('excel.applicati...') #1 {main} thrown in I:\AlphaWorks\reports\_form81.php on line 10

    I could not find any info related to this problem. could anybody help me to find out what settings i should configure to allow access to create COM object on my application!

    thanking in advance. 



    Sunday, January 18, 2009 2:41 AM


All replies

  • User1073881637 posted

    Most likely if you have the Excel libraries on web server, then you need to grant the permissions in the COM+ package.

    I'd try running a utility called Regmon to see if there is registry permissions you need.  Also, enable auditing and see what is logged in the security event log..  between the two articles, using auditing and regmon, it should help find some permissions isuses.




    Sunday, January 18, 2009 9:12 PM
  • User-823196590 posted

    If you calling Word or Excel in your ASP.NET code, not only is that a bad idea but it's also not supported.  See: http://support.microsoft.com/kb/257757

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, January 19, 2009 1:47 PM
  • User744767459 posted


    We do not recommend the server-side automation of office. 

    But you can elevate the account's privilege temporarily,  then test if that is the cause. For example you can set your application pool identity(IIS manager->your application pool->properties->identity) to "local system". Also if you enabled the anonymous authentication(IIS manager->your website->properties->directory security->authentication and access control), using an account that is in the Administrators group for anonymous access.

    Friday, January 23, 2009 7:00 AM