Solved

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

Posted on 2001-09-05
8
242 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

791 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