Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2001-09-05
8
Medium Priority
?
247 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 900 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

670 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