ASP.NET Security problem trying to access MAPI



Hi all,

I've been having this problem almost a week now, I have tried to find
answers everywhere, but so far I haven't got any luck. I hope I could
get some help here. Here is the problem:

I am tyring to build an email notification alert into our existing
ASP.NET application. The application is run via IIS and has Form
Authentification turned on.

Because of limitation of our Exchange Server here in the office, I
can't use .NET native SmtpClient class for the emailing system. Hence
I am using MAPI, via a MAPI .NET wrapper called MAPI33.
I am sending the email using Exchange Server default profile which is
setup in my development machine, i.e. my email account.

When I put together a test Web Site using VS2005 test server (not IIS),
all are good, because the application authenticated as the logged-on
Domain User, i.e. myself, hence when I tried to log-on to the email
profile it let me in. Btwy, this is my theory on how MAPI works, not
sure if this is true or not.

Now, when I integrate this code to the 'real' application, nothing
worked, and I think this is because the application runs under
Machine\ASPNET account, and not the Domain Account.
I have tried to use Impersonation (using the method describe in this
KB: http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q306158) to
change the identity, and calling
System.Security.Principal.WindowsIdentity.GetCurrent().Name, give me
the right identity (the Domain User), but it still doesn't work.

I turned off Anon Access in IIS and turn on Impersonation in
web.config. Still doesn't work.

Any thoughts ?

Thank for the help,
Chris Prakoso

.



Relevant Pages

  • Re: MAPI_E_LOGON_FAILED when running two MAPI clients as different users
    ... Exchange provider has problems with simultaneous MAPI sessions connected to ... > MAPI client running on the machine. ... > running under the same domain account. ... > I don't have Exchange Server installed on my development machine. ...
    (microsoft.public.win32.programmer.messaging)
  • MAPI Session Logon Fail when run as windows service
    ... I'm trying to write a vb program to auto send emails (with excel file ... I have set the service startup account as the domain user account which has ... (but I'm not sure if the exchange server is 5.5 or 2000) ...
    (microsoft.public.outlook.program_vba)
  • Re: How to create a MAPI profile from a service?
    ... Local service account cannot access any network resources. ... to run as a domain user to be able to talk to an Exchange server. ... Is there any setting somewhere to let LocalSystem account to call ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Will anybody help me now?
    ... Exactly where do I configure this MAPI. ... Subject 'Test', Account: ... > MVP for Exchange Server ... >> I created two users in that domain one named Nik and the other test. ...
    (microsoft.public.exchange.admin)
  • Dave Goldman help: rename AD user creates prob w autocomplete Outl
    ... When I rename an AD user account and Exchange Mailbox using the steps ... After renaming an Active Directory user account, the new user name and the ... I typed jwalter into Outlook, arrowed down, and deleted the name from the ... I rebuilt the Offline Address Book on the Exchange server and redownloaded ...
    (microsoft.public.exchange.admin)