OSX Remote Desktop Client Fails With ‘404 not found’

I recently had a strange issue with the OSX version of Remote Desktop Client connecting to a RDWeb server over the internet. The client kept reporting “The gateway failed to connect with message 404 not found”. Digging into the logs under the about box I found the following:

[2014-Jul-18 11:23:53] RDP (0): —– BEGIN ACTIVE CONNECTION —–
[2014-Jul-18 11:23:53] RDP (0): client version: 8.0.24875
[2014-Jul-18 11:23:53] RDP (0): Protocol state changed to: ProtocolConnectingNetwork(1)
[2014-Jul-18 11:23:53] RDP (0): correlation id: ec36d635-6a34-ba40-9e8a-76ac60330000
[2014-Jul-18 11:23:53] RDP (0): Resolved ‘www.contoso.com’ to ‘x.x.x.x’ using NameResolveMethod_DNS(1)
[2014-Jul-18 11:23:53] RDP (0): Resolved ‘www.contoso.com’ to ‘x.x.x.x’ using NameResolveMethod_DNS(1)
[2014-Jul-18 11:23:54] RDP (0): HTTP RPC_IN_DATA connection redirected from https://www.contoso.com:443/rpc/rpcproxy.dll?localhost:3388 to https://www.contoso.com/RDWeb/rpc/rpcproxy.dll
[2014-Jul-18 11:23:54] RDP (0): HTTP RPC_OUT_DATA connection redirected from https://www.contoso.com.com:443/rpc/rpcproxy.dll?localhost:3388 to https://www.contoso.com/RDWeb/rpc/rpcproxy.dll
[2014-Jul-18 11:23:54] RDP (0): Resolved ‘www.contoso.com’ to ‘x.x.x.x’ using NameResolveMethod_DNS(1)
[2014-Jul-18 11:23:54] RDP (0): Resolved ‘www.contoso.com’ to ‘x.x.x.x’ using NameResolveMethod_DNS(1)
[2014-Jul-18 11:23:54] RDP (0): Exception caught: Exception in file ‘../../librdp/private/httpendpoint.cpp’ at line 217
User Message : The gateway failed to connect with the message: 404 Not Found
[2014-Jul-18 11:23:54] RDP (0): Exception caught: Exception in file ‘../../librdp/private/httpendpoint.cpp’ at line 217
User Message : The gateway failed to connect with the message: 404 Not Found
[2014-Jul-18 11:23:54] RDP (0): Protocol state changed to: ProtocolDisconnecting(7)
[2014-Jul-18 11:23:54] RDP (0): Protocol state changed to: ProtocolDisconnected(8)
[2014-Jul-18 11:23:54] RDP (0): —— END ACTIVE CONNECTION ——

Which was equally useless.

Some digging around on google landed me on a MSDN blog post. Reading through the comments on page 2 (you know sometimes there is useful stuff!) someone mentioned the same error and that the redirection in IIS was to blame. Sure enough I had setup a redirect from the Default Web Site to point at the RDWeb location to make things easier for the users. Disabling the redirect fixed the problem. I then did some additional testing and enabling the redirect and selecting “Only redirect requests to content in this directory (not subdirectories)” allowed me to retain the redirect and allow the OSX RDP client to work.

IIS Redirect Settings

 

 

4 Responses to “OSX Remote Desktop Client Fails With ‘404 not found’”

  1. George Morris says:

    Great Job! Seriously! I spent ages trying to work out why my iPhone would only connect intermittently and my android not at all.

    This was completely the problem.

    Now all I have to do is revert all the changes I made to the gateway server etc in prior testing…

    Just to add: the tick box option for 302’s also fixes the mobile apps.

    Thank you for posting this up! needs to be shared. 🙂

  2. Dan B says:

    Solved it for me too, nice one!

  3. gmiga says:

    Solved it for me too. Very frustrating this behavior. Thanks for your article.

  4. Steven says:

    It Works! Thank you sir.

Leave a Reply

*