Menu

#97 Unable to cast object - Error during startup.

5.81
closed
None
5
2007-04-20
2007-02-16
kaste
No

I can reproduce the following error on 2 different machines:

RemoteCalendarsVSTO [X]
Error during startup: System.InvalidCastException: Unable to cast object of type 'System.__ComObject' to type 'Microsoft.Office.Interop.Outlook.ApplicationClass'.
at RemoteCalendars.Core.RemoteCalendars.Controller..ctor()
at RemoteCalendarsVSTO.ThisApplication.initToolbar()
at RemoteCalendarsVSTO.ThisApplication.ThisApplication_Startup(Object sender, EventArgs e)
[ OK ]

This is with RemoteCalendarsVSTO v5.81, because the 5.82 doesn't show any Toolbar on both systems. With 5.81 this error shows up, then the toolbar displays in Outlook and the buttons don't work: the Options button doesn't do anything, the 4 others give a NullReferenceException at _publish_Click - which I think is related to the cast error above.

Both systems are Windows XP sp2, Outlook 2003 sp2 (11.8010.8036), .Net Framework 2.0 - tested with and with out .Net2.0 updates KB917283 and KB922770; PIA and vstor installed. If you would like any further information (filemon log or any other tracing), please let me know.

Discussion

  • kaste

    kaste - 2007-02-16

    screenshot of the error

     
  • Daniele Tiles

    Daniele Tiles - 2007-04-12

    Logged In: YES
    user_id=1114442
    Originator: NO

    I believe you've removed one of your folders, that message usually is thrown when RC cannot find a folder.
    If so:
    1) Stop Outlook
    2) rename your RemoteCalendars.xml file as RemoteCalendars.xml.old
    3) Restart Outlook

     
  • Daniele Tiles

    Daniele Tiles - 2007-04-12
    • assigned_to: nobody --> lasthope83
     
  • kaste

    kaste - 2007-04-20

    Logged In: YES
    user_id=1133904
    Originator: YES

    Hello,

    thanks for your suggestions. Unfortunately I never had a "RemoteCalendars.xml" file created - so I could not rename it :(

    However, with the new version 5.83+ have a great help document, and I think deleting HKCU\Software\Policies\Microsoft\Security\CheckAdminSettings solved my problem. I have since been able to use RC without the error above showing up.

    Maybe you want to check for the value/existence of this Registry Key in the RC code, and present an appropriate remark to the user? If not - just close this issue.

    Kind Regards, Kai

     
  • Daniele Tiles

    Daniele Tiles - 2007-04-20

    Logged In: YES
    user_id=1114442
    Originator: NO

    Great! :D
    Thank you very much! I'll try to take a look for a way to override that problem, but it's definitely not one of my top priorities ;)

     
  • Daniele Tiles

    Daniele Tiles - 2007-04-20
    • status: open --> closed
     

Log in to post a comment.