ASP.NET Security problem trying to access MAPI

M

mahadewa

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top