473,503 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web application calling Excel 2003

Hello,

My Web application in VB2008 with IIS calls Excel (2003) to create an Excel
file xls. I use therefore Microsoft.Office.Interop.Excel, version 11.
This application does not use anonymous connections; it automaticaly uses
the Windows userid.

On my development PC, with local server, everything is OK.

On a test server with IIS and Excel, my program gets an error on the first
statement related to Excel :
Dim ApplicationExcel As New Excel.Application

Error message: Retrieving the COM class factory for component with CLSID
{...} failed due to the following error : 80070005.
Explanations : ASP.NET is not authorized to access the requested resource.
Etc.

What access rights should I grant to what resources ?

Thank you for your help,
Gilbert

Sep 11 '08 #1
2 1870
On Sep 11, 5:23*pm, "Gilbert Tordeur" <gilbert.tord...@orange.fr>
wrote:
Hello,

My Web application in VB2008 with IIS calls Excel (2003) to create an Excel
file xls. I use therefore Microsoft.Office.Interop.Excel, version 11.
This application does not use anonymous connections; it automaticaly uses
the Windows userid.

On my development PC, with local server, everything is OK.

On a test server with IIS and Excel, my program gets an error on the first
statement related to Excel :
Dim ApplicationExcel As New Excel.Application

Error message: Retrieving the COM class factory for component with CLSID
{...} failed due to the following error : 80070005.
Explanations : ASP.NET is not authorized to access the requested resource..
Etc.

What access rights should I grant to what resources ?

Thank you for your help,
Gilbert
Hi,

Two things:
1) You need to have exactly the same version of Excel installed on
your web server.
2) Try using ASP.NET Full Trust mode. Office interop DLLs are
unmanaged code.

My opinion is that you should avoid COM interop
(http://www.gemboxsoftware.com/GBSpre...tm#Automation),
especially on a web server.

Our GemBox.Spreadsheet Free Excel component
(http://www.gemboxsoftware.com/GBSpreadsheetFree.htm) can be used
free
of charge to generate/import/export excel data as long as XLS/CSV/
XLSX
files are not large.

-- Zeljko
Sep 17 '08 #2
ZSvedic,

Thank you for your answer.

1) Yes I use the same version on both machines.

2) I have granted full access to C:\ and D:\ to the account ASPNET, and I
have also changed the DCOM configuration (cf.
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx), and now it works.

However I have probably given too many rights to ASP.NET ; do you know what
folders I have to give full access to ?

I will investigate the GemBox software.

Regards,
Gilbert

"ZSvedic" <ZS*****@gmail.coma écrit dans le message de news:
f0**********************************...oglegroups.com...
On Sep 11, 5:23 pm, "Gilbert Tordeur" <gilbert.tord...@orange.fr>
wrote:
Hello,

My Web application in VB2008 with IIS calls Excel (2003) to create an
Excel
file xls. I use therefore Microsoft.Office.Interop.Excel, version 11.
This application does not use anonymous connections; it automaticaly uses
the Windows userid.

On my development PC, with local server, everything is OK.

On a test server with IIS and Excel, my program gets an error on the first
statement related to Excel :
Dim ApplicationExcel As New Excel.Application

Error message: Retrieving the COM class factory for component with CLSID
{...} failed due to the following error : 80070005.
Explanations : ASP.NET is not authorized to access the requested resource.
Etc.

What access rights should I grant to what resources ?

Thank you for your help,
Gilbert
Hi,

Two things:
1) You need to have exactly the same version of Excel installed on
your web server.
2) Try using ASP.NET Full Trust mode. Office interop DLLs are
unmanaged code.

My opinion is that you should avoid COM interop
(http://www.gemboxsoftware.com/GBSpre...tm#Automation),
especially on a web server.

Our GemBox.Spreadsheet Free Excel component
(http://www.gemboxsoftware.com/GBSpreadsheetFree.htm) can be used
free
of charge to generate/import/export excel data as long as XLS/CSV/
XLSX
files are not large.

-- Zeljko
Sep 19 '08 #3

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

Similar topics

1
2760
by: jinu | last post by:
hello, I need to run a vb.net application in different OSs like windows 2003, windows 2000, windows 98 etc.... where only windows 2003 have built-in .net framework and to be installed in...
1
3015
by: Bernd Muent | last post by:
Hi together, I am using the following code in Visual Basic to open Word or Excel applications: Word: Dim w As Word.Application w = CType(CreateObject("Word.application"), Word.Application)...
6
410
by: Rich Wallace | last post by:
Hi all, I have a VB app that runs and manages individual XLS files within a single COM object. Upon processing the final fie, I attempt to close out the EXCEL object and release it using...
5
2163
by: Jason | last post by:
I am having some trouble manipulating Excel files. Currently I am trying to create and then close an Excel file/application with the following code. It works fine, except it leaves an EXCEL...
9
4518
by: Doug Glancy | last post by:
I got the following code from Francesco Balena's site, for disposing of Com objects: Sub SetNothing(Of T)(ByRef obj As T) ' Dispose of the object if possible If obj IsNot Nothing AndAlso...
4
2332
by: snare88 | last post by:
I have a question regarding a VB.NET 2003 application which was built on a Windows XP machine with Office 2002 installed. The software does some interfacing with Microsoft Excel. I now want to...
0
2848
by: hitencontractor | last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003. I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About. The application...
0
188
by: Gilbert Tordeur | last post by:
Hello, My Web application in VB2008 with IIS calls Excel (2003) to create an Excel file xls. I use therefore Microsoft.Office.Interop.Excel, version 11. This application does not use anonymous...
2
2064
by: Gilbert Tordeur | last post by:
Hello, My Web application in VB2008 with IIS calls Excel (2003) to create an Excel file xls. I use therefore Microsoft.Office.Interop.Excel, version 11. This application does not use anonymous...
0
7205
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
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7006
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
5592
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
5021
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
4685
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
3175
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
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
397
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.