Error 80070005

Hello,

I developed for 4 month a web site with visual studio 2005. The site runs using VS2005. Mathematical computations have been done using EXCEL (Microsoft.Office.Interop.Excel). When running the site under IIS (XP pro), I get the message detailled under. I tried to give permissions on EXCEL to IUSR_MACHINENAME, then to everybody without results.
It will be impossible to deploy the site until this error is solved. Thank you to help me.

Server Error 80070005 in '/SiteOPCVM' Application.
--------------------------------------------------------------------------------

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.]
Portefeuille..ctor(String nom, Boolean kas) +130
AppDat.lookPtf(Int64 paidt, String nomptf, String ddu, String dau) +67
Titres.BcmdPtf_Click(Object sender, EventArgs e) +438
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42




Answer this question

Error 80070005

  • FBorda

    Just change the security settings of Microsoft Excel Application in DCOM Config.

    for those who may need this info, here is what has to done.

    goto Controlpanel --> Administrative tools-->Component Services -->computers --> myComputer -->DCOM Config --> Microsoft Excel Application.

    right click to get properties dialog. Goto Security tab and customize permissions accordingly.

    Thanks & Regards.

    Jasjeet Singh



  • december_i

    With two more days an good answer at last. I will give a summary of the solution in my own language:

    • -Panneau de configuration : outil d’administration
    • -Services de composants
    • -Configuration DCOM
    • -Selectionner Application EXCEL
    • -proprietes onglet securite
    • -personnaliser les autorisations d'execution et d'activation (bouton modifier)
    • -ajouter a la liste des utilisateurs ASP.NET et donner les toutes les autorisations

    thank to everybody



  • Dylan Smith

    Hi, Puybaret jean-claude ,

    I am Angie here. I am doing a warehouse online application which using VS.NET 2005. As you know, there are a lot of calculation for the stock level in and out. So, I have a lot reports that need a plenty of calculation and lastly need to display out in excel format where I create the object for Excel.Application too. And save the file after complete calculation. Can I set it to save into local computer Or by default, where is the file will save

    I faced the same problem as u before. When I login in to the web site (My local IIS), it give me the exactly the same to your error message posted. But In fact, I need to post it to our web server (Window Server 2003) which located out of my office.

    Since u have successfully solve the problem. Can you please translate your solution above in English. I am very sorry that I can read and understand that.

    And one more question. Is it that I must install the Microsoft office software into my Window Server 2003 as well to get it run

     

    Really appreciate if you can help me up.

    Angie



  • msaradhi

    Also check if the IIS account has read access to the HKCR\CLSID registry key. I've seen this messed up before...


  • hey_ian

    I suposed that the IIS Account is the ASPNET user. I gave this user and all user implied (IUSR_MACHINENAME & IWAM_MACHINENAME ) in a local website a total control on EXCEL.EXE and in the register for CLSID {00024500-0000-0000-C000-000000000046}.

    The problem remains. It hurts very badly.



  • gburgess

    Angie,

    I really have no idea what language he was speaking in, but this is the best translation I can figure out:

    1. Control Panel -> Administrative Tools -> Component Services

    2. Console Root -> Component Services -> Computers -> My Computer -> DCOM Config

    3. Right-Click 'Microsoft Excel Application' and choose Properties

    4. Click 'Security' tab

    5. Customize 'Launch and Activation Permissions'

    6. Add the local ASPNET user and give it all permissions

    Matt Price



  • Error 80070005