You want to know which server you are hitting? Set an Http Response header in IIS for each server . Then show that info on the browser. I use header spy in FF.
Marked as answer by Lloydz on May 15, 2012 03:07 AM
Then navigate to (in your example) to http://192.168.1.1/CurrentNode.aspx and it will tell you a server name that handling the request.
For my details check this out: http://weblogs.asp.net/owscott/archive/2009/01/18/web-farms-and-telling-which-node-is-handling-a-request-in-asp-net.aspx
That won't work znerses... you may hit one server (say when browsing the home page) and then when you decide to work out which server it is by querying your file it may then hit the other server (lets
not depend on sticky sessions).
Response header is by far the best way to know for sure which server you are hitting when on that page.
imughal
3 Posts
How to test and verify request on NLB
May 08, 2012 07:13 AM|LINK
Hi,
i have configured 2 node NLB. my sites are created as http://site1.mydomain.com, http://site2.mydomain.com and so on.
NLB Cluster IP : 192.168.1.1
Node 1 IP : 192.168.1.2
Node 2 IP : 192.168.1.3
i have map mysite to NLB Cluster http://site1.mydomain.com to 192.168.1.1.
Now i want to verify and test when i access site which server cater request. just to to verify both Node are working fine to response to site access.
so please how can i check and test.
thx,
nastymatt
124 Posts
Re: How to test and verify request on NLB
May 09, 2012 02:18 PM|LINK
You want to know which server you are hitting? Set an Http Response header in IIS for each server . Then show that info on the browser. I use header spy in FF.
znerses
18 Posts
Re: How to test and verify request on NLB
Jun 26, 2012 07:08 PM|LINK
Create a file called CurrentNode.aspx and set the following in it:
<%
Response.Write (System.Environment.MachineName)
%>
Then navigate to (in your example) to http://192.168.1.1/CurrentNode.aspx and it will tell you a server name that handling the request.
For my details check this out: http://weblogs.asp.net/owscott/archive/2009/01/18/web-farms-and-telling-which-node-is-handling-a-request-in-asp-net.aspx
nastymatt
124 Posts
Re: How to test and verify request on NLB
Jul 05, 2012 02:57 PM|LINK
That won't work znerses... you may hit one server (say when browsing the home page) and then when you decide to work out which server it is by querying your file it may then hit the other server (lets not depend on sticky sessions).
Response header is by far the best way to know for sure which server you are hitting when on that page.