The objective of this component is to be able to forward whatever HTTP requests it receives to forward to a different server based on the parameters but keeping the URL and POST data intact. For example:
If the component receives
http://sourceserver/XYZ.aspx?id=100
It will return the response from either
http://targetserverONE/XYZ.aspx?id=100
http://targetserverTWO/XYZ.aspx开发者_高级运维?id=100
where XYZ can be valid name of the page. I think I can probably individually create each page to do a Response.Redirect but i am wondering if there is a more generic way to do this? In addition, is this something I have to configure on the IIS level rather than code level? Thanks.
You can do this in IIS from IIS Manager:
IIS 6 Instructions
IIS 7 Instructions
Edit: Just re-read your question and realize you're load balancing between two servers. You can do this at the administrative level as well. Google load balancing
精彩评论