MDriven Server (and TurnkeyServer) adapts by looking at incoming requests to discern its own address.
In certain situations, this is not desirable.
One example is when you have the application behind a load balancer or reverse proxy, and the load balancer pings your app with an address that is not the desired server address.
This could lead to your app getting confused as to what its true URL should be.
To mitigate this, you can create an App_Data/HardServerUrl.xml file with content like this:
<root HardServerUrl="https://theaddressyouwantyourapplicationtohaveWhenWeTalkToTHISInstanceAndAvoidTheLoadBalancer"></root>
Think of two addresses: the public address users see (the load balancer or proxy), and the private address on which the server reaches the application directly. HardServerUrl usually holds the public address. When Turnkey talks to MDriven Server it should use MDriven Server's private address – set that in Turnkey's MDrivenServerOverride.xml. The MDriven Installation Scripts use this split (PublicBaseUrl and PrivateBaseUrl).
SignalR issue: Setting HardServerUrl for the TurnkeyApplication affects the SignalRConnection. You may be required to make your application find itself under the local server address rather than some reverse-proxy address used in calling it.
You can verify that the HardServerUrl is in effect by checking the log after start-up:
2022-04-28 11:41:30,773 [9] INFO - <path>\App_Data\HardServerUrl.xml NOT found - App url is unchanged: https://localhost:44368
or
2022-04-28 11:41:30,773 [9] INFO - <path>\App_Data\HardServerUrl.xml found and applied: https://localhost:44368
