473,327 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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 1864
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
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
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
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
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
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
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
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
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
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.