When managing a SharePoint Farm, determining which Web Server you are talking to can be a hassle. One way is to add code to the default.aspx or master pages to display this information.
Another way is to create a web part that can be used on any page or on any site. I have provided a webpart and solution to do this.
The web part is a simple solution. To build the solution, you must do the following:
- Download the
.
- Download and install
. This is a Microsoft Utility for packaging applications component and is used to create "Web Part" and "Feature" Packages.
- Decompression the solution on a server running Microsoft Office SharePoint Server 2007.
- Open & Build Solution in Visual Studio
- Open File Explorer, and browse to the Debug directory
- Modify the MakeWebPartPackage.bat to reference the location you installed the CAB SDK.
- Run MakeWebPartPackage.bat. This will create the package and install it on the local instance of the MOSS 2007 Server.
- Browse to the Debug\Package directory.
- Copy and Run the ServerInfoWebPartPackage.bat and ServerInfoWebPartPackage.wpp to any SharePoint Server to install it to the Server Gallery.
If you do not have Visual Studio, but would like to used this Web Part, simply used the files mentioned in step 9, which are already compiled and ready to use in the "\Web Part Package" directory in the Solution Zip File.
What you will see
By default:
- The web part will only be visible to Web and Site Administrator.
- The web part will display the Server Name
Features:
- In the "Modify Shared Web Part" screen, under "Miscellaneous" you can turn on an option for "Expanded Information"