Sunday, April 19, 2015

Set Up an IIS Response Header

If you have a test or staging environment, it is helpful to set up a response header if you have multiple Web front ends (WFEs). Then you can easily determine which server the error is on through your browser's developer tools, Fiddler, or an equivalent.

Open IIS 7, click on your site. In the Features View, double-click on HTTP Response Headers icon.



Now click on the Add link in the right navigation pane. For Name, enter something that is meaningful to you. In my example, I chose ServerName. For Value, type in the details. I entered WFE1 in the example below. You don't need the whole server name, just some hint that will quickly identify the server.



Using Fiddler, you can easily see the result under the Headers tab.



Be Concerned About Security

Something to keep in mind is that it's never a good idea to give away too many details about your server so never identify your server names in a production environment. This is just very easy way to help troubleshoot.

SharePoint in Practice

Where SharePoint is considered, when you get an error you always are given a correlation ID. If you know which server you are on, you quickly know which server to check the logs on. In a multi-server farm, this can save a lot of time.
 

1 comment:

  1. Your blog has given me that thing which I never expect to get from all over the websites. Its very easy to understand and very helpful. Nice post guys!

    Web Developer Tips

    ReplyDelete