No edit summary |
No edit summary |
||
(14 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
MDriven Server (and TurnkeyServer) adapts by looking at | <message>Write the content here to display this box</message> | ||
MDriven Server (and TurnkeyServer) adapts by looking at incoming requests to discern its own address. | |||
In certain situations this is not | In certain situations, this is not desirable. | ||
One example is if 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. | One example is if 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 to what its true | This could lead to your app getting confused as to what its true URL should be. | ||
To mitigate this you can create | To mitigate this, you can create an App_Data/HardServerUrl.xml file with content like this: | ||
<root HardServerUrl="<nowiki>https:// | <root HardServerUrl="<nowiki>https://theaddressyouwantyourapplicationtohaveWhenWeTalkToTHISInstanceAndAvoidTheLoadBalancer</nowiki>"></root> | ||
When setting the | When setting the HardServerUrl in systems that also use Turnkey, you should(possibly) also make sure the Turnkey uses the proper URL to MDrivenServer by setting the [[Documentation:MDrivenServerOverride|MDrivenServerOverride]].xml settings. | ||
'''SignalR issue''': Setting HardServerUrl for the TurnkeyApplication | '''[[Documentation:SignalR and Realtime|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. | ||
This functionality is available in builds from 2019-04-17 | This functionality is available in builds from 2019-04-17. | ||
You can verify that the HardServerUrl is in effect by | You can verify that the HardServerUrl is in effect by checking the log after start-up in MDrivenServer and Turnkey versions after 2022-04-28: | ||
[ | 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 | |||
See also: [[Documentation:Additional considerations with load balancing Turnkey and MDrivenServer|Additional considerations with load balancing Turnkey and MDrivenServer]] | |||
[[Category:MDriven Server]] | |||
[[Category:MDriven Turnkey]] | |||
{{Edited|July|12|2025}} |
Latest revision as of 05:15, 29 January 2025
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 if 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>
When setting the HardServerUrl in systems that also use Turnkey, you should(possibly) also make sure the Turnkey uses the proper URL to MDrivenServer by setting the MDrivenServerOverride.xml settings.
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.
This functionality is available in builds from 2019-04-17.
You can verify that the HardServerUrl is in effect by checking the log after start-up in MDrivenServer and Turnkey versions after 2022-04-28:
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
See also: Additional considerations with load balancing Turnkey and MDrivenServer