<div> <div>hi all,</div> <div> i am facing a problem in connecting my ASP.net application to MS Excel. I am trying to write some data to an excel file and then the file is downloaded to the user. Ofcourse using the com component for this purpose. I
am using Visual Studio 2005 beta. When i execute it from visual studio using ASP.net development server, every thing works fine but when i access via internet explorer after publishing my website to wwwroot, i get an com component access denied error when
the application tries to write to the MS Excel file. </div> <div> </div> <div> I have given full control on the file to the ASP.net machine account as well as IIS user account, service account
and atlast when got fedup, i gave full contrrol to each account in my machine. Still the problem is as is.</div> <div> </div> <div> Appreciate if anybody could help.</div> <div> </div> <div>Regards </div> <div> To
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed with HRESULT: 0x80070005(Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))).</div></div>
Hi,
I am also getting the same error, except that i am trying to open a word document. It works fine when i run from visual studio environment, but when i try to access from another machine, i get this error: Someone please help if you have already worked on
opening a word document.(I am opening a word document and saving a copy of it with another name on the server.)
Server Error in '/SetupProject' Application.
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed with HRESULT: 0x80080005(Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))).
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.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed with HRESULT: 0x80080005(Server execution failed (Exception from HRESULT: 0x80080005
(CO_E_SERVER_EXEC_FAILURE))).
Source Error:
Line 122: protected void btnCreateDocument_Click(object sender, ImageClickEventArgs e)
Line 123: {
Line 124: Word.Application app = new Word.ApplicationClass();
Line 125: try
Line 126: {
I have exactly same problem using InDesign. I am also getting the same error. Please let me know if you already found a solution for it. Thanks in advance.
In case your system is 64bits and your office is 32bits you will not find the correct entries. Some people say to launch the console using mmc -32 and add the component services snappin. This did not work for me. I don't have the entries.
What I did is add the rights globally for network services like described here by irfangani:
1.Create directory "C:\Windows\SysWOW64\config\systemprofile\Desktop " (for 64 bit Windows) or "C:\Windows\System32\config\systemprofile\Desktop " (for 32 bit Windows)
2.Assign user "Network Services (Service Réseau) " the following rights for folder C:\Windows\System32\config\systemprofile\Desktop
None
0 Points
4 Posts
Com Component access denied to resource error in ASP.net
Oct 24, 2005 06:49 AM|atifahmed|LINK
None
0 Points
6 Posts
Re: Com Component access denied to resource error in ASP.net
Nov 18, 2005 04:12 PM|feminap26|LINK
I am also getting the same error, except that i am trying to open a word document. It works fine when i run from visual studio environment, but when i try to access from another machine, i get this error: Someone please help if you have already worked on opening a word document.(I am opening a word document and saving a copy of it with another name on the server.)
Server Error in '/SetupProject' Application.
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed with HRESULT: 0x80080005(Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))).
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.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed with HRESULT: 0x80080005(Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))).
Source Error:
None
0 Points
6 Posts
Re: Com Component access denied to resource error in ASP.net
Nov 22, 2005 04:04 PM|feminap26|LINK
I found a solution [:)]: You have to do the following:
run dcomcnfg
Click on Component services
computers
Mycomputers
DCOM comfig
select the application (Ex ms word) in your case it ms excel)
rt click – properties – security tab
all of them customize ..give permissions accordingly (access permissions too)
identity tab – this user – and type ur credentials
This worked for me though i am not aware of the security aspects by running it with your credentials.
None
0 Points
1 Post
Re: Com Component access denied to resource error in ASP.net
Aug 09, 2007 03:22 AM|Kamal Kumar|LINK
hi feminap26,
your right i also got same error. I was changed COM security changes then i solved my problem..
Thank You.
None
0 Points
1 Post
Re: Com Component access denied to resource error in ASP.net
Sep 22, 2008 11:04 AM|UsTKB|LINK
Member
86 Points
82 Posts
Re: Com Component access denied to resource error in ASP.net
Sep 25, 2008 09:50 PM|mydreams|LINK
A good answer. I have learn from it![:)]
Member
59 Points
222 Posts
Re: Com Component access denied to resource error in ASP.net
Nov 11, 2008 09:58 PM|goh6613|LINK
hi feminap26
i face this problem too......
my application is Adobe InDesign ...
my project return me this error
Retrieving the COM class factory for component with CLSID {296CAEB5-C99C-4B3E-9359-6E7D6EAE71FC} failed due to the following error: 80040154.
which is InDesign punya problem.....
i set it using DCOM comfig ......set Adobe InDesign Application {1041D8C8-B5E8-49c1-A0DD-9E593B1EB5D5}
but the problem still cannot solve.......and i found out that the application id is different...
did i set the correct application ?
hope that u can help me
thanks
Member
4 Points
110 Posts
Re: Com Component access denied to resource error in ASP.net
Jul 15, 2009 02:46 AM|calvinkwoo3000|LINK
Hi,
I have follow the instruction but i can't found ms excel or word from the DCOM Config.
Is there any alternative way to solve this problem without install microsoft in my server?
Member
40 Points
209 Posts
Re: Com Component access denied to resource error in ASP.net
Jul 16, 2009 01:21 AM|knowledgist|LINK
Maybe your system does not have the microsoft office suite OR your system is not a server machine.
None
0 Points
1 Post
Re: Com Component access denied to resource error in ASP.net
Apr 24, 2010 09:25 AM|sumanpal2004|LINK
Hi goh6613,
I have exactly same problem using InDesign. I am also getting the same error. Please let me know if you already found a solution for it. Thanks in advance.
Thanks,
Suman
None
0 Points
2 Posts
Re: Com Component access denied to resource error in ASP.net
Dec 05, 2010 10:07 PM|Jonx|LINK
In case your system is 64bits and your office is 32bits you will not find the correct entries. Some people say to launch the console using mmc -32 and add the component services snappin. This did not work for me. I don't have the entries.
What I did is add the rights globally for network services like described here by irfangani:
http://social.technet.microsoft.com/Forums/en/w7itproappcompat/thread/dde69147-a01a-4eb1-8ea9-31adbf874bed
Then you'll face other problems like file access errors.
Solve them like described here:
http://social.msdn.microsoft.com/Forums/en/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91
1. Create directory "C:\Windows\SysWOW64\config\systemprofile\Desktop " (for 64 bit Windows) or "C:\Windows\System32\config\systemprofile\Desktop " (for 32 bit Windows)
2. Assign user "Network Services (Service Réseau) " the following rights for folder C:\Windows\System32\config\systemprofile\Desktop
Read & Execute, List folder contents, Read
This worked for me...
John.
<div></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">1. Create directory "C:\Windows\SysWOW64\config\systemprofile\Desktop " (for 64 bit Windows) or "C:\Windows\System32\config\systemprofile\Desktop " (for 32 bit Windows)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">2. Assign user "Network Services (Service Réseau) " the following rights :</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">a. C:\Windows\System32\config\systemprofile\Desktop</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">i. Read & Execute, List folder contents, R</div>
None
0 Points
4 Posts
Re: Com Component access denied to resource error in ASP.net
Jun 13, 2011 07:53 AM|topsearchforyou|LINK
http://topsearchforyou.com/2011/06/13/applications-are-denied-access-to-resources-asp-net-iis-6/
Member
40 Points
209 Posts
Re: Com Component access denied to resource error in ASP.net
Sep 07, 2011 08:13 AM|knowledgist|LINK
hi atif,
follow this url:
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
hope this will help to you.
Mark as solution if your problem resolve by this url.
thank you!
None
0 Points
4 Posts
Re: Com Component access denied to resource error in ASP.net
Sep 10, 2014 11:48 AM|kakanisantosh|LINK
Dont Waste Time .... Please Try this it will work iam saying this with self Experience
DCOM comfig
select the application (Ex ms word) in your case it ms excel)
rt click – properties -- Select identity tab and select Interactive user Radio button and click Apply ok and ask me if it dosn't work
it is Solved Solution no need to restart the pc too
None
0 Points
2 Posts
Re: Com Component access denied to resource error in ASP.net
Sep 24, 2014 04:05 AM|Charlie3D|LINK
Good answer. Thank you.
COM DCOMCNFG
None
0 Points
1 Post
Re: Com Component access denied to resource error in ASP.net
Oct 11, 2016 08:04 PM|KenjiKo|LINK
Thanks kakanisantosh!! It works for me.