Ask a Question related to ASP, Design and Development.
-
KLomax #1
Excel object in ASP
I am trying to use an excel spreedsheet on an asp.net page.
The follow code works (with output mod.) in a .net console
application. When I try to run this code in asp.net,
the "dim new excel app" statement fails
with "System.UnauthorizedAccessException: Access is
denied."
Are there some security settings I need to tweek to
instantiate an Excel object in VB.NET ?
Any ideas would be appreciated.
Regards,
KLomax
Try
Dim objExcel As New Excel.Application()
objExcel.Workbooks.Open("C:\TEMP\TestExcel.xls")
Label1.Text = _
objExcel.ActiveSheet.Cells(1,1).Value.ToString
objExcel.Workbooks.Close()
Catch exp As Exception
Label1.Text = exp.ToString
End Try
KLomax Guest
-
Excel create object error
Hello! I have an ASP page that creates an Excel object: set lobjXLSApplication = CreateObject("Excel.Application") This used to run fine on my... -
COM Object Excel
Hi, I was using a Coldfusion 4.5 server on a windows NT platform on which I was exporting datas in a Excel 97 using COM object. I've migrated all... -
Web service in .net not able to create Excel com object
(Type your message here) Hi! I created a web service in .net where in the web method makes call to a function in which I am creating an excel... -
Problem on the ASP using the Excel.Application Object
Hi, All: I want to use excel component in the ASP. My code is that ----------------------------------------------------------- Dim oExcel As... -
Excel COM object not being destroyed
Hi everyone, I have a .NET component (DLL) that uses Excel (creates workbook, adds some data, saves workbook, quits Excel) If I call this... -
MSFT #2
RE: Excel object in ASP
By Default, an ASP.NET application will use the account "aspnet". This
account on your computer may not have enough permission to create the Excel
object. You can try to add this account to local administrators group, or
you can open up macine.config and look at the processModel' username
attribute, you will find which NT account your ASP.NET worker process is
running. Usually it's MACHINE or SYSTEM (where the latter one has more
rights to certain COM objects). See if you can play it with SYSTEM account.
Luke
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
MSFT Guest
-
KLomax #3
RE: Excel object in ASP
Changing the processModel.username to "SYSTEM" did the
trick.
Thanks Luke
account "aspnet". This>-----Original Message-----
>By Default, an ASP.NET application will use theto create the Excel>account on your computer may not have enough permissionadministrators group, or>object. You can try to add this account to localprocessModel' username>you can open up macine.config and look at theworker process is>attribute, you will find which NT account your ASP.NETone has more>running. Usually it's MACHINE or SYSTEM (where the latterwith SYSTEM account.>rights to certain COM objects). See if you can play itand confers no>
>Luke
>
>(This posting is provided "AS IS", with no warranties,>rights.)
>
>.
>KLomax Guest



Reply With Quote

