mapi.session and ASP.Net

  • Thread starter Thread starter Pat Sinnott
  • Start date Start date
P

Pat Sinnott

I am attempting to create a MAPI Session with the
following code on an ASP.net page.

Dim oSess As New MAPI.Session()
oSess.Logon("MS Exchange Settings")


This code works fine in a vb.net environment but when I
attempted to run the same code in an ASP.Net environment I
got the following error.

[Collaboration Data Objects - [MAPI_E_LOGON_FAILED
(80040111)]]

I am aware that the account being used to open this
session is the ASPNET account so I attempted to use
ASP.Net impersonation using my own NT login credentials.

This time I got the following error.

[Collaboration Data Objects - [UNKNOWN_ERROR(80010106)]]

I have search the web for a solution to the issue without
any success. Urgent help required!!!

Regards,

Pat Sinnot MCSD
 
I have worked out what the problem was here.

I added the page directive ASPCOMPAT = true and it worked.
I also used impersonation to impersonate my own NT login
credentials

I can now access all the public folders and their messages
to which I have access through my ASP.NET pages.

Note I use other com components on the page(to access my
business objects which were programmed using VB6) and all
these work faster with ASPCOMPAT set to true.


Regards,

Pat Sinnott MSCD
 
Back
Top