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 =
    app.GetNamespace("MAPI").GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);
    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
    the
    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
     
    Bruno Vignola, Sep 22, 2008
    #1
    1. Advertising

  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
    solution.

    > 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:http://www.google.co.uk/search?
    > 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
     
    Bruno Vignola, Sep 22, 2008
    #2
    1. Advertising

  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: http://blog.downtownsoftwarehouse.com/2006/10/26/
    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
     
    Bruno Vignola, Sep 23, 2008
    #3
    1. Advertising

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
    Replies:
    1
    Views:
    363
    =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?=
    Jun 7, 2004
  2. tfsmag
    Replies:
    7
    Views:
    431
    Shimon Sim
    Jun 8, 2005
  3. Anjan Bhowmik
    Replies:
    1
    Views:
    488
    Misbah Arefin
    Feb 14, 2008
  4. Microsoft Newsserver

    ASP.NET Menu Items - Dynamic Items Disapearing

    Microsoft Newsserver, Feb 22, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    402
    bruce barker
    Feb 22, 2008
  5. Parthiv Joshi
    Replies:
    1
    Views:
    750
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page