none
error: 80070005

    Question

  • We have a .NET web application that will be used as a stand-alone system when the client is not able to get to the internet. We need the ability to open up a document in it's applicaton as opposed to just a browser window for editing purposes. Following is the error...

     

    Retrieving the COM class factory for component with CLSID {000209FF-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 {000209FF-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:

    Line 257:        {
    Line 258:
    Line 259:            Word.Application WordApp = new Word.Application();
    Line 260:            object filepath = Server.MapPath("~/" + Session["_WellName"].ToString() + "/" + filename);
    Line 261:            object readOnly = false;

    Source File: c:\Inetpub\wwwroot\wellsite\TWMS\WCProjectDefinition1.0\1.1\1_1_1.aspx.cs    Line: 259

    Stack Trace:

    [UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.]
       TWMS_WCProjectDefinition1_0_1_1_1.GridView1_RowEditing(Object sender, GridViewEditEventArgs e) in c:\Inetpub\wwwroot\wellsite\TWMS\WCProjectDefinition1.0\1.1\1_1_1.aspx.cs:259
       System.Web.UI.WebControls.GridView.OnRowEditing(GridViewEditEventArgs e) +133
       System.Web.UI.WebControls.GridView.HandleEdit(Int32 rowIndex) +40
       System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +694
       System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +199
       System.Web.UI.WebControls.GridView.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) +174
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
    

     

    Has anyone dealt with this issue before and know a work around?

     

    Thanks,

     

    Cara

    Tuesday, August 07, 2007 3:26 PM

Answers

All replies

  • Wednesday, August 08, 2007 10:26 AM
  • After adding the identity to the web.config file issue got resolved.

    <identity impersonate="true"/>,

    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.


    Thanks for the help.

    gv
    Tuesday, July 08, 2008 8:29 PM