note: session includes demos and code samples. for optimal viewing, please sit near the front!
TRANSCRIPT
![Page 1: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/1.jpg)
Become a Web Debugging Virtuoso with Fiddler
Eric LawrenceProgram ManagerMicrosoft Corporation
CL25
Note: Session includes demos and code samples. For optimal viewing, please sit near the front!
![Page 2: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/2.jpg)
Fiddler: Origins
![Page 3: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/3.jpg)
Once upon a time…
![Page 4: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/4.jpg)
Oh no! What happened?!?
![Page 5: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/5.jpg)
There must be a better way…
![Page 6: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/6.jpg)
Fiddler: Origins
ApplicationsNetwork
APIsProxy Website
![Page 7: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/7.jpg)
Fiddler: Origins
![Page 8: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/8.jpg)
Fiddler: Origins
![Page 9: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/9.jpg)
Fiddler: Origins
+
![Page 10: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/10.jpg)
Fiddler: version 1
> The first Fiddler build was released in October 2003.
![Page 11: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/11.jpg)
Fiddler: Evolution
Six years,~17k lines of C#,
51+ release builds,and 700+ cans of Diet Mountain Dew
later…
![Page 12: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/12.jpg)
Fiddler: Today
![Page 13: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/13.jpg)
Understanding Extensibility
Fiddler 2
Fiddler ScriptEngine
Inspector2
Inspector2IFiddlerExtens
ion IFiddlerExtens
ion
Fiddler Proxy
Exe
cAct
ion.e
xe
Your FiddlerScript
Xceed*.dll Makecert.exe
You
r A
uto
mati
on
![Page 14: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/14.jpg)
Getting to know Fiddler
A quick tour of the Fiddler UI
Demo
![Page 15: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/15.jpg)
Scenario
Browsers, applications, and devices
Traffic Monitoring
![Page 16: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/16.jpg)
Typical Architecture
Internet Explorer
WinINET
Office
CryptoAPI WinHTTP
Fiddler
Firefox
Upstream Proxy
example.com
Firewall
![Page 17: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/17.jpg)
FiddlerHook for Firefox
![Page 18: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/18.jpg)
Debug Across Machines
Fiddler
Mac
Internet
Lin
ux
Pock
etP
CPC
![Page 19: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/19.jpg)
Tips & Tricks
> YourApp.exe.config<configuration> <system.net> <defaultProxy> <proxy bypassonlocal="false" usesystemdefault="true" /> </defaultProxy> </system.net></configuration>
> or, use http://ipv4.fiddler
![Page 20: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/20.jpg)
Fiddler as a Reverse Proxy
Internet Explorer
WinINET
Office
CryptoAPI WinHTTP
Fiddler(Port 80)
Firefox
Upstream Proxy
IIS or Apache(Port 81)
Firewall
![Page 21: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/21.jpg)
HTTPS Traffic DecryptionFiddler dynamically generates interception certificates chained to a self-signed root.
![Page 22: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/22.jpg)
Scenario
Store Requests and Responses
Traffic Archiving
![Page 23: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/23.jpg)
Fiddler has many output options
> Copy sessions to the clipboard> Store as a plaintext file> Extract binary response bodies> Archive to a database> Export a Visual Studio .WebTest file> Write your own…
![Page 24: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/24.jpg)
The SAZ file format
Session Archive Zip files contain:
> Request and response bytes> Timing and other metadata> HTML index file
For security, SAZ files may be encrypted
![Page 25: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/25.jpg)
FiddlerCap – Lightweight capture tool
http://www.fiddlercap.com
![Page 26: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/26.jpg)
Scenario
Examine Requests and Responses
Traffic Analysis
![Page 27: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/27.jpg)
Filtering Traffic
> Ignore Images & CONNECTs> Application Type Filter> Process Filter> Using QuickExec> Using Find
![Page 28: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/28.jpg)
Spying on IE 8 Accelerators
Demo
![Page 29: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/29.jpg)
Spying on IE8’s Visual Search Suggestions
Demo
![Page 30: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/30.jpg)
Traffic Comparison
Use WinDiff to compare HTTP requests and responses.
![Page 31: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/31.jpg)
Automated (Passive) Analysis
http://websecuritytool.codeplex.com/
![Page 32: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/32.jpg)
Scenario
Change the bytes
Traffic Manipulation
![Page 33: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/33.jpg)
Automated Rewrites
> Simple Built-in Rules> The HOSTS extension
![Page 34: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/34.jpg)
Breakpoint Debugging
Use Fiddler inspectors to
modify requests and responses….
![Page 35: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/35.jpg)
Simple Filters
Flag, modify or remove headers from all requests and
responses.
![Page 36: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/36.jpg)
Request Builder
Create hand-built HTTP requests, or
modify and reissue a request previously captured.
![Page 37: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/37.jpg)
AutoResponder
Replay previously captured or generated traffic.
![Page 38: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/38.jpg)
FiddlerScript
![Page 39: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/39.jpg)
FiddlerScript – Request Modification
static function OnBeforeRequest(oS: Session){
if (oS.uriContains(".aspx")) { oS["ui-color"] = "red";}
if (m_DisableCaching){ oS.oRequest.headers.Remove("If-None-Match"); oS.oRequest.headers.Remove("If-Modified-Since"); oS.oRequest["Pragma"] = "no-cache"; }}
![Page 40: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/40.jpg)
FiddlerScript – Response Modification
static function OnBeforeResponse(oS: Session) {
oS.utilDecodeResponse(); oS.utilPrependToResponseBody("Injected Content!");
}
![Page 41: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/41.jpg)
Scenario
Optimizing Performance with Fiddler
Performance
![Page 42: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/42.jpg)
Build faster websites and services
> Reduce request & response size> Reduce roundtrips> Optimize Compression> Optimize Caching> Simulate Slower Speeds
![Page 43: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/43.jpg)
Expert Analysis with neXpert
![Page 44: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/44.jpg)
Beware the Observer Effect
> Use Fiddler to improve performance> Be careful when using Fiddler to
measure performance
![Page 45: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/45.jpg)
Streaming Mode
Timeline view of Buffering Mode
Timeline view of Streaming Mode
![Page 46: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/46.jpg)
NetMon + VRTA
To minimize Observer Effect when taking low-level timing measurements, prefer packet-sniffer tools.
![Page 47: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/47.jpg)
Scenario
Integrating Fiddler into your tools
Test Integration
![Page 48: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/48.jpg)
ExecAction.exe
> Calls into OnExecAction in script or extensions
> Alternatively, invoke directly by sending a Windows Message:
oCDS.dwData = 61180; // Magic CookieoCDS.cbData = strlen(sData);oCDS.lpData = sData;
SendMessage( FindWindow(NULL, "Fiddler - HTTP Debugging Proxy"),WM_COPYDATA,NULL,(LPARAM) &oCDS);
![Page 49: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/49.jpg)
>>FUTURE
Fiddler 2
Fiddler ScriptEngine
Inspector2
Inspector2IFiddlerExtens
ion IFiddlerExtens
ion
FiddlerCore
Exe
cAct
ion.e
xe
YourApp.exe
FiddlerCore
Fiddler application with extensions
Your application hosting FiddlerCore
Your FiddlerScript
Xceed*.dll
Makecert.exe
Makecert.exe
![Page 50: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/50.jpg)
Programming with FiddlerCore
// Call Startup to tell FiddlerCore to begin // listening on the specified port, register as // the system proxy and decrypt HTTPS traffic.Fiddler.FiddlerApplication.Startup(8877, true, true);
Fiddler.FiddlerApplication.BeforeResponse += delegate(Fiddler.Session oS) { Console.WriteLine("{0}:HTTP {1} for {2}", oS.id, oS.responseCode, oS.fullUrl); }; // Call Shutdown to tell FiddlerCore to stop// listening and unregister as the system proxyFiddler.FiddlerApplication.Shutdown();
![Page 51: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/51.jpg)
>>FUTURE
Fiddler Futures
> VS2010 & .NET 4.0> You tell me!
![Page 52: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/52.jpg)
www.fiddler2.com/pdc/
Questions?
![Page 53: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/53.jpg)
YOUR FEEDBACK IS IMPORTANT TO US!
Please fill out session evaluation
forms online atMicrosoftPDC.com
![Page 54: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/54.jpg)
Learn More On Channel 9
> Expand your PDC experience through Channel 9
> Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses
channel9.msdn.com/learnBuilt by Developers for Developers….
![Page 55: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/55.jpg)
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
![Page 56: Note: Session includes demos and code samples. For optimal viewing, please sit near the front!](https://reader035.vdocuments.mx/reader035/viewer/2022081519/56649dbd5503460f94aaf8e6/html5/thumbnails/56.jpg)