1

I have got my application working fine with the standalone MAPI (1.2.1 CDO) however after removing that and installing Outlook, I cannot get it working.

I get a MAPI_E_NETWORK_ERROR, which when I catch and return the exception message caught comes up with

System.Runtime.InteropServices.COMException: Not logged on. Please log on first

Do I have to do anything different to get this working with an outlook installation? This is thrown when doing

LogonExchangeMailbox(username, exserver)
John Joseph
  • 921
  • 5
  • 14

3 Answers3

1

MAPI_E_NETWORK_ERROR is a network access error. Is firewall active on that machine? Was your app added to the exclusion list?

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
0

It could also be the name of the exchange server not being correct. I had this issue as the old exchange server had been decommissioned so rather than being EXHANGE.ad.{company}.com it changed to just the new server name e.g. EXCHANGEABC12.

Andy Creigh
  • 113
  • 8
0

Also keep in mind that LogonExchangeMailbox connect using plain old RPC protocol. If you are connecting to Exchange 2013/2016 over RPC-over-HTTP, you need to use LogonHostedExchangeMailbox .

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78