Hybrid Exchange Configuration Issue - Error (405) Method Not Allowed when configuring Hybrid Wizard on Exchange 2010

Paul TozerAzure and M365 Consultant
CERTIFIED EXPERT
Published:
Edited by: Andrew Leniart
Hybrid Exchange Configuration Issue - Error (405) Method Not Allowed when configuring Hybrid Wizard on Exchange 2010

I came across this issue when another engineer escalated it to me for input when trying to migrate from Exchange 2010 to Exchange Online the other day. I thought that I'd share it in this article as many will be migrating from Exchange 2010 as it reaches the end of support, and hope that it may help someone else who has issues.



From the hybrid connection wizard, the migration endpoint failed every time in classic mode with the above screenshot. In modern mode, it also failed after several minutes of trying to communicate from the Azure App Proxy with no real error message of use.


All tests from Test-MigrationServerAvailability cmdlet were run and passed, and the MRS proxy was disabled and re-enabled but didn't resolve the issue.


Looking into the logs, I found that the server was responding with an unexpected response: (405) Method Not Allowed error. In the modern hybrid mode, it looked like it was coming from the remote server, but that was due to the way it proxies back to the site.


TestMigrationServerAvailabilityOutcome {ErrorDetail='Microsoft.Exchange.Migration.MigrationServerConnectionFailedException: The connection to the server 'c802f789-821a-4e3e-aaa5-26180d501284.resource.mailboxmigration.his.msappproxy.net' could not be completed. ---> Microsoft.Exchange.MailboxReplicationService.MRSRemoteTransientException: The call to 'https://c802f789-821a-4e3e-aaa5-26180d501284.resource.mailboxmigration.his.msappproxy.net/EWS/mrsproxy.svc' failed. Error details: The remote server returned an unexpected response: (405) Method Not Allowed. -->


I then did a bit of searching around on the response and found a similar issue in a Microsoft article https://support.microsoft.com/en-us/help/2626696/exception-has-been-thrown-by-the-target-error-in-a-hybrid-deployment-o


The solution that worked was from the above linked MS Article:


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 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.


The error looks to be caused by corruption in the Windows Communication Foundation components where the configuration for svc-Integrated handler mapping is missing.


I hope this helps someone out.


0
1,044 Views
Paul TozerAzure and M365 Consultant
CERTIFIED EXPERT

Comments (0)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.