Retrieving OL Calendar items from ASP.NET ...

Discussion in 'ASP .Net' started by Bruno Vignola, Sep 22, 2008.

  1. Good Morning all,

    I need to interoperate with the Calendar of MS Outlook 2003
    (inserting, retrieving,
    listing events, etc. etc.) from an ASP.NET application; I first
    developed a simple
    windows application in C# and it worked fine, I added the OL reference
    and created
    the COM object with the following code:

    Outlook.Application app = new Outlook.Application();
    Outlook.MAPIFolder folder =
    System.Collections.IEnumerator ie = folder.Items.GetEnumerator();

    The problem is that, when I write the *same* code into an ASP.NET app,
    *in spite
    of in debugging mode everything works* (I use MS VS 2008), when I
    deploy my
    app on IIS (on the same developing machine!) I always get the
    following error:

    Retrieving the COM class factory for component with CLSID
    {0006F03A-0000-0000-C000-000000000046} failed due to the following
    error: 80080005.
    Description: An unhandled exception occurred during the execution of
    the current web request. Please review the stack trace for more
    information about the error and where it originated in the code.
    Exception Details: System.Runtime.InteropServices.COMException:
    Retrieving the COM class factory for component with CLSID
    {0006F03A-0000-0000-C000-000000000046} failed due to the following
    error: 80080005.

    I tried almost everything, setting all the possible user and
    permissions, using
    DCOMCNFG, etc. looking on the net and it seems that many people have
    same problem, but no solutions ...

    Is it possible to create a COM object instance (CoCreateInstance)
    inside an
    ASP.NET app ?

    Thank you in advance for your help ...

    Bruno Vignola, Sep 22, 2008
    1. Advertisements

  2. On 22 Set, 13:43, "Mark Rae [MVP]" <> wrote:

    Hello Mark,

    > Microsoft Office isn't designed to be instantiated in this way.

    I supposed that ... :-( .. I read that Microsoft do not recommend that

    > Presumably, the local copies of Microsoft Outlook are all using Microsoft
    > Exchange Server?

    yes they do, it is the server of my company.

    > If so, then you will need to code your ASP.NET solution to
    > interrogate Exchange instead. This is not particularly difficult, and there
    > are hundreds of examples on the web:
    > sourceid=navclient&hl=en-GB&ie=UTF-8&r...

    thank you very much for your suggestion, it has been very useful to
    avoid me wasting time on the wrong way, I will try to investigate your
    proposal !

    thank you very much again !

    Bruno Vignola, Sep 22, 2008
    1. Advertisements

  3. On 22 Set, 13:43, "Mark Rae [MVP]" <> wrote:

    Hello Mark :)

    just wanted u to know that, basing on your suggestion and on this
    useful example:
    using-net-and-webdav-to-access-an-exchange-server/, I have been able
    to do in a few hours a small prototype of my app, working fine, using
    WebDAV for accessing the exchange server.

    thank you very much again!

    Bruno Vignola, Sep 23, 2008
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bill yeager
    Jun 7, 2004
  2. tfsmag
    Shimon Sim
    Jun 8, 2005
  3. Anjan Bhowmik
    Misbah Arefin
    Feb 14, 2008
  4. Microsoft Newsserver

    ASP.NET Menu Items - Dynamic Items Disapearing

    Microsoft Newsserver, Feb 22, 2008, in forum: ASP .Net
    bruce barker
    Feb 22, 2008
  5. Parthiv Joshi
    Samuel L Matzen
    Jul 6, 2004