By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,534 Members | 1,830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,534 IT Pros & Developers. It's quick & easy.

Error in accessing Excel sheets.

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.