Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 36188

SharePoint: Quick Troubleshooting Tip: HTTP Response Headers

$
0
0

Often in troubleshooting SharePoint, we’re interested to know on which Web-Front-End (WFE) a certain request landed. When you have multiple WFEs that are load balanced, this is not easily discernable.

One trick is to edit your HOSTS file and point the load balanced URL at the IP address of one WFE. That method certainly has its place, especially when trying to figure out if a certain behavior or error only occurs on some WFEs, but it doesn’t fit every scenario. For example, what if you’re trying to figure out if your load balancer is bouncing you between WFEs, or what if you're trying to simplify log gathering by only getting logs from the server that processed the request?

 

Here’s a method that involves my personal favorite web troubleshooting tool: Fiddler.

Note: This will work for any other web / network capture tool as well. I just happen to like Fiddler.

I’m usually using Fiddler for capturing web traffic anyway, so adding more information to the output only helps.

 

Here’s what you do:

In IIS Manager, find your site and double click on HTTP Response Headers.

You’ll see that there are some already present.

Choose Add

Give the Response header a name. It’s going to be used to denote which WFE you’re hitting so it makes sense to name it “server” or “wfe”, or something like that.
Then give it a value. You don’t have to (and shouldn’t) use the servers actual name.  Just use something that will be unique and help you identify which server it is. For example, maybe you have two load-balanced WFEs with names “PROD-AWG-WEB01”, and “PROD-AWG-WEB02”. You could use “WFE1” and “WFE2” (respectively) for the values.

Now you want to add the same HTTP Response Header to the same IIS site on your other WFEs. The only difference will be the value. On “PROD-AWG-WEB02”, you would use something like “WFE2”, and so on.

 

Then, when you’re troubleshooting, you can take a Fiddler trace and immediately tell which WFE a given request went to.

Also, the value for “SPRequestGUID” is the Correlation ID for the request.

Now you can gather just the one log from the one WFE, and you also have the correlation ID to filter by.

Finding the proper request within a SharePoint ULS log doesn’t get much easier than that.


Viewing all articles
Browse latest Browse all 36188

Trending Articles