Retrieving OL Calendar items from ASP.NET ...


B

Bruno Vignola

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
 
Ad

Advertisements

B

Bruno Vignola

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
 
Ad

Advertisements

B

Bruno Vignola

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top