Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Cannot create ActiveX component

Options
  • 01-06-2006 12:02pm
    #1
    Closed Accounts Posts: 17


    Getting an error on the Server Side...using Visual Studio 2005 and VB script

    "
    System.Exception: Cannot create ActiveX component
    .
    .
    .
    Line 219: objOExp = CreateObject("Outlook.Application")
    "

    I have enabled all ActiveX components on the server side and have installed Outlook 2003 but this issue still persists

    Any help would be appreciated


Comments

  • Registered Users Posts: 2,931 ✭✭✭Ginger


    On 2003 the security permissions are set so no anon access is permitted to the Program Files.

    I am guessing that you installed Outlook to the usual location. You give permission on that folder and its parents etc to the IUSR_ account you should be able to create the object. The reason is simply that the anon account cannot access the directory that the object is stored in.

    If you arent using Anon access but IWAM make sure that the user you are authenticated as has permission to execute in that directory.

    Please be aware that changing permissions like this can have undesirable effects if you are not careful. Quick check is give admin all rights then reduce until it breaks.


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    Sorry I also assumed that this was an ASP/ASPX issue.

    If you are doing Windows Scripting rather than ASP stuff check to see if the Windows Scripting host is enabled. And it looks like you are missing your SET command on the object

    IE Set objOExp = CreateObject("Outlook.Application")

    If its ASP

    try SET objoExp = Server.CreateObject("Outlook.Application")

    Again check the permissions of the user trying to run the script as well


  • Closed Accounts Posts: 17 EthanCleary


    When I use set or let I am given an error that tells me that 'Set and Let' are not recognised anymore.

    I am working on an aspx page

    I am not too certian to go about the below;
    Ginger wrote:
    On 2003 the security permissions are set so no anon access is permitted to the Program Files.

    I am guessing that you installed Outlook to the usual location. You give permission on that folder and its parents etc to the IUSR_ account you should be able to create the object. The reason is simply that the anon account cannot access the directory that the object is stored in.

    If you arent using Anon access but IWAM make sure that the user you are authenticated as has permission to execute in that directory.

    Please be aware that changing permissions like this can have undesirable effects if you are not careful. Quick check is give admin all rights then reduce until it breaks.


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    Ok..

    Right sorry didnt realise it was ASPX and have noticed your other posts now.

    You ASPX is running locally as Anon or do you have to be authenticaed say using IWAM.

    To see this check the permission in the IIS folder and it should more than likely if you set up using defaults, IUSR and IWAM authication enabled. If i remember correctly (been a while since i have done work on IIS 6.0) it will use the IUSR (anon) account first.

    Now if you check the permissions on the folder where the outlook exe is you will probably see that there is no permissions for this user (IUSR) to read the folder.

    A quick check (DO NOT DO THIS ON A PRODUCTION BOX!!!) change the Anon account from ISUR to either a local admin or domain admin user and it should work, thus pointing out permissions.

    If this is the case, change it back to IUSR and then change the security permissions on the outlook exe folder and its parents so that the IUSR account can access it.

    Does this make sense???


  • Closed Accounts Posts: 17 EthanCleary


    ...have tried what you suggested and allowed permissions to "../Office11" and stil getting "Cannot create ActiveX component.."

    Really baffling me!


  • Advertisement
  • Registered Users Posts: 2,931 ✭✭✭Ginger


    Did you replace the permissions on the exe itself?? And replace the folder permissions explicitly


  • Closed Accounts Posts: 17 EthanCleary


    I have done all the above and still that "Active X..." error. Its even baffling experienced developers on site!


Advertisement