Cannot Instantiate Excel Application RRS feed

  • Question

  • User658205007 posted

    Hi All,

    I'm trying to instantiate an Excel Application on my Windows 2003 (x64) Server.  Like most people, the application run perfectly on my local XP machine.  Here's what I have done so far:

    1) Installed Excel 2007 (just Excel, not the entire Office Standard suite)

    2) Installed the Office Interop Assemblies (http://www.microsoft.com/downloads/details.aspx?FamilyID=59daebaa-bed4-4282-a28c-b864d8bfa513&displaylang=en)

    3) Set launch permissions for NETWORK SERVICE and ASPNET using DCOMCNFG

    4) Installed .net 3.5


    The only error being generated is the 'Object reference not set to an instance of an object' and I only get that if I leave in the line 'xLapp.Quit();'.  If I remove that line of code it runs error free.  Every time I attempt to run the application I monitor the processes to see if EXCEL.EXE initiates, but nothing yet.

    If you have any suggestions or clues as to why this is happening please pass them on.



    Friday, May 1, 2009 9:58 AM


  • User658205007 posted

    Resolved once I added this to the web.config file.

    <identity impersonate="true" userName="WindowsDomain\YourUserName" password="YourPassword" />

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 1, 2009 4:13 PM