On an IIS server with Application Request Routing, new server farms to be routed to can be added by right-clicking Server Farms -> Create Server Farm.
This will pop up a dialog where the settings for the server farm can be entered. I did not manage to find a way to edit or view these settings after they are accepted in the Create-Serverfarms-dialog.
My question is therefore: How can I edit the target-url, http-port and https-port settings of a server farm outside of the create-serverfarm dialog?
Navigate to Application Request Routing UI at the server level in IIS Manager. Click on Browse cache content in the actions pane on the right. Verify that responses are cached on the primary cache drive. Verify that the contents also exist on the secondary cache drive location.
Microsoft Application Request Routing (ARR) for IIS 7 and above is a proxy-based routing module that forwards HTTP requests to content servers based on HTTP headers, server variables, and load balance algorithms. ARR can be used to: Increase application availability and scalability.
You could use the command line to do so.
For example, lets say we have a Server Farm
called test
with one application server www.example.com
in it:
All the following commands need to be run in the %windir%\system32\inetsrv
directory unless you have it in your PATH
.
To change the target-url
of the application server to www.google.com
, use:
appcmd.exe set config /section:webFarms /"[name='test'].[address='www.example.com']".address:www.google.com
You can change any parameters the way you would do it with the dialog (and even more).
To get the list of parameters you can use with the command line:
appcmd.exe set config -section:webFarms -?
And particularly the section you seem to be interested by:
And finally, to view the current config of your server farm:
appcmd.exe list config /section:webFarms
Should get you something like:
References:
http://www.iis.net/learn/get-started/getting-started-with-iis/getting-started-with-appcmdexe
http://www.iis.net/learn/extensions/configuring-application-request-routing-(arr)/define-and-configure-an-application-request-routing-server-farm
Update:
You may generate PowerShell script from IIS Manager.
Web Server (IIS) Administration Cmdlets in Windows PowerShell
Also, you may edit C:\Windows\System32\inetsrv\config\applicationHost.config
file manually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With