Retrieving the COM class factory for component with CLSID {00020820-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 {00020820-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 {00020820-0000-0000-C000-000000000046} failed due to the following error: 80070005.] ExcelModule..ctor() +13 _Default.Button1_Click(Object sender, EventArgs e) +33 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +104 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) +5612
Chnage the identity imporsonate true in web.config or run the applictaion from a user account who has access to the applictaion that asp.net is accessing
can i ask some help? my asp.net website works fine (from filtering of data from database up to exporting into an excel file) in my local IIS. but after transferring it to a server the filtering of data is working but when i try exporting the data into an
excel file, here's what i got
Runtime Error
Description:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local
server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors>
tag should then have its "mode" attribute set to "Off".
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
I am facing the same issue for that you have suggested to do identity imporsonate true to avoid such error. But when i change the identity personate as true then i am not able to debug my code. Is this because of identity value change or anything
else? Also i got exception as
"Unspecified error".
Let me know if you have any clue about this issue.
i am also having the same it is working on debug when we deploy to server it is not working gettimg the same error i tried with the following urls http://forums.asp.net/t/1303594.aspx/1
but still iam getting the same error my envirmonemnt is windows server 2008 and iis 7.0 and office 2010 and used the apppool identity user as local service and impersonation is false if i make that ture the application not able to see the database server
psycho802
Member
1 Points
6 Posts
Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-000000000046} ...
Jul 29, 2008 04:48 AM|LINK
Retrieving the COM class factory for component with CLSID {00020820-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 {00020820-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:
Stack Trace:
[UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-000000000046} failed due to the following error: 80070005.]
ExcelModule..ctor() +13
_Default.Button1_Click(Object sender, EventArgs e) +33
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +104
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) +5612
vik20000in
All-Star
25882 Points
3993 Posts
MVP
Re: Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-0000000000...
Jul 29, 2008 05:01 AM|LINK
Chnage the identity imporsonate true in web.config or run the applictaion from a user account who has access to the applictaion that asp.net is accessing
www.vikramlakhotia.com
Please mark the answer if it helped you
psycho802
Member
1 Points
6 Posts
Re: Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-0000000000...
Jul 29, 2008 05:44 AM|LINK
thanks a lot sir. it works. thank you so much. =)
psycho802
Member
1 Points
6 Posts
Runtime Error
Jul 30, 2008 03:43 AM|LINK
hi there!
can i ask some help? my asp.net website works fine (from filtering of data from database up to exporting into an excel file) in my local IIS. but after transferring it to a server the filtering of data is working but when i try exporting the data into an excel file, here's what i got
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
even if i have already <customErrors mode="off"/> in my web.config. what should i do? any help?
thanks!
Vyom Dixit
Member
2 Points
1 Post
Re: Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-0000000000...
Dec 31, 2010 10:25 AM|LINK
Hi ,
I am facing the same issue for that you have suggested to do identity imporsonate true to avoid such error. But when i change the identity personate as true then i am not able to debug my code. Is this because of identity value change or anything else? Also i got exception as
"Unspecified error".
Let me know if you have any clue about this issue.
Thanks
Vyom Dixit
<asp.net>
ASP.Net Professional
Bhopal(MP)
gummadi
Member
5 Points
5 Posts
Re: Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-0000000000...
Apr 10, 2012 12:50 PM|LINK
i am also having the same it is working on debug when we deploy to server it is not working gettimg the same error i tried with the following urls http://forums.asp.net/t/1303594.aspx/1
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
http://prashantd.wordpress.com/2011/03/31/retrieving-the-com-class-factory-for-component-with-clsid-00024500-0000-0000-c000-000000000046-failed-due-to-the-following-error-80070005/
http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/a0cc4df1-9063-4aba-9469-4ea04dbfb459/
http://www.codeguru.com/forum/printthread.php?t=383912&page=2&pp=15
but still iam getting the same error my envirmonemnt is windows server 2008 and iis 7.0 and office 2010 and used the apppool identity user as local service and impersonation is false if i make that ture the application not able to see the database server
please give me some solution