Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
Example Application
The problem is that by default Microsoft Excel as a COM object can only activated by the following accounts:
- Administrator
- System
- Interactive
When you are running your ASP.Net account on Windows XP your web application is running as the ASPNET account.
The way to resolve this issue is to edit the DCOM configuration settings for the Microsoft Excel Application object.
Configure DCOM
- Go to the Start-Run menu item.
- Type in "DCOMCNFG" and hit enter.
- This should load the "Component Services" MMC (you can also load from Administrative Tools - Component Services"
- Expand "Component Services"
- Expand "Computers"
- Expand "My Computer"
- Select the "DCOM Config" item
- Select the "Microsoft Excel Application" item.
- Right click and select Properties
- Select the Security Tab and you should see the following:
- Under "Launch and Activation Permissions" select the "Customize" option.
- Click the "Edit" button
Windows XP
Windows 2003 Server
- Click the "Add" button to add a new account to the list.
- On the dialog that is displayed click the Locations button
(this is because by default your domain will be selected and we need a local account)
In this dialog scroll the list to the top (sometimes the first item is not visible) but scroll to the top and select the first item which is your computer name. In the list below "CCROWE" is the name of my computer.
- Click the OK button
- On the dialog that is displayed enter "ASPNET" as the account name (make sure location is set to the name of the computer that IIS is on) on Windows XP or if you are running on Windows 2003 Server you must enter the account that the Application Pool is running as, by default "Network Service"
Windows XP
Windows 2003 Server
Note: A quicker way on Windows XP is to just enter the computer name and the account
so in my case that would be:
ccrowe\ASPNET - Click the OK button
- Now make sure you select the following options for the "ASP.NET Machine Account" or the account that is the application pool identity ( by default Network Service)
- Local Launch : Allow
- Remote Launch : [blank]
- Local Activation : Allow
- Remote Activation : [blank]
These settings can be seen below:
-
Windows XP
Windows 2003 Server
-
Click the OK button and test your web application again and it should work fine.
Note: Remember if you are running on Windows 2003 Server you must use the application pool identity as the account and not the ASPNET account.
posted on Thursday, March 02, 2006 4:18 AM | Filed Under [ ASP.Net c# IIS ]
================================================
COM Security in Practice
http://msdn.microsoft.com/en-us/library/ms810014.aspx
Configuring DCOM for Remote Access
http://j-integra.intrinsyc.com/support/com/doc/remoteaccess.html
“Retrieving the COM class factory for component with CLSID”及调试工具
http://winsky2000.spaces.live.com/blog/cns!b9c10ca6c0602231!304.entry
FileMon for Windows v7.04
http://technet.microsoft.com/zh-cn/sysinternals/bb896642(en-us).aspx
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005.
http://66.129.67.4/p/1199925/2089713.aspx
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY