Solved

To CDO experts: Problems logging on to Exchange from IIS using a VB DLL

Posted on 2001-09-05
8
234 Views
Last Modified: 2012-08-13
I am really stuck on this one, and would really appreciate some help. Here is the problem:

I am writing a VB DLL using CDO Library 1.21 (CDO.DLL) which will be used in a web application to allow users to retrieve and send emails through IIS. This web application is supposed to run through the internet, therefore the machine will not be logging on to the domain.

Everything works fine while testing when I am logged on in NT under the same user as the exchange server profile I am using. However, when supplying a different user to the session LOGON method, I get the following message on my browser after entering the correct username/password on the logon dialog:

[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]

Please note that the other user I am trying to test with is a valid Exchange & NT username.

Here is what I have done so far:

1) Disabled anonymous log on in IIS
2) Disabled NT challenge response in IIS
3) Enabled Basic authentication (clear text) to force IIS to prompt me for a username/password.
4) Used the follwing piece of code to log on:

    Set objSession = CreateObject("Mapi.Session")
    objSession.Logon , cUserPassword, False, , , , cExchangeServerName & vbLf & cMailUserAlias

Where cUserPassword is an argument for the NT & Exchange user password and cMailUserAlias is the NT & Exchange username.

The IIS server is running on my local machine (Win2k pro)
The Exchange is running on a BDC
The NT server is running on a 3rd machine.

I am really stuck. Please help.
0
Comment
Question by:mmahdi
8 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6459095
Have you tried using CDONTS instead?
Anthony
0
 
LVL 1

Expert Comment

by:wongchun
ID: 6459335
Are you configured MAPI Profile in Control Panel\Mail?

Please add a default profile for using MAPI.Session.

Also you can use CDONTS object to instead your DLL for sending email out.

Daniel
0
 
LVL 1

Author Comment

by:mmahdi
ID: 6460303
Just to clarify a couple of point folks:

- I do not want to use CDONTS, as this web app was meant to replace outlook when users are away from the office. I am not just looking to send email.

- People should be able to access their exchange account from any PC in the world such as internet cafes, friend's PC, etc ... If this is not possible, I need to be able to allow mobile users who use their laptop at work and away from work to access their account.
0
 
LVL 1

Expert Comment

by:eeevans
ID: 6462424
Is there a reason you don't want to turn on the MS Outlook Web Access for Exchange Server?  It kind of takes care of this for you.
Regards
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 1

Author Comment

by:mmahdi
ID: 6463747
eeevans,

I presume this feature can be enabled from Exchange Server administration screen, is that the case?

Thanks
0
 
LVL 1

Accepted Solution

by:
eeevans earned 300 total points
ID: 6463996
I believe so, or it may need to be installed as an add-on.
Regards
0
 
LVL 1

Author Comment

by:mmahdi
ID: 6464094
Thanks eeevans I will try it then.
0
 
LVL 1

Author Comment

by:mmahdi
ID: 6522625
Thanks eeevans,

Altough your reply was not a solution as such, but with your help I will make it clear to the user that exchange web components need to be enabled.

Thanks again
mmahdi
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now