Microsoft Excel Application entry missing in DCOMCNFG
-
Wednesday, January 20, 2010 4:14 PMHi I'm using windows 7 home premium. I have an application in ASP.Net which uses Excel Application Object. It used to work fine in XP but in Windows 7 I'm getting an error as mentioned below:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
I need to give permissions to Microsoft Excel Application in DCOM config but I can't seem to find this in windows 7. It used to be there in earlier versions but now its not there. I tried to reinstall Office 2007 but still I couldn't find it in DCOM config. Please suggest where I can give permissions to MS Excel Application so that my application runs without errors.
Thanks
Irfan<!-- google_ad_section_end -->
All Replies
-
Thursday, January 21, 2010 5:40 AM
Hello,
In windows 7, follow these steps to open DCOM config:
1. Click start button, in start search bar, type in "DCOMCNFG.EXE" (without quote) and then press enter.
2. Click Computer->DCOM Config, locate component with CLSID {00024500-0000-0000-C000-000000000046}and modify the permission.If the error still happens, try to disable UAC and see if you application can work.
Thomas77- Proposed As Answer by Ramesh Swaminathan Friday, May 18, 2012 9:08 AM
- Unproposed As Answer by Ramesh Swaminathan Tuesday, May 22, 2012 4:31 AM
-
Thursday, January 21, 2010 6:54 AMHi,
Thanks for your reply. I tried to locate the component with the same Application ID but couldn't find it. I found somewhat similar ID {00021401-0000-0000-C000-000000000046} but not the exact one. Also on clicking properties, in securities tab, the edit buttons are disable. They are disabled even when I open the Component Services in elevated mode. Please suggest what needs to be done.
Thanks
Irfan -
Thursday, January 21, 2010 7:29 AM
Hello,
Did you see "Microsoft Excel Application" in DCOMCNFG? If yes, try to modify its Permission. Then modify the Permission of the following registry key:
HKEY_CLASSES_ROOT\CLSID
1. Open regedit, locate [HKEY_CLASSES_ROOT\CLSID]. Right click CLSID key and choose Permissions.
2. Click add, type in Everyone and then then "Allow" "Full control".
Thomas77- Proposed As Answer by swordfischer Friday, December 07, 2012 7:15 AM
-
Thursday, January 21, 2010 11:25 AMHi,
The entry is not there in DCOMCNFG (Neither "Microsoft Excel Application" nor "{00024500-0000-0000-C000-000000000046}"). But in registry I could find the CLSID {00024500-0000-0000-C000-000000000046}. Gave full permission to Everyone on that CLSID. Still I'm getting the same error.
Irfan -
Sunday, January 24, 2010 1:41 PM
Solved!
1. In DCOMCNFG, right click on the My Computer and select properties.
2. Choose the COM Securities tab
3. In Access Permissions, click "Edit Defaults" and add Network Service to it and give it "Allow local access" permission. Do the same for <Machine_name>\Users.
4. In launch and Activation Permissions, click "Edit Defaults" and add Network Service to it and give it "Local launch" and "Local Activation" permission. Do the same for <Machine_name>\Users
Press OK and thats it. i can run my application now.- Marked As Answer by irfangani Sunday, January 24, 2010 2:39 PM
-
Tuesday, July 13, 2010 6:57 PM
I'm so frustrated, I have similar issue. My app modifies a .xlsm workbook saves it to a temp file and response.writefile(TempFile) to the user.
I also get the error Microsoft Excel cannot access the file error. I gave permissions like irfangani said. I've checked permissions to the directory & file.
Nothing!
But it works great on my dev machine.
Thanks in advance!!
Here's the code ...
public string BuildExcelFile(string fileID, ref string err)
{
Microsoft.Office.Interop.Excel.Application oXL = null;
Microsoft.Office.Interop.Excel._Workbook oWB = null;
Microsoft.Office.Interop.Excel.Worksheet oSheet = null;
try
{
oXL = new Microsoft.Office.Interop.Excel.Application();
oXL.Visible = false;
oWB = (Microsoft.Office.Interop.Excel._Workbook)(oXL.Workbooks.Open("c:\\temp\\Exceptions.xlsm"));
oSheet = (Microsoft.Office.Interop.Excel.Worksheet)oWB.Sheets["Exceptions"];
string tempfile;
int ID;
if (int.TryParse(fileID, out ID))
oSheet.Cells[1, 3].Value = ID;
oWB.Application.Run("Module1.GetExceptionData");
tempfile = GetTempFile();
oWB.SaveAs(tempfile, FileFormat: 52);
// Need all following code to clean up and extingush all references!!!
oWB.Close(null, null, null);
oXL.Workbooks.Close();
oXL.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject(oXL);
System.Runtime.InteropServices.Marshal.ReleaseComObject(oSheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject(oWB);
oSheet = null;
oWB = null;
oXL = null;
GC.Collect(); // force final cleanup!
return tempfile;
}
catch (Exception e)
{
err = e.Message;
return "";
}
}
public string GetTempFile()
{
string filename;
filename = "c:\\temp\\excp" + DateTime.Now.TimeOfDay.TotalSeconds.ToString().Replace(".","") + ".xlsm";
return filename;
}
-
Wednesday, August 18, 2010 5:34 AM
Can someone plz help me!!!facing the same problem...still no solution.
Already wasted 2 full days :(. I'm unable to find the entry(Micrsoft Excel Application) in DCOMCNFG. Or how to get the Application Id of Excel. Also when I try to edit the permissions of any entry....its disabled. Some security settings??
HELP!!!!!!
-
Friday, August 27, 2010 2:29 PM
I gave up and went a different direction. I don't know if my solution will help you, but instead of running my query and building the report in server-side Excel. I put the report request in a queue for that user. I Response.Write the Xlsm file out, and when Excel Opens the file I have code in the Open Event that retrieves the request and builds the report on the client side, this way I totally avoid server-side Excel automation.
Hope that helps.
-
Wednesday, November 03, 2010 2:38 PM
On 64 bit system with 32 bit Office try this:
- Start
- Run
- mmc -32
- File
- Add Remove Snap-in
- Component Services
- Add
- OK
- Console Root
- Component Services
- Computers
- My Computer
- DCOM Config
- Microsoft Excel Application
- ...
- Proposed As Answer by Ivjay Wednesday, February 09, 2011 5:40 PM
-
Tuesday, December 07, 2010 9:55 PM
You can start DCOMCNFG in 32-bit mode using:
DCOMCNFG -32
-
Tuesday, March 13, 2012 5:52 PMJust press Refresh on Console Root | Component Services | Computers | My Computer | DCOM Config to get Microsoft Excel displayed in the list.
-
Monday, April 02, 2012 6:39 PMIvjay you rock, this recommendation added with the fact of setting the application to run on "the interactive user" on the identity portion solved the issue (as describe on http://blogs.msdn.com/b/dataaccesstechnologies/archive/2011/01/22/the-ssis-and-excel-story-continues.aspx). Finally this simple task is out of my WIP bin. Thank you all!
-
Tuesday, July 24, 2012 2:37 PM
This Solution worked for meSolved!
1. In DCOMCNFG, right click on the My Computer and select properties.
2. Choose the COM Securities tab
3. In Access Permissions, click "Edit Defaults" and add Network Service to it and give it "Allow local access" permission. Do the same for <Machine_name>\Users.
4. In launch and Activation Permissions, click "Edit Defaults" and add Network Service to it and give it "Local launch" and "Local Activation" permission. Do the same for <Machine_name>\Users
Press OK and thats it. i can run my application now. -
Tuesday, July 24, 2012 2:38 PM
Ivjay Thanks a lot. Your steps finally worked for me.
Thank you so much for your contribution.
-
Tuesday, July 24, 2012 2:39 PM
On 64 bit system with 32 bit Office try this:
It worked for me. Thank you so much
- Start
- Run
- mmc -32
- File
- Add Remove Snap-in
- Component Services
- Add
- OK
- Console Root
- Component Services
- Computers
- My Computer
- DCOM Config
- Microsoft Excel Application
- ...
-
Tuesday, July 24, 2012 10:55 PM
This helped me.
I found that I only needed to give my IIS AppPool (e.g. "IIS APPPOOL\DefaultAppPool") the "Local Activation" in the "Launch and Activation Permissions".
-
Tuesday, August 28, 2012 4:40 PM
That's it! Works like charm!
-
Saturday, September 15, 2012 9:41 AM
Solved!
1. In DCOMCNFG, right click on the My Computer and select properties.
2. Choose the COM Securities tab
3. In Access Permissions, click "Edit Defaults" and add Network Service to it and give it "Allow local access" permission. Do the same for <Machine_name>\Users.
4. In launch and Activation Permissions, click "Edit Defaults" and add Network Service to it and give it "Local launch" and "Local Activation" permission. Do the same for <Machine_name>\Users
Press OK and thats it. i can run my application now.Hi Irfan,
Thanks a Ton.
This one helped me for COM exception while accessing internet explorer.
Am trying to print a HTML on serverside via WCF+IIS
For reference :
http://stackoverflow.com/questions/12423108/shdocvw-internetexplorer-printing-serverside-failing-com-exception
Regards,
Pavan N
Pavan N Kumar
- Edited by Pavan Kumar Nagumalli Saturday, September 15, 2012 9:42 AM
-
Tuesday, October 30, 2012 2:28 PM
Thanks - that is brilliant!
After wasting a whole day - Why do MS keep introducing crap like this that just makes everyone's lives miserable? Or do they think developers have nothing better to do than wade through all the restrictions they put in their way?
-
Thursday, November 08, 2012 6:26 AMThis solution worked for me. Thank you very much.
-
Friday, March 08, 2013 7:54 AMWhat are the steps 4 and 5. I didn`t get. Please reply.
ira
-
Saturday, March 23, 2013 9:29 PM
Solved!
1. In DCOMCNFG, right click on the My Computer and select properties.
2. Choose the COM Securities tab
3. In Access Permissions, click "Edit Defaults" and add Network Service to it and give it "Allow local access" permission. Do the same for <Machine_name>\Users.
4. In launch and Activation Permissions, click "Edit Defaults" and add Network Service to it and give it "Local launch" and "Local Activation" permission. Do the same for <Machine_name>\Users
Press OK and thats it. i can run my application now.Hi irfangani,
I did the steps but it still does not appear on the Excel.Application component services.
What else might I need to do?
e-mail address: newyazilim@hotmail.com
respects

