Solved

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

Posted on 2001-09-05
8
243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Updates not working for MS Windows 7 12 194
MS Access Search and Replace Using VBA 6 92
Excel - Save a copy of work book 13 91
Excel VBA, find a string in a column, update a cell 7 102
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 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