將信箱從 Office 365 移回內部部署環境時,移動作業失敗

注意

已不再支援 Microsoft Exchange Server 2010 中的 Exchange 管理主控台所包含的混合式設定向導。 因此,您不應該再使用舊的混合式設定向導。 請改為使用中提供的 Office 365 混合式設定向導 https://aka.ms/HybridWizard 。 如需詳細資訊,請參閱Office 365 混合式設定向導(適用于 Exchange 2010)。

問題

請試想下列案例:

  • 您已在 Microsoft Office 365 和您的內部部署 Microsoft Exchange Server 環境中部署 Microsoft Exchange Online 的混合式部署。
  • 您先前已將信箱從內部部署環境移至 Office 365。
  • 您嘗試下架或將相同的信箱從 Office 365 移回內部部署環境。

在此情況下,作業會達到95%,然後失敗。

發生這種情況時,當您存取/EWS/mrsproxy.svc 連結時,在內部部署環境中,下列記錄檔會產生「HTTP 400」錯誤:

  • Internet Information Services (IIS)記錄檔
  • HTTP 錯誤記錄檔(HTTPERR)檔案

當您使用 Windows PowerShell 連接至 Office 365,然後執行MoveRequestStatisticsMailboxID-IncludeReport |Export-CliXml FileName.xml命令,XML 報表的 [堆疊追蹤] 區段會顯示下列專案:

<S N="StackTrace"> at 
Microsoft.Exchange.MailboxReplicationService.CommonUtils.CallService
(Action serviceCall, String epAddress, VersionInformation 
serverVersion)_x000A_ at 
Microsoft.Exchange.MailboxReplicationService.MailboxReplicationProxyClient.CallServiceWithTimeout
(TimeSpan timeout, Action serviceCall)_x000A_ at Microsoft.Exchange.MailboxReplicationService.RemoteDestinationFolder.Microsoft.Exchange.MailboxReplicationService.IDestinationFolder.SetRules(RuleData[] rules)_x000A_ at Microsoft.Exchange.MailboxReplicationService.DestinationFolderWrapper.<;>;c__DisplayClass31.<;Microsoft.Exchange.MailboxReplicationService.IDestinationFolder.SetRules>;b__30()_x000A_ 
at Microsoft.Exchange.MailboxReplicationService.ExecutionContext.Execute
(Action operation)_x000A_ at Microsoft.Exchange.MailboxReplicationService.DestinationFolderWrapper.Microsoft.Exchange.MailboxReplicationService.IDestinationFolder.SetRules(RuleData[] rules)_x000A_ at 
Microsoft.Exchange.MailboxReplicationService.FolderRecWrapper.WriteRules
(IDestinationFolder targetFolder, Action`1 reportBadItemsDelegate)
_x000A_ at 
Microsoft.Exchange.MailboxReplicationService.MailboxCopierBase.CopyFolderProperties
(FolderRecWrapper folderRec, ISourceFolder sourceFolder, 
IDestinationFolder destFolder, FolderRecDataFlags dataToCopy)
_x000A_ at Microsoft.Exchange.MailboxReplicationService.MailboxMover.<;>;c__DisplayClass2.<;>;c__DisplayClass4.<;FinalSyncCopyAllFolders>;b__1()_x000A_ at 
Microsoft.Exchange.MailboxReplicationService.ExecutionContext.Execute
(Action operation)_x000A_ at Microsoft.Exchange.MailboxReplicationService.MailboxMover.<;>;c__DisplayClass2.<;FinalSyncCopyAllFolders>;b__0
(FolderRecWrapper folderRec, EnumFolderContext ctx)_x000A_ at 
Microsoft.Exchange.MailboxReplicationService.FolderMap.EnumSingleFolder
(FolderRecWrapper folderRec, EnumFolderContext ctx, EnumFolderCallback callback, EnumHierarchyFlags flags)_x000A_ at Microsoft.Exchange.MailboxReplicationService.FolderMap.EnumSingleFolder(FolderRecWrapper folderRec, EnumFolderContext ctx, EnumFolderCallback callback, EnumHierarchyFlags flags)_x000A_ at Microsoft.Exchange.MailboxReplicationService.FolderMap.EnumSingleFolder(FolderRecWrapper folderRec, EnumFolderContext ctx, EnumFolderCallback callback, EnumHierarchyFlags flags)_x000A_ at Microsoft.Exchange.MailboxReplicationService.MailboxMover.FinalSyncCopyAllFolders()
_x000A_ at 
Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.<;FinalSync>;b__4d
(MailboxMover mbxCtx)_x000A_ at 
Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.ForeachMailboxContext
(Action`1 del)_x000A_ at 
Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.FinalSync(Object[] wiParams)_x000A_ at Microsoft.Exchange.MailboxReplicationService.CommonUtils.CatchKnownExceptions
(Action actionDelegate, Action`1 failureDelegate)</S>

原因

如果對信箱複寫 Proxy (MRSProxy)服務的 SetRules 呼叫失敗,便會發生此問題。 如果要移動的信箱包含大量的垃圾郵件規則和使用者規則,也可能會發生這個問題。

解決方案

若要解決此問題,請在內部部署環境中的每個用戶端存取伺服器上,變更 MRSProxyHttpsBinding 設定的值,以及信箱在移動時所通過的路徑中的 [MRSProxyWSSecurityBinding] Web.config 設定值。 若要這樣做,請執行下列步驟:

  1. 在用戶端存取伺服器上,尋找並開啟 Web.config 檔案。

    注意

    在 Exchange Server 2010 中,Web.config 檔案位於下列資料夾中: \Program Files\Microsoft\Exchange Server\V14\ClientAccess\exchweb\ews

  2. 將 MRSProxyHttpsBinding 設定的特定值和 MRSProxyWSSecurityBinding 設定從1048576變更為8388608。 然後儲存檔案。

    下列範例會顯示 Web.config 此區段在變更之後的外觀:

    <binding name="MRSProxyHttpsBinding"> <reliableSession />
    <textMessageEncoding>
    <readerQuotas maxDepth="32" 
    maxStringContentLength="8388608" 
    maxArrayLength="8388608" 
    maxBytesPerRead="4096" 
    maxNameTableCharCount="16384" />
    </textMessageEncoding>
    <httpsTransport authenticationScheme="Negotiate"
    maxReceivedMessageSize="8388608" />
    </binding>
    <binding name="MRSProxyWSSecurityBinding">
    <reliableSession />
    <textMessageEncoding>
    <readerQuotas maxDepth="32" 
    maxStringContentLength="8388608" 
    maxArrayLength="8388608" 
    maxBytesPerRead="4096" 
    maxNameTableCharCount="16384" />
    </textMessageEncoding>
    <httpsTransport authenticationScheme="Anonymous"
    maxReceivedMessageSize="8388608" />
    </binding>  
    
  3. 使用 iisreset 命令,重新開機 IIS。

是否仍需要協助? 前往 Microsoft Community