0

This question is a consequence of the following question: determining which server (in a web farm) the asp.net ajax request came from?

The problem is that we commonly use automatically generated proxy classes to communicate with the web method (which may be part of asmx/wcf service). When we receive the response from the web services server, how do we know which server it got processed from?

We receive the response from the server side code which is executing (mostly). When its a script service (which can be called via javascript) its another case altogether.

How can we read the response headers once the web service returns?

Am I constrained to build my own proxy classes to solve this problem?

Community
  • 1
  • 1
deostroll
  • 11,661
  • 21
  • 90
  • 161
  • 1
    Why do you need to know which server in the farm is responding to requests? Surely the point of a farm is that the servers are interchangeable? – Damien_The_Unbeliever Jun 30 '11 at 06:46
  • The point of the web farm is (among others) transparency - client doesn't know about its existence. Building any logic on the client side dependent on the knowledge of real server executing the request is wrong architecture. – Ladislav Mrnka Jun 30 '11 at 07:19
  • I agree w/ both Damien, & Ladislav. People complain the site is slow during peak hours. In the code we have put Trace statements before & after critical points like a db call, or web service call. We also put the `localOnly` attribute for the `trace` element in the web.config to `true`. Which means we can only log-in to the actual server which serviced the call and find out what slowed the site. Its just how we have to carry out our investigation. Any other suggestions are welcome. – deostroll Jun 30 '11 at 10:07
  • Did you find a way to get this done.. I am having similar issue. – Arshya Mar 24 '13 at 14:05

1 Answers1

0

One way. Its not the best way but it will do until something new comes about. If you have a tool like fiddler/burp, you can inspect the response headers. So we must configure the IIS to set the response headers appropriately.

By default they are configured to output something like X-ASP.NET...a good idea would be to add the server name to that...

deostroll
  • 11,661
  • 21
  • 90
  • 161