locked
Error when creating Excel worksheets with VB.NET: 80070005 Access is denied RRS feed

  • Question

  • Hi,

    I'm trying to generate Office 2010 files (xlsx) in a vb.net project (Visual Studio 2010 fw 4.0).
    On my developing PC it works. Once on the server it generates an error:

    Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

    On the server I tried with dcomcnfg and navigate to DCOM Config and locate Excel. To solve the problem I would have chosen Customize in the Security tab under Launch and Activation Permissions and add the account under which the site is running (our server task user) and assign Local Launch & Local Activation permissions.

    But I can't find Excel there, even when I look for CLSID {00024500-0000-0000-C000-000000000046}, although Office 2010 (including Excel) is installed on the server.

    The error occurs on the moment this code is executed:

    m_Excel = NewMicrosoft.Office.Interop.Excel.Application

    Where m_Excel is defined as:

    Privatem_Excel As Microsoft.Office.Interop.Excel.Application

    Anybody an idea where it goes wrong or why it goes wrong on the server.

    Thanks

     

    RuWel

     

     

    Thursday, September 8, 2011 11:55 AM

Answers

  • Hi,

     

    The server is a 64-bit server. As we installed the 32-bit Access on it, it doesnt show in the standard (64-bit) DCOM Config.

    It shows it in the 32-bit config of the server.

     

    Thanks anyway

     

    Ruwel

    • Marked as answer by RuWel Monday, September 12, 2011 9:37 AM
    Monday, September 12, 2011 9:37 AM

All replies

  • Server-side automation of the Microsoft Office applications is not supported:

    Considerations for server-side Automation of Office

     


    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Proposed as answer by Mike Feng Monday, September 12, 2011 7:21 AM
    Thursday, September 8, 2011 1:49 PM
  • Hi,

     

    The server is a 64-bit server. As we installed the 32-bit Access on it, it doesnt show in the standard (64-bit) DCOM Config.

    It shows it in the 32-bit config of the server.

     

    Thanks anyway

     

    Ruwel

    • Marked as answer by RuWel Monday, September 12, 2011 9:37 AM
    Monday, September 12, 2011 9:37 AM