Please help!!!
I'm developing an ASP.NET application with C# and I need to create a Microsoft Excel application, add a workbook with a worksheet to it, populate the worksheet with data, save it, and allow the user to download the xls file.
When I run the application, I get the following error:
Access is denied.
And the error is triggered by the following line:
Excel.ApplicationClass app = new Excel.ApplicationClass();
I tried the same code in a Windows aplication (as opposed to Web application) and it runs fine. It appears that the ASPNET user account (in Windows 2000) is perhaps prevented from doing automation in this manner but I went and gave ASPNET administrative rights (again, in Windows 2000) just to see what would happen but the code still fails. Can anyone tell me what I should do?
Thanks
Jose
I'm developing an ASP.NET application with C# and I need to create a Microsoft Excel application, add a workbook with a worksheet to it, populate the worksheet with data, save it, and allow the user to download the xls file.
When I run the application, I get the following error:
Access is denied.
And the error is triggered by the following line:
Excel.ApplicationClass app = new Excel.ApplicationClass();
I tried the same code in a Windows aplication (as opposed to Web application) and it runs fine. It appears that the ASPNET user account (in Windows 2000) is perhaps prevented from doing automation in this manner but I went and gave ASPNET administrative rights (again, in Windows 2000) just to see what would happen but the code still fails. Can anyone tell me what I should do?
Thanks
Jose