"Exception has been thrown by the target" error in a hybrid deployment of Office 365 and your on-premises environment

Article translations Article translations
Article ID: 2626696 - View products that this article applies to.
Not sure what release of Office 365 you're using? Go to the following Microsoft website:
Am I using Office 365 after the service upgrade?
Expand all | Collapse all

PROBLEM

In a hybrid deployment of Microsoft Exchange Online in Microsoft Office 365 and your on-premises Microsoft Exchange Server 2010 environment, you experience one of the following symptoms: 
  • When you move a mailbox to Office 365 from your on-premises environment, you receive the following error message:
    Exception has been thrown by the target of an invocation.
    When you view the IIS logs in the C:\Inetpub\Logs folder of the on-premises Exchange Server 2010 hybrid deployment server, you see a "405" error for the connection to the associated endpoint. The endpoints are as follows:
    • The mailbox move endpoint is MrsProxy.svc.
    • The Autodiscover endpoint is Autodiscover.svc.
    For example, the error in the IIS log may resemble the following:
    <Date> <Time> 10.10.10.1 POST /EWS/mrsproxy.svc - 443 test\admin 10.10.10.12 - 405 0 1 15W
  • When you run the Get-federationInformation -Verbose cmdlet, you receive one of the following error messages:
      • Request failed with http status 405: method not allowed
      • Execution of the Get-FederationInformation cmdlet had thrown an exception. This may indicate invalid parameters in your Hybrid Configuration settings.
      • Exception has been thrown by the target of an invocation
  • When you try to set up the hybrid deployment in the Hybrid Configuration wizard, you receive the following error message:
    INFO:Cmdlet: Get-FederationInformation
    ERROR:System.Management.Automation.RemoteException: Federation
    information could not be received from the external organization

CAUSE

This issue occurs if the Internet Information Services (IIS) configuration is missing the svc-Integrated handler mapping. The following screen shot shows an example of the svc-Integrated handler mapping in IIS:

Collapse this imageExpand this image
A screen shot of an example of the svc-Integrated handler mapping in IIS


SOLUTION

Note Before you follow these steps, back up your IIS configuration.

To resolve this issue, run the ServiceModelReg.exe –r command to reinstall the handler mappings in IIS. To do this, follow these steps:
  1. On the Exchange Server 2010 hybrid deployment server, open a Command Prompt window, and then move to the following folder:

    C:\Windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\
  2. Type the following command, and then press Enter:

    ServiceModelReg.exe –r

    Note You may have to restart IIS after you run this command.

MORE INFORMATION

When you experience this issue, you may notice that other connections to the Client Access Server (CAS), such as the connection for configuring user profiles through the Autodiscover service, aren't affected. This is because this operation doesn't use the svc endpoint. Any connection that uses the svc endpoint won't work. Other endpoints probably will not be affected.

For more information, see the following Office 365 Community article:

Still need help? Go to the Office 365 Community website.

Properties

Article ID: 2626696 - Last Review: September 4, 2013 - Revision: 19.0
Applies to
  • Microsoft Office 365 for enterprises (pre-upgrade)
  • Microsoft Office 365 for education  (pre-upgrade)
  • Microsoft Exchange Online
  • Microsoft Exchange Server 2010 Enterprise
  • Microsoft Exchange Server 2010 Standard
  • Microsoft Exchange Server 2010 Service Pack 1
Keywords: 
o365 o365a o365e kbgraphxlink o365062011 pre-upgrade o365022013 after upgrade o365m hybrid kbgraphic KB2626696

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com