|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Permission denied when access excel obj
We're running a web application that's supposed to extract data from an
Excel sheet into a database. For this, we use an ASP pages. In the ASP page, we create a VB object. This is where the error occurs, and it also happens if we use the Set obj = New Excel.Application syntax.We installed the excel software in the server login as administrator. In client machine if user(client) have the administrative previliges , when using IE asp page works fine .if user doesn’t have administrative previliges getting 'Permission denied' on the creation of the Excel application object. We've already tried to add the IUSR_-account to the Administrators group but still same problem. In IIS under security tab if I change anon access user from IUSR to a domain account which is having administrative previliges its working fine. But I don’t want to do this.Instead of assigning administrative account is there any way to do or what previliges I need to run this excel object ?if I know this I can create one new account and I can assign this account in anonymous account. |
|
#2
|
|||
|
|||
|
I have faced a lot of problems while Deploying the the Excel Application in ASP.NET. The Error which troubled me was "System.UnauthorizedAccessException : Access Denied"
I have written some of the tips to clear this bug and step by step methods to use an excel Application(Office Application) in ASP.NET. Converting an Excel COM object to .NET Dll. 1)First we need take the Excel9.OLB file from the Office directory. 2)With the .NET framework we will get a Type Library Importer TlbImp.Exe we need to use this file to convert excel9.olb file to excel.dll. we will find this TlbImp in .Net framework's Bin directory. Syntax : TlbImp.exe Excel9.Olb will give us three .dll files Office.dll, excel.dll and VBIDE.dll(with Office 2000). Now we can use these file in our .Net programs(Using excel). After doing all these I got this Access Denied error This is just permission issue. I have searched a lot in Google but i didn't got any solution for it. Finally steps get rid of Access Denied error.(Do these steps by logging as Administrator 1. Click Start, click Run, and then type DCOMCNFG. Select the application that we want to automate. The application names are listed below: 2. Microsoft Excel 97/2000/2002/2003 - Microsoft Excel Application 3. Click Properties to open the property dialog box for this application. 4. Click the Security tab. Verify that Use Default Access Permissions and Use Default Launch Permissions are selected. 5. Click the Identity tab. Verify that The Launching User is selected. 6. Click OK to close the property dialog box and return to the main applications list dialog box. 7. In the DCOM Configuration dialog box, click the Default Security tab. 8. Click Edit Defaults for access permissions. Verify that the following users are listed in the access permissions, or add the users if they are not listed: SYSTEM INTERACTIVE Everyone Administrators OfficeAutomationUser IUSR_<machinename>* IWAM_<machinename>* * These accounts exist only if Internet Information Server (IIS) is installed on the computer. 9.Make sure that each user is allowed access and click OK. Click Edit Defaults for launch permissions. Verify that the following users are listed in the launch permissions, or add the users if they are not listed: SYSTEM INTERACTIVE Everyone Administrators OfficeAutomationUser IUSR_<machinename>* IWAM_<machinename>* * These accounts exist only if IIS is installed on the computer. 10.Make sure that each user is allowed access, and then click OK. Click OK to close DCOMCNFG. Start REGEDIT and verify that the following keys and string values exist for the Office application that we want to automate: Microsoft Excel 97/2000/2002/2003: Key: HKEY_CLASSES_ROOT\AppID\EXCEL.EXE AppID: {00020812-0000-0000-C000-000000000046} 11.If these keys do not exist, we can create them by running the following .reg file on our system: REGEDIT4 [HKEY_CLASSES_ROOT\AppID\EXCEL.EXE] "AppID"="{00020812-0000-0000-C000-000000000046}" Please refer articles. http://support.microsoft.com/default.aspx?scid=kb;EN-US;288367 http://support.microsoft.com/default.aspx?scid=kb;EN-US;288366 http://support.microsoft.com/default.aspx?scid=kb;EN-US;288366 |
|
#3
|
|||
|
|||
|
should i do the same steps for each user's computer if i want my web page that uses excel objects to be displayed correctly for them?
thank you! |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Permission denied when access excel obj |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|