简体   繁体   中英

find which server in a web farm the web method got executed?

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?

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM