This is probably the most nominal WebPart I have ever seen / written but I really needed it this morning. As you can guess it just uses a ServerVariables object (off the current context request) to expose the relevant environment variables, in this case just the server name.
The reason this came about was in large SharePoint farms it is notably important when doing certain types of architecture troubleshooting to know which WFE you are hitting. Andâ€¦.wellâ€¦that’s really it. At least you don’t have to put the WSP together I guess.
So this is what that WebPart does. Just install the WSP and deploy it in Central Admin (as noted in previous posts, I never automate the deployment step).
The WebPart is Feature activated. In the site collection features, locate the Server Name WebPart feature and activate it.
Once activated, you will find the WebPart under the ARB Security Solutions header in the WebPart gallery.
Add it to the page, and it will display the server name in the SharePoint farm responding.
Well I guess I should actually give a download link :)