1

we’re currently migrating from Exchange Server 2008 to 2013. We use an own coded application with Outlook Redemption, which cannot logon to the new Exchange Server 2013. In the old version of our application we used the function RDOSession.LogonExchangeMailbox, which is no longer supported by Exchange 2013 (RPC). We updated our application for Outlook Redemption 5.21 and cannot logon to mailboxes that are stored on the Exchange 2013 server. Both servers are online and can receive and send mails.

The code in our application to logon to a mailbox is something like:

Dim objRDOSession As Redemption.RDOSession = Nothing
objRDOSession = CreateObject("Redemption.RDOSession")
objRDOSession.LogonHostedExchangeMailbox("<USERMAIL@DOMAIN>", "", "")

If we logon to a mailbox that is still stored on the old Exchange 2008 server everthing works fine. But if we try to logon a mailbox on the new Exchange 2013 server, the call of LogonHostedExchangeMailbox(…) throws the exception:

GetAutodiscoverForEmailAddress: There are no autodiscover servers in the AD for this address
Error in WinHttpSendRequest(<DOMAIN>/autodiscover/autodiscover.xml): ERROR_WINHTTP_CANNOT_CONNECT
Error in WinHttpSendRequest(autodiscover.<DOMAIN>/autodiscover/autodiscover.xml): ERROR_WINHTTP_NAME_NOT_RESOLVED
Error in WinHttpSendRequest(autodiscover.<DOMAIN>/autodiscover/autodiscover.xml): ERROR_WINHTTP_NAME_NOT_RESOLVED
GetAutodiscoverUrlFromDns error: DNS lookup error using <IPDNSSERVER1>:DNS Server Reports Query Name Error
DNS lookup error using <IPDNSSERVER2>:DNS Server Reports Query Name Error

We tried to assign an “Autodiscover” A-Record for the mailserver and a SRV-Record “_autodiscover”:

GetAutodiscoverForEmailAddress: There are no autodiscover servers in the AD for this address
Error in WinHttpSendRequest(<DOMAIN>/autodiscover/autodiscover.xml): ERROR_WINHTTP_CANNOT_CONNECT
HTTP error 401 from https://autodiscover.<DOMAIN>/autodiscover/autodiscover.xml
Server response:

Expected HTTP_STATUS_REDIRECT, received 403
GetAutodiscoverUrlFromDns error: DNS lookup error using <IPDNSSERVER1>:DNS Server Reports Query Name Error
DNS lookup error using <IPDNSSERVER2>:DNS Server Reports Query Name Error

We can see the virtual directory of Autodiscover but not of mapi. We’re not sure why the mapi virtual directory is not shown, because the commandlet says there is one. Virtual Directories Mapi Virtual Directory

We used the autoconfiguration test from Outlook 2016 and it worked perfectly. It showed MapiOverHttp as used protocol: Outlook 2016 Autoconfiguration test

I hope I have given someone an idea to our problem and he/she can help us to connect to our mailboxes. Thanks!

mika
  • 21
  • 3
  • If I try to call `RDOSession.LogonExchangeMailbox` with a username and password, the following exception is thrown: Error in IMAPISession::OpenMsgStore: MAPI_E_LOGON_FAILED ulVersion: 0 Error: The information store could not be opened. Component: MAPI 1.0 ulLowLevelError: 0 ulContext: 646 – mika Oct 30 '19 at 12:09
  • HTTP error 401 means the credentials are wrong. Is Basic authentication enabled for your Exchange Server? – Dmitry Streblechenko Oct 30 '19 at 16:30
  • I'm not sure where i have to look for authentication method for the whole Exchange server. But I looked through the virtual directories. I enabled Basic for every virtual directory, but the error remains the same. Were the virtual directories the wrong place to look for your asked authentication method? – mika Oct 31 '19 at 20:42
  • Have you tried the connectivity analyzer from https://testconnectivity.microsoft.com? – Dmitry Streblechenko Oct 31 '19 at 23:01
  • I tried the ActiveSync test. Autodiscover dosn't work, but we don't need Outlook Anywhere. If I enter our server and test the first five test succeed (DNS resolve, TCP 443, SSL certificate, IIS configuration, HTTP authentication methods). The ActiveSync session test failed: "403 - Verboten: Zugriff verweigert." = "Access denied. You do not have permission to view this directory or page." – mika Nov 01 '19 at 07:42
  • You don't need ActiveSync , but Autodiscover is what both Redemption and Outlook are using. – Dmitry Streblechenko Nov 01 '19 at 14:44
  • Can you test Autodiscover from Outlook on the machine where your code is running? Ctrl+right click the Outlook tray icon, select "Test Email AutoConfiguration", make sure only "Use Autodiscover" is checked. – Dmitry Streblechenko Nov 01 '19 at 14:45
  • I executed the Outlook wizard and could synchronize the new profile. The E-Mail Autoconfiguration test succeeded. I can see all the correct URLs in the "Result" tab. Outlook Web Access shows the correct server, Exchange-MAPI-HTTP shows the server and mailbox, Exchange-HTTP shows the correct server, "Authenticationpackage: NTLM", ECP showed the correct server. Seems good for me. – mika Nov 01 '19 at 17:17
  • But in the "Protocol" tab shows "Guessmart IMAP: Server mail. " and "Guessmart POP: Server mail.". mail is still a CNAME to the old Exchange 2008 server. I just want to point out again that we're having currently two Exchange Servers, just so you dont overlook this. Thank you for your help btw. – mika Nov 01 '19 at 17:17
  • 1
    Having two Exchange server can definitely be a problem - Redemtpion goes through the same steps as the autodicover test at testconnectivity.microsoft.com. Send an email to redemption (at) dimastr (dot) com and i will send you the debug version of Redemption that logs all its autodiscover steps. – Dmitry Streblechenko Nov 01 '19 at 19:49

1 Answers1

1

just a follow up: the main problem was that Exchange 2013 and up doesn't support standalone MAPI calls. I had to install Outlook in the client our application runs. Thanks Dmitry for your help

mika
  • 21
  • 3