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
C Sharp develpoerPosted Oct 29, 2014, 5:18 AM
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
SaiKiran MandhalaPosted Apr 29, 2014, 7:34 AM
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.
This should work. Make sure that the user has the access to the Folder.
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.
waheed rousPosted Jan 27, 2014, 12:22 AM
Archana PatilPosted May 8, 2013, 8:01 AM
Pankaj PandeyPosted May 8, 2013, 7:09 AM
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
Pankaj PandeyPosted May 8, 2013, 7:05 AM
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.
Archana PatilPosted May 8, 2013, 6:56 AM
Do I need to do any settings in IIS to fix this problem
Pankaj PandeyPosted May 8, 2013, 6:53 AM
But Not sure.
Try once that i suggested then lets see, what the problem shows.
Pankaj PandeyPosted May 8, 2013, 6:41 AM
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.
Archana PatilPosted May 8, 2013, 6:36 AM
Archana PatilPosted May 8, 2013, 6:34 AM
also
properties > Sharing > Advance Sharing > share folder > user select (every one) > given all rights
Pankaj PandeyPosted May 8, 2013, 6:28 AM
Code is correct and working on my pc from wwwroot.
Archana PatilPosted May 8, 2013, 6:19 AM
Pankaj PandeyPosted May 8, 2013, 6:16 AM
Archana PatilPosted May 8, 2013, 6:15 AM
Pankaj PandeyPosted May 8, 2013, 6:12 AM
Archana PatilPosted May 8, 2013, 6:10 AM
Pankaj PandeyPosted May 8, 2013, 6:07 AM
Archana PatilPosted May 8, 2013, 6:03 AM
Pankaj PandeyPosted May 8, 2013, 5:43 AM
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