{"id":445,"date":"2016-11-14T10:36:00","date_gmt":"2016-11-14T08:36:00","guid":{"rendered":"http:\/\/exchangetimes.net\/?p=445"},"modified":"2016-11-14T10:36:00","modified_gmt":"2016-11-14T08:36:00","slug":"vb-net-application-unable-to-connect-to-some-exchange-2010-mailboxes","status":"publish","type":"post","link":"https:\/\/exchangetimes.net\/?p=445","title":{"rendered":"VB.Net application unable to connect to some Exchange 2010 mailboxes"},"content":{"rendered":"<p>We had an interesting issue last week where a Visual Basic .Net application could connect to some mailboxes but could not connect to other mailboxes on Exchange 2010. The application uses MAPI to connect to the mailboxes.<\/p>\n<p>We were however able to access the affected mailboxes using Outlook and with the <a href=\"https:\/\/mfcmapi.codeplex.com\/\" target=\"_blank\">MFCMAPI<\/a> tool from the application server. We moved the affected mailboxes to other servers and databases but the application could still not connect to the affected mailboxes. We then added our CAS Array name and IP in the application server&#8217;s host file and checked the Exchange RCA logs.<\/p>\n<p>We could not see any connections from the application server to the affected mailboxes but could see connections to the working mailboxes in the RCA logs.<\/p>\n<p>The error from the application were as below but note that it was misleading as it stated it authenticated, connected but could not expand the mailbox store.<\/p>\n<p><em>ProcessMails() <span style=\"color: #ff0000;\">LogonExchangeMailbox Success<\/span><\/em><br \/>\n<em> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/em><br \/>\n<em> Date Time : 2016-11-07 06:30:17<\/em><br \/>\n<em> Error : Error in <span style=\"color: #ff0000;\">IMAPISession::OpenMsgStore: MAPI_E_FAILONEPROVIDER<\/span><\/em><br \/>\n<em> ulVersion: 0<\/em><br \/>\n<em> Error: <span style=\"color: #ff0000;\">The information store could not be opened<\/span>.<\/em><br \/>\n<em> Component: MAPI 1.0<\/em><br \/>\n<em> ulLowLevelError: 0<\/em><br \/>\n<em> ulContext: 649<\/em><br \/>\n<em> Source : at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)<\/em><br \/>\n<em> at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)<\/em><br \/>\n<em> at MailReader.Form1.ProcessMails(String sToDoFolder, String sDuplicateToDoFolder, String sTiffFolder, String sDuplicateTiffFolder, String sExchangeServer, String sInboxUser, String sInboxName, Int32 maxItems, Int32 branchRef)<\/em><\/p>\n<p><strong>We then resolved the issue by doing the following:<\/strong><\/p>\n<ul>\n<li>Opened Exchange Management Shell<\/li>\n<li>Ran this cmdlet against a working mailbox:\u00a0get-mailbox mailboxSMTPaddress@domain.com |fl *legacy*<\/li>\n<li>Made a note of the output<\/li>\n<li>Ran the above cmdlet against a non working mailbox and compared the outputs.<\/li>\n<\/ul>\n<p><strong>The output of the working mailbox:<\/strong><\/p>\n<p>ServerLegacyDN : \/o=yourdomain\/<span style=\"color: #0000ff;\">ou=Exchange Administrative Group (FYDIBOHF23SPDLT)<\/span>\/cn=Configuration\/cn=Servers\/cn=MailboxServerName<br \/>\nLegacyExchangeDN : \/o=yourdomain\/<span style=\"color: #0000ff;\">ou=exchange administrative group (fydibohf23spdlt)<\/span>\/cn=recipients\/cn=MailboxAlias<\/p>\n<p><strong>The output of the non working mailboxes:<\/strong><\/p>\n<p>ServerLegacyDN : \/o=yourdomain\/<span style=\"color: #0000ff;\">ou=Exchange Administrative Group (FYDIBOHF23SPDLT)<\/span>\/cn=Configuration\/cn=Servers\/cn=MialboxServerName<br \/>\nLegacyExchangeDN : \/o=yourdomain\/<span style=\"color: #ff0000;\">ou=SomeOU<\/span>\/cn=recipients\/cn=MailboxAlias<\/p>\n<p><strong>The fix:<\/strong><\/p>\n<p>We then used AD Attribute Editor to change the LegacyExchangeDN on non working mailboxes (LegacyExchangeDN : \/o=yourdomain\/<span style=\"color: #ff0000;\">ou=SomeOU<\/span>\/cn=recipients\/cn=MailboxAlias) to reflect the working mailboxes&#8217; LegacyExchangeDN (LegacyExchangeDN : \/o=yourdomain\/<span style=\"color: #ff0000;\">ou=SomeOU<\/span>\/cn=recipients\/cn=MailboxAlias)<\/p>\n<p>Waited for replication and the application could once again access all the required mailboxes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We had an interesting issue last week where a Visual Basic .Net application could connect to some mailboxes but could not connect to other mailboxes on Exchange 2010. The application uses MAPI to connect to the mailboxes. We were however able to access the affected mailboxes using Outlook and with the MFCMAPI tool from the application server. We moved the affected mailboxes to other servers and databases but the application could still not connect to the affected mailboxes. We then added our CAS Array name and IP in the application server&#8217;s host file and checked the Exchange RCA logs. We could not see any connections from the application server to the affected mailboxes but could see connections to the working mailboxes in the RCA logs. The error from the application were as below but note that it was misleading as it stated it authenticated, connected but could not expand the mailbox store. ProcessMails() LogonExchangeMailbox Success &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Date Time : 2016-11-07 06:30:17 Error : Error in IMAPISession::OpenMsgStore: MAPI_E_FAILONEPROVIDER ulVersion: 0 Error: The information store could not be opened. Component: MAPI 1.0 ulLowLevelError: 0 ulContext: 649 Source : at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) at MailReader.Form1.ProcessMails(String sToDoFolder, String sDuplicateToDoFolder, String sTiffFolder, String sDuplicateTiffFolder, String sExchangeServer, String sInboxUser, String sInboxName, Int32 maxItems, Int32 branchRef) We then resolved the issue by doing the following: Opened Exchange Management Shell Ran this cmdlet against a working mailbox:\u00a0get-mailbox mailboxSMTPaddress@domain.com |fl *legacy* Made a note of the output Ran the above cmdlet against a non working mailbox and compared the outputs. The output of the working mailbox: ServerLegacyDN : \/o=yourdomain\/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)\/cn=Configuration\/cn=Servers\/cn=MailboxServerName LegacyExchangeDN : \/o=yourdomain\/ou=exchange administrative group (fydibohf23spdlt)\/cn=recipients\/cn=MailboxAlias The output of the non working mailboxes: ServerLegacyDN : \/o=yourdomain\/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)\/cn=Configuration\/cn=Servers\/cn=MialboxServerName LegacyExchangeDN : \/o=yourdomain\/ou=SomeOU\/cn=recipients\/cn=MailboxAlias The fix: We then used AD Attribute Editor to change the LegacyExchangeDN on non working mailboxes (LegacyExchangeDN : \/o=yourdomain\/ou=SomeOU\/cn=recipients\/cn=MailboxAlias) to reflect the working mailboxes&#8217; LegacyExchangeDN (LegacyExchangeDN : \/o=yourdomain\/ou=SomeOU\/cn=recipients\/cn=MailboxAlias) Waited for replication and the application could once again access all the required mailboxes.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[213,30,205,7],"tags":[453,454,455,378,457,451,456,452,450],"class_list":["post-445","post","type-post","status-publish","format-standard","hentry","category-active-directory","category-exchange-2010","category-exchange-management-shell","category-microsoft-exchange","tag-error-error-in-imapisessionopenmsgstore-mapi_e_failoneprovider","tag-error-in-imapisessionopenmsgstore-mapi_e_failoneprovider","tag-error-the-information-store-could-not-be-opened","tag-exchange-2010","tag-legacyexchangedn","tag-mfcmapi","tag-the-information-store-could-not-be-opened","tag-vb-net-application-unable-to-access-all-mailboxes","tag-vb-net-application-unable-to-connect-to-some-exchange-2010-mailboxes"],"_links":{"self":[{"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=445"}],"version-history":[{"count":1,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts\/445\/revisions"}],"predecessor-version":[{"id":446,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts\/445\/revisions\/446"}],"wp:attachment":[{"href":"https:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}