Solved

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

Posted on 2001-09-05
8
241 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
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

832 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