Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community
SharePoint Tidbit - What WFE am I connected to
Published May 15 2019 03:17 PM 563 Views

First published on TECHNET on Nov 13, 2017
Hello All

Recently got into a discussion around how to figure out which WFE a user is connected to when you have 'Sticky sessions' disabled as is recommended in SharePoint 2016.  Here are some choices that I came up with.

    1. We could add a response header (See Here ) this would require that we use a sniffer on the client to capture the traffic so it might not be the most functional choice.

 

    1. Add HTML code to the MasterPage, Microsoft Best Practice suggests that you should stay away from editing your Master Page if at all possible.

 

    1. Another possibility is to use the SharePoint Developer Dashboard, this tool presents a lot of information (See here for more details) on a connection by connection basis.  One of the properties is the server name :smiling_face_with_smiling_eyes:  You can enable this tool by running the following code on any SharePoint server in a PowerShell window.



$d = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings
$d.DisplayLevel = 'On'
$d.TraceEnabled = $true
$d.Update()

Once done with your troubleshooting it is recommended that you turn it off by running the following code on your SharePoint Server.



$d = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings
$d.DisplayLevel = 'Off'
$d.Update()
As you can see from this screenshot in my test environment the tool can show you which WFE your connected for each connection.



Pax

Version history
Last update:
‎Apr 28 2020 03:31 PM
Updated by: