Home
%3CLINGO-SUB%20id%3D%22lingo-sub-799618%22%20slang%3D%22en-US%22%3EHow%20to%20take%20an%20HTTP%20trace%20from%20the%20client%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-799618%22%20slang%3D%22en-US%22%3E%3CP%3ETroubleshooting%20and%20debugging%20Web%20applications%20starts%20with%20a%20basic%20question%3A%20what%20does%20the%20client%20experience%2C%20and%20what%20happens%20on%20the%20server%3F%20This%20article%20helps%20answer%20one%20of%20the%20first%20questions%20a%20troubleshooting%20professional%20would%20ask%3A%20what%20does%20the%20client%20%E2%80%9Csee%E2%80%9D%20from%20the%20server%3F%3C%2FP%3E%0A%3CP%3EScreenshots%20from%20the%20browser%20or%20client%20sometimes%20provide%20this%20answer.%20But%20many%20times%2C%20HTTP%20requests%20leave%20the%20client%20and%20responses%20are%20received%20long%20before%20a%20human%20could%20collect%20screen%20captures.%20Or%20maybe%20it%20is%20the%20sequence%20that%20matters%2C%20not%20only%20one%20request.%20And%2C%20with%20AJAX%2C%20a%20client%20may%20not%20display%20anything%20relevant%20at%20all.%20So%2C%20here%20we%20are%3A%20we%20need%20to%20collect%20some%20HTTP%20traces%3B%20an%20HTTP%20traffic%20recording%20for%20investigation.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F126587iFCC6F111FEB3E1D2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Client%20and%20IIS.png%22%20title%3D%22Client%20and%20IIS.png%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EClient%20and%20IIS%2C%20logs%20to%20check%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22HttpWatch%22%20id%3D%22toc-hId-1796312547%22%20id%3D%22toc-hId-1796312547%22%3EPreferred%20method%20%E2%80%93%20HTTP%20Watch%3C%2FH2%3E%0A%3CP%3EAs%20a%20browser%20add-on%2C%20HTTP%20Watch%20helps%20collect%20all%20information%20needed%2C%20with%20minimal%20interference%20and%20in%20a%20consistent%20manner.%20The%20steps%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EDownload%20%3CSTRONG%3EHttpWatch%3C%2FSTRONG%3E%E2%80%93%20the%20basic%20version%20is%20free%20%E2%80%93%20from%20%3CA%20href%3D%22http%3A%2F%2Fwww.httpwatch.com%2Fdownload%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ewww.httpwatch.com%2Fdownload%3C%2FA%3E.%20It%20is%20a%20good%20practice%20to%20install%20the%20latest%20version.%3C%2FLI%3E%0A%3CLI%3EAfter%20installing%20the%20tool%2C%20launch%20an%20Internet%20Explorer%20browser.%20Select%20to%20launch%20a%20new%20window%2C%20do%20not%20just%20open%20a%20new%20tab%3B%20this%20ensures%20a%20new%20fresh%20session%20will%20be%20recorded%20for%20the%20target%20site.%3C%2FLI%3E%0A%3CLI%3EWith%20the%20new%20browser%20instance%2C%20press%20%3CSTRONG%3E%3CEM%3EShift%2BF2%3C%2FEM%3E%3C%2FSTRONG%3Eon%20the%20keyboard%20or%20select%20the%20%3CSTRONG%3E%3CEM%3EView%3C%2FEM%3E%3C%2FSTRONG%3E%26gt%3B%20%3CSTRONG%3E%3CEM%3EExplorer%20Bars%3C%2FEM%3E%3C%2FSTRONG%3E%26gt%3B%20%3CSTRONG%3E%3CEM%3EHttpWatch%20Basic%3C%2FEM%3E%3C%2FSTRONG%3Efrom%20the%20menu%20of%20the%20browser.%20This%20will%20bring%20up%20the%20HttpWatch%20extension%3A%3C%2FLI%3E%0A%3CLI%3EMake%20sure%20the%20%3CSTRONG%3E%3CEM%3ERecord%3C%2FEM%3E%3C%2FSTRONG%3Ebutton%20is%20pressed%20HttpWatch%2C%20then%20navigate%20and%20use%20the%20web%20application%20from%20the%20browser%20as%20normal%2C%20trying%20to%20reproduce%20the%20issue%20being%20investigated.%20Continue%20working%20on%20the%20site%20until%20you%20have%20reproduced.%3C%2FLI%3E%0A%3CLI%3EOnce%20finished%2C%20stop%20and%20save%20the%20trace%20in%20HWL%20format.%20This%20is%20the%20format%20that%20HttpWatch%20proposes%20as%20default.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F126596i09B79543C5817E6F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22HttpWatch%20tool%2C%20a%20brower%20add-on.png%22%20title%3D%22HttpWatch%20tool%2C%20a%20brower%20add-on.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22Fiddler%22%20id%3D%22toc-hId--755844414%22%20id%3D%22toc-hId--755844414%22%3ESecond%20best%20%E2%80%93%20Fiddler%3C%2FH2%3E%0A%3CP%3EFiddler%20is%20known%20as%20THE%20tool%20to%20be%20used%20in%20troubleshooting%20from%20the%20client%20side.%20It%20has%20been%20long%20used%20by%20engineers%20and%20developers%20for%20its%20features.%20But%20there%20are%20a%20couple%20of%20points%20I%20want%20to%20emphasize.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFiddler%20becomes%20a%20proxy%20for%20the%20system%20while%20it%20runs.%20And%20so...%3C%2FLI%3E%0A%3CLI%3EIt%20may%20collect%20%3CSTRONG%3Eall%3C%2FSTRONG%3EHTTP%20traffic%20on%20the%20machine%2C%20if%20not%20filtered.%20While%20sometimes%20desirable%2C%20in%20most%20cases%20it%20may%20add%20some%20%E2%80%9Cnoise%E2%80%9D%20to%20the%20analysis.%3C%2FLI%3E%0A%3CLI%3EBecause%20it%20is%20a%20proxy%2C%20it%20may%20interfere%20with%20network%20configuration%20or%20settings.%20I%E2%80%99ve%20seen%20cases%20where%20the%20issue%20could%20not%20be%20reproduced%20because%20of%20that.%20Fiddler%20seemed%20to%20be%20fixing%20the%20problem%20%3Asmiling_face_with_smiling_eyes%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ESteps%20to%20take%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EDownload%20Fiddler%20from%20%3CA%20href%3D%22https%3A%2F%2Fwww.telerik.com%2Fdownload%2Ffiddler%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.telerik.com%2Fdownload%2Ffiddler%3C%2FA%3Eand%20in%20install.%3C%2FLI%3E%0A%3CLI%3EBefore%20reproducing%20the%20problem%2C%20you%20might%20want%20to%20close%20all%20browser%20windows%2C%20to%20start%20a%20fresh%20session.%3C%2FLI%3E%0A%3CLI%3EStart%20the%20tool%2C%20then%20the%20browser%20or%20client%20app.%20Reproduce%20the%20problem.%3C%2FLI%3E%0A%3CLI%3EDo%20decrypt%20HTTPS.%20Don%E2%80%99t%20forget%20to%20decrypt%20HTTPS.%20If%20you%20send%20the%20encrypted%20session%20traffic%20to%20a%20support%20professional%2C%20most%20of%20the%20useful%20information%20may%20not%20be%20visible.%20Fiddler%20would%20warn%20about%20it%20(see%20below)%3B%20alternatively%2C%20%3CSTRONG%3E%3CEM%3EMenu%3C%2FEM%3E%3C%2FSTRONG%3E%26gt%3B%20%3CSTRONG%3E%3CEM%3ETools%3C%2FEM%3E%3C%2FSTRONG%3E%26gt%3B%20%3CSTRONG%3E%3CEM%3EOptions%3C%2FEM%3E%3C%2FSTRONG%3E%26gt%3B%20%3CSTRONG%3E%3CEM%3EHTTPS%3C%2FEM%3E%3C%2FSTRONG%3Etab%20%26gt%3B%20Check%20%3CEM%3EDecrypt%20HTTPS%20traffic%3C%2FEM%3E.%3C%2FLI%3E%0A%3CLI%3EFinally%2C%20%3CSTRONG%3E%3CEM%3EMenu%3C%2FEM%3E%3C%2FSTRONG%3E%26gt%3B%20%3CSTRONG%3E%3CEM%3EFile%3C%2FEM%3E%3C%2FSTRONG%3E%26gt%3B%20%3CSTRONG%3E%3CEM%3ESave%3C%2FEM%3E%3C%2FSTRONG%3E...%20you%20know%20the%20drill.%20Send%20the%20resulting%20trace%20log%20file%20to%20support.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F126594i11FA305642059CD2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Fiddler%20troubleshooting%20tool.png%22%20title%3D%22Fiddler%20troubleshooting%20tool.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22Browser%22%20id%3D%22toc-hId-986965921%22%20id%3D%22toc-hId-986965921%22%3EBrowser%E2%80%99s%20developer%20tools%2C%20Network%20tab%3C%2FH2%3E%0A%3CP%3EFinally%2C%20using%20the%20features%20of%20the%20browser%20will%20do%2C%20assuming%20that%20the%20client%20is%20a%20browser%2C%20of%20course.%20There%20are%20some%20drawbacks%2C%20such%20as%20format%20inconsistencies%20from%20browser%20to%20browser.%3C%2FP%3E%0A%3CP%3EWe%20need%20to%20collect%20a%20HAR%2C%20HTTP%20Archive.%20My%20personal%20favorite%20is%20Firefox.%20Chrome%20may%20be%20fine.%20There%20is%20glitch%20in%20Egde%2FIE%20%E2%80%93%20they%20would%20not%20start%20developer%20tools%20with%20a%20new%20empty%20tab.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EYou%20might%20want%20to%20close%20all%20browser%20windows%2C%20to%20start%20a%20fresh%20session.%3C%2FLI%3E%0A%3CLI%3EOpen%20the%20new%20browser%20window.%20Then%20open%20its%20developer%20tools%2C%20going%20to%20network%20tab.%3C%2FLI%3E%0A%3CLI%3EDo%20enable%20Persist%20logs%3B%20make%20sure%20that%20the%20sequence%20of%20requests%20is%20kept%20and%20they%20don%E2%80%99t%20disappear%20with%20each%20navigation%20to%20a%20new%20page.%3C%2FLI%3E%0A%3CLI%3EReproduce%20the%20problem%3B%20disabling%20cache%20may%20be%20relevant.%3C%2FLI%3E%0A%3CLI%3ESave%20the%20requests%20session%20as%20HAR%2C%20HTTP%20Archive.%20Right-click%20on%20a%20request%2C%20and%20the%20option%20should%20show%20up%20in%20the%20contextual%20menu.%3C%2FLI%3E%0A%3CLI%3ESend%20the%20resulting%20trace%20log%20file%20to%20support.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20881px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F126595i1E90C92AF2301558%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Firefox%20developer%20tools%2C%20network%20tab.png%22%20title%3D%22Firefox%20developer%20tools%2C%20network%20tab.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAll%20the%20best!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-799618%22%20slang%3D%22en-US%22%3E%3CP%3ESo%20you%20have%20a%20problem%20with%20a%20web%20app.%20One%20of%20the%20first%20question%20is%20%3CEM%3E%22what%20is%20the%20client%20seeing%22%3C%2FEM%3E%3F%20Collecting%20screenshots%20may%20not%20be%20sufficient%2C%20or%20may%20not%20illustrate%20anything%20useful.%20Then%20how%20do%20we%20properly%20collect%20data%20to%20help%20on%20investigation%3F%3C%2FP%3E%3C%2FLINGO-TEASER%3E

Troubleshooting and debugging Web applications starts with a basic question: what does the client experience, and what happens on the server? This article helps answer one of the first questions a troubleshooting professional would ask: what does the client “see” from the server?

Screenshots from the browser or client sometimes provide this answer. But many times, HTTP requests leave the client and responses are received long before a human could collect screen captures. Or maybe it is the sequence that matters, not only one request. And, with AJAX, a client may not display anything relevant at all. So, here we are: we need to collect some HTTP traces; an HTTP traffic recording for investigation.

 

Client and IIS.pngClient and IIS, logs to check

 

Preferred method – HTTP Watch

As a browser add-on, HTTP Watch helps collect all information needed, with minimal interference and in a consistent manner. The steps:

  1. Download HttpWatch – the basic version is free – from www.httpwatch.com/download. It is a good practice to install the latest version.
  2. After installing the tool, launch an Internet Explorer browser. Select to launch a new window, do not just open a new tab; this ensures a new fresh session will be recorded for the target site.
  3. With the new browser instance, press Shift+F2 on the keyboard or select the View > Explorer Bars > HttpWatch Basic from the menu of the browser. This will bring up the HttpWatch extension:
  4. Make sure the Record button is pressed HttpWatch, then navigate and use the web application from the browser as normal, trying to reproduce the issue being investigated. Continue working on the site until you have reproduced.
  5. Once finished, stop and save the trace in HWL format. This is the format that HttpWatch proposes as default.

HttpWatch tool, a brower add-on.png

 

 

Second best – Fiddler

Fiddler is known as THE tool to be used in troubleshooting from the client side. It has been long used by engineers and developers for its features. But there are a couple of points I want to emphasize.

  • Fiddler becomes a proxy for the system while it runs. And so...
  • It may collect all HTTP traffic on the machine, if not filtered. While sometimes desirable, in most cases it may add some “noise” to the analysis.
  • Because it is a proxy, it may interfere with network configuration or settings. I’ve seen cases where the issue could not be reproduced because of that. Fiddler seemed to be fixing the problem :smiling_face_with_smiling_eyes:

Steps to take:

  1. Download Fiddler from https://www.telerik.com/download/fiddler and in install.
  2. Before reproducing the problem, you might want to close all browser windows, to start a fresh session.
  3. Start the tool, then the browser or client app. Reproduce the problem.
  4. Do decrypt HTTPS. Don’t forget to decrypt HTTPS. If you send the encrypted session traffic to a support professional, most of the useful information may not be visible. Fiddler would warn about it (see below); alternatively, Menu > Tools > Options > HTTPS tab > Check Decrypt HTTPS traffic.
  5. Finally, Menu > File > Save... you know the drill. Send the resulting trace log file to support.

Fiddler troubleshooting tool.png

 

 

Browser’s developer tools, Network tab

Finally, using the features of the browser will do, assuming that the client is a browser, of course. There are some drawbacks, such as format inconsistencies from browser to browser.

We need to collect a HAR, HTTP Archive. My personal favorite is Firefox. Chrome may be fine. There is glitch in Egde/IE – they would not start developer tools with a new empty tab.

  1. You might want to close all browser windows, to start a fresh session.
  2. Open the new browser window. Then open its developer tools, going to network tab.
  3. Do enable Persist logs; make sure that the sequence of requests is kept and they don’t disappear with each navigation to a new page.
  4. Reproduce the problem; disabling cache may be relevant.
  5. Save the requests session as HAR, HTTP Archive. Right-click on a request, and the option should show up in the contextual menu.
  6. Send the resulting trace log file to support.

 

Firefox developer tools, network tab.png

 

 

All the best!