Hi,
I am creating an application for Generate Excel With Multiple Sheet from DataSet.
But I am getting an error after running the application
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
If i run application through default web server then applications works fine but on localhost ie custom server this error occurs
I am using IIS7 and .net 4.0 version
please help with this
Thanks,
Archana
Loading

Pankaj PandeyRank #642 · 3.7K reputationPosted May 8, 2013, 1:43 AM EDT
Go to the folder From where your Excel File is stored or read.
Go to property, sharing and share that folder for everyone.
This error will remove.
Thanks...
Mark as Answered if error removed
Archana Patil42 reputationPosted May 8, 2013, 2:03 AM EDT
Pankaj PandeyRank #642 · 3.7K reputationPosted May 8, 2013, 2:07 AM EDT
Archana Patil42 reputationPosted May 8, 2013, 2:10 AM EDT
Pankaj PandeyRank #642 · 3.7K reputationPosted May 8, 2013, 2:12 AM EDT
Archana Patil42 reputationPosted May 8, 2013, 2:15 AM EDT
Pankaj PandeyRank #642 · 3.7K reputationPosted May 8, 2013, 2:16 AM EDT
Archana Patil42 reputationPosted May 8, 2013, 2:19 AM EDT
Pankaj PandeyRank #642 · 3.7K reputationPosted May 8, 2013, 2:28 AM EDT
Code is correct and working on my pc from wwwroot.
Archana Patil42 reputationPosted May 8, 2013, 2:34 AM EDT
also
properties > Sharing > Advance Sharing > share folder > user select (every one) > given all rights
Archana Patil42 reputationPosted May 8, 2013, 2:36 AM EDT
Pankaj PandeyRank #642 · 3.7K reputationPosted May 8, 2013, 2:41 AM EDT
Try one another way.
Put your excel folder in application folder and put your application folder in wwwroot also.
THer give all right and share your wwwroot folder .
also change path in your code.
then try it.
Pankaj PandeyRank #642 · 3.7K reputationPosted May 8, 2013, 2:53 AM EDT
But Not sure.
Try once that i suggested then lets see, what the problem shows.
Archana Patil42 reputationPosted May 8, 2013, 2:56 AM EDT
Do I need to do any settings in IIS to fix this problem
Pankaj PandeyRank #642 · 3.7K reputationPosted May 8, 2013, 3:05 AM EDT
wwwroot is a folder where IIS user have fully right in default.
that's the reason i said to put ur application in root file.
Pankaj PandeyRank #642 · 3.7K reputationPosted May 8, 2013, 3:09 AM EDT
http://www.vbforums.com/showthread.php?657928-failed-due-to-the-following-error-80070005-Access-is-denied.
http://www.dotnetfunda.com/forums/thread5791-failed-due-to-the-following-error-80070005-access-is-denied.aspx
Archana Patil42 reputationPosted May 8, 2013, 4:01 AM EDT
waheed rous2 reputationPosted Jan 26, 2014, 7:22 PM EST
SaiKiran Mandhala17 reputationPosted Apr 29, 2014, 3:34 AM EDT
You can solve this Access Denied in different ways.
Appr 1: You can set the user identity at Application Pool Level or impersonate the user in web.config.
If that doesn't work try this,
Appr 2:
3.Change the security settings of Microsoft Excel Application in DCOM Config.
Controlpanel --> Administrative tools-->Component Services -->computers --> myComputer -->DCOM Config --> Microsoft Excel Application.
Right click to get properties dialog. Go to Security tab and customize permissionsgive the read / write permission to the IIS user or group users
Start -> run -> inetmgr
enable the ASP.NET authentication for your default website
3. For 64-bit (x64), create this folder: C:\Windows\SysWOW64\config\systemprofile\Desktop
For 32-bit (x86), create this folder: C:\Windows\System32\config\systemprofile\Desktop
The windows service, if running under the systemprofile, needs the Desktop folder. This folder was automatically created on XP and older Windows Server versions, but not for Vista and Windows 2008 Server.
Hope one of these steps should fix your issue.
C Sharp develpoer2 reputationPosted Oct 29, 2014, 1:18 AM EDT
If the account which is running EXCEL is administrator then this will work:
For 64-bit (x64), create this folder: C:\Windows\SysWOW64\config\systemprofile\Desktop
For 32-bit (x86), create this folder: C:\Windows\System32\config\systemprofile\Desktop
Otherwise To resolve this issue follow these steps:
1. Login to your Server as a administrator
2. Go to "Start" -> "Run" and enter "MMC comexp.msc /32"
3. Go to the properties of Microsoft Excel Application, under Identity, change it to The Interactive User from The Launching User (which is set by default).
4. Go to the properties of Microsoft Office Excel 2007 Workbook, under Identity, change it to The Interactive User from The Launching User (which is set by default).
5. Go to Security tab for Microsoft Excel Application and select Customize for
" Launch and Activation Permissions" and add ACCOUNT (under which EXCEL is running) to it and give it "Local launch" and "Local Activation" permission
6. Go to Security tab for Microsoft Office Excel 2007 Workbook and select Customize for
" Access Permissions " and add ACCOUNT (under which EXCEL is running) to it and give it "Local Access" permission