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

Error in accessing Excel sheets.

sk
Please forgive me if the same topic is already posted. But i havent found
I have got an error while accessing the excel file as below. Can somebody reply if there is a solution

Access is denied.
Exception Details: System.UnauthorizedAccessException: Access is denied.
The ASP.NET process is not authorized to access the requested resource. For security reasons the default ASP.NET process identity is '{machinename}\ASPNET', which has limited privileges. Consider granting access rights to the resource to the ASP.NET process identity.

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 "{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the Write box in the Allow column

Source Error:

Line 375: strSheetName = strSourceFil
Line 376

Line 377: Dim oExcel As New Excel.Application() 'ERROR HER

Line 378: Dim oBooks As Excel.Workbooks, oBook As Excel.Workboo
Line 379: Dim oSheets As Excel.Sheets, oSheet As Excel.Workshee
Nov 18 '05 #1
1 1803
The error actually gives good details to fix it. You have to give the ASPNet
user account on the server permissions to launch Excel. You do this by going
to the directory that contains the Excel application and granting the ASPNet
user account at least Write permissions. It most likely needs this for temp
file resources.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"sk" <ku******@yahoo.com> wrote in message
news:F7**********************************@microsof t.com...
Please forgive me if the same topic is already posted. But i havent found.
I have got an error while accessing the excel file as below. Can somebody reply if there is a solution.
Access is denied.
Exception Details: System.UnauthorizedAccessException: Access is denied.
The ASP.NET process is not authorized to access the requested resource. For security reasons the default ASP.NET process identity is
'{machinename}\ASPNET', which has limited privileges. Consider granting
access rights to the resource to the ASP.NET process identity.
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
"{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the
Write box in the Allow column.
Source Error:
Line 375: strSheetName = strSourceFile
Line 376:

Line 377: Dim oExcel As New Excel.Application() 'ERROR HERE

Line 378: Dim oBooks As Excel.Workbooks, oBook As Excel.Workbook
Line 379: Dim oSheets As Excel.Sheets, oSheet As Excel.Worksheet

Nov 18 '05 #2

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

Similar topics

2
by: Kumar | last post by:
Hi Folks, I have a question regarding my windows c# application. This application just reads MS Excel file and puts the data in to sql server database. In that excel file ,it has one named cell...
1
by: Esmail Bonakarian | last post by:
Greetings all, What is the best way to access specific records in an Excel file? I have an Excel file, I want to randomly and repeatedly (maybe around up to 50 times) draw some rows of data...
0
by: zfraile | last post by:
I'm getting this error from the JIT compiler at runtime, but only on my boss' machine, not my development machine. I believe the error is generated from a call to an Excel object, but I can't tell...
0
by: Anish G | last post by:
Hi All, I am getting the below given error while running my application in live server. In my local machine, its working fine. Please help me as it is very urgent for me. Exception from...
3
by: alnug | last post by:
Hello, I'm trying to use the following code to read data from Excel files and put the data into an MS Access Table. Some of the Excel files have the tabs in the sequence Chart1, Sheet1, Sheet2 etc...
1
vinci
by: vinci | last post by:
Please help me out... i only have two weeks to do it... here is my code: Dim ex As New Object Dim wb As Excel.Workbook Dim sheet As Excel.Worksheet
3
by: Chris | last post by:
I have a python script that is driving Excel and using the win32com module. However, upon program completion there's still an Excel.exe process running in the background that I must terminate...
0
by: dprjessie | last post by:
Hello, I am a Web programmer and I'm working on my first desktop application as a favor for a friend. I'm sure I have a stupid error here, but there is no error being thrown so I can't figure out...
4
by: MAdcock | last post by:
Hi, I have created an excel program which creates 65 or more (nneds to be unlimited) customised letters for clients. The macro uses VLOOKUP to change the details within the letter and copies /...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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...

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.