473,498 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Excel interop problem. Access is denied.

Hi .I cant seem to find a way to authorize asp.net user to create an Excel
application using this: Microsoft.Office.Interop.Excel.ApplicationClass
excel = new Microsoft.Office.Interop.Excel.ApplicationClass();

I keep getting this error:
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))).
I already assigned permissions to asp.net user in Control Panel->Component
Services-> DCOM Config->Microsoft Excel Application, but I am still unable
to create the Excel application.

(Windows XP Pro, Visual Studio.NET 2 Beta 2, Office 2003 Pro)

Please help!
Nov 19 '05 #1
2 12642
Microsoft (and I) recommend not using COM Interop with Microsoft Office
products from an ASP.NET web page. Excel was not designed to be used in
this way. If you're determined to do it anyway, these articles gives you
the ins and outs along with some better alternatives:

http://SteveOrr.net/articles/ExcelExport.aspx
http://SteveOrr.net/articles/ExportPanel.aspx

And here's a good 3rd party component you could use:
http://www.aspose.com/Products/Aspose.Excel

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Alex D." <al********@hotmail.com> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Hi .I cant seem to find a way to authorize asp.net user to create an Excel
application using this: Microsoft.Office.Interop.Excel.ApplicationClass
excel = new Microsoft.Office.Interop.Excel.ApplicationClass();

I keep getting this error:
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))).
I already assigned permissions to asp.net user in Control Panel->Component
Services-> DCOM Config->Microsoft Excel Application, but I am still unable
to create the Excel application.

(Windows XP Pro, Visual Studio.NET 2 Beta 2, Office 2003 Pro)

Please help!

Nov 19 '05 #2
Problem is that at the beginning I used the lightweight OWC (Office Web
Components) but for some reason the calculations were wrong!! I just
populated some textboxes with the original content in the sheet cells and
the contents where different, even without changing anything.
Is there any bug in OWC, or am I missing something??

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:Oq**************@TK2MSFTNGP12.phx.gbl...
Microsoft (and I) recommend not using COM Interop with Microsoft Office
products from an ASP.NET web page. Excel was not designed to be used in
this way. If you're determined to do it anyway, these articles gives you
the ins and outs along with some better alternatives:

http://SteveOrr.net/articles/ExcelExport.aspx
http://SteveOrr.net/articles/ExportPanel.aspx

And here's a good 3rd party component you could use:
http://www.aspose.com/Products/Aspose.Excel

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Alex D." <al********@hotmail.com> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Hi .I cant seem to find a way to authorize asp.net user to create an
Excel application using this:
Microsoft.Office.Interop.Excel.ApplicationClass excel = new
Microsoft.Office.Interop.Excel.ApplicationClass();

I keep getting this error:
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))).
I already assigned permissions to asp.net user in Control
Panel->Component Services-> DCOM Config->Microsoft Excel Application, but
I am still unable to create the Excel application.

(Windows XP Pro, Visual Studio.NET 2 Beta 2, Office 2003 Pro)

Please help!


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1302
by: Jim | last post by:
I'm trying to automate Excel from within an ASP.NET application. I downloaded and installed the Primary Interop Assemblies, because I'm using Office XP. I then set a reference to the Microsoft...
0
1665
by: Jon Rista | last post by:
Hello. I'm trying to automate Excel in a C# Windows Service. This windows service has to be able to access files on network shares, so it uses a domain account on a WinNT 4.0 domain server, rather...
17
6300
by: Mansi | last post by:
I need to do some research on how to use excel automation from c#. Does anyone know of any good books related to this subject? Thanks. Mansi
4
8091
by: Robert | last post by:
I have created a .dll in C# which has a reference to Excel. When I add a strong name to the .dll in the AssemblyInfo.cs and try to rebuild, I get the following error: Assembly generation failed...
9
4401
by: hari krishna | last post by:
hi, I want to send the data from dataset information to Excel through ASP.Net. there will be no XL installed on web server. web server is win 2000 server machine. I am using visual basic code in...
12
2398
by: D. Shane Fowlkes | last post by:
This most likely belongs in another forum but I thought I'd start here. I have a COM Object written in VB6. The DLL will access MS Excel and use it's Object Library to write a customized report...
3
10696
by: James Wong | last post by:
Dear all, I have an old VB6 application which can create and access Excel object. The basic definition statements are as follows: Dim appExcel As Object Dim wkb1 As Excel.Workbook Dim wks1...
1
1494
by: Keith McDonald | last post by:
We have executable program that is used to create and send emails to users. Working on getting it able to be called from a web page we're having some problems. First of all if debugging the...
2
4913
by: Nicholas Dreyer | last post by:
The following error Run-time exception thrown : System.Runtime.InteropServices.COMException - Error loading type library/DLL. happens while running the code listed at the bottom of this...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.