473,237 Members | 1,266 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,237 software developers and data experts.

System.UnauthorizedAccessException: Access is denied. - Excel Application.

Hi All,

I don't why alert below error message when I am using "Excel
Application".
I have to following the instruction, but the error is still here.
Please help ..
Dim excelApp As New Excel.Application
Dim excelBook As Excel.Workbook
Dim excelWorksheet As Excel.Worksheet
Dim Q As Integer
Dim IndexRow As Integer
Dim CurrentRow As DataRow
Exception Details: System.UnauthorizedAccessException: Access is
denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS
5 or Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user
(typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in
Explorer, choose "Properties" and select the Security tab. Click "Add"
to add the appropriate user or group. Highlight the ASP.NET account,
and check the boxes for the desired access.

Nov 28 '06 #1
2 7745
<ke*******@gmail.comwrote in message
news:11*********************@n67g2000cwd.googlegro ups.com...
I don't why alert below error message when I am using "Excel
Application".
Dim excelApp As New Excel.Application
What are you trying to do exactly? Office Automation via ASP.NET is a really
bad idea, so much so that Microsoft themselves strongly discourage it, and
will not support a solution which uses it:
http://support.microsoft.com/default...US;q257757#kb2

See also:
http://www.aspose.com/wiki/default.a...utomation.html
Nov 28 '06 #2
I agree. There are a lot of gotchas using automation on asp.net.

But if you really really really have to you need to change some COM+
permissions. Open control panel, component services and navigate to
DCOM config. Click yes to all the dialogs and then locate Microsoft
Excel Application.

Right click and go to the security tab

On Tue, 28 Nov 2006 08:04:06 -0000, "Mark Rae"
<ma**@markNOSPAMrae.comwrote:
><ke*******@gmail.comwrote in message
news:11*********************@n67g2000cwd.googlegr oups.com...
>I don't why alert below error message when I am using "Excel
Application".
> Dim excelApp As New Excel.Application

What are you trying to do exactly? Office Automation via ASP.NET is a really
bad idea, so much so that Microsoft themselves strongly discourage it, and
will not support a solution which uses it:
http://support.microsoft.com/default...US;q257757#kb2

See also:
http://www.aspose.com/wiki/default.a...utomation.html
--

Bits.Bytes.
http://bytes.thinkersroom.com
Nov 28 '06 #3

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

Similar topics

1
by: Raju | last post by:
Exception Details: System.UnauthorizedAccessException: Access is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET...
4
by: Jane | last post by:
I got the web application to open up the excel. It works fine on my development box. But when i moved it to the production server, I cannot get the Excel spreadsheet to open. I get...
2
by: genc_ymeri | last post by:
Hi, I'm getting constatly an error and I'm not sure where it is coming from. From the message it seems like ASP.Net build in account does not have all the rights but I manually added all possible...
0
by: Efi | last post by:
Hi, We have a simple 3 tier application which its core application is VC++ 6.0 ATL COM running as a server application in the COM+. An asp pipe is in charge of handling the requests and passes it...
0
by: DavidS | last post by:
Attempt to open Excel file using ASP.NET. Sample snipet of source code is as follows: Dim _RptDocument As Object, _RptFormat As Object Dim _RptFile As String = "C\Downloads\<any file name>.xls" ...
0
by: masago | last post by:
Hi....how are you ?? they can help me to solve this problem ?? Access to the path = "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET = Files\reports\06639073\bbab30a7" is...
4
by: Anbu | last post by:
Hi all, I have developed an application in VS .NET 2003 (framework 1.1) on a XP platform. It is working fine in that PC. Now, I setup new PC with same configuration for another develper....
5
by: Max | last post by:
hi i have file browser control to select any file and a button to upload file on my web page now when i select any file. now on click of upload button i have check that file exist or no if...
2
by: job | last post by:
In a sharepoint setup using smartpart to load our user controls using enterprise blocks (data) we are getting some strange errors (logged to the event log). We dont get the error all the time. When...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
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...

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.