How to Fiddle(r) with SharePoint 2010

10 downloads 205 Views 780KB Size Report
What is Fiddler? ... IIS Log Parser. • Http roundtrip analysis. – Fiddler. – Netmon 3.4. • Developer ... blogs.msdn.com/b/shivajin/archive/2009/05/11/deep-.
How to Fiddle(r) with SharePoint 2010 Penny Coventry, MVP

Speaker Bio • Independent Consultant • Author/Co-author of 9 SharePoint Books • Trainer • Worked with SharePoint since 2001 • Based in UK, work in Europe and US • Microsoft MVP SharePoint Server • Blogs/Web Site – http://www.sharepointdesignerstepbystep.com/

• Twitter: @pjcov

Content • • • • •

What is it and how does it Work? Getting to Know Fiddler Traffic Import Summary Resources

What is Fiddler? It’s just one of the Tools of your trade • Developer – SPMonitoredScope – Developer Dashboard – Fx Cop (.NET Code Analysis) – SP Dispose Check – IE Dev Toolbar

• Profiling – – – –

Perfmon SQL Profiler Win DBG SQLIO Disk Subsystem Benchmark Tool

• Log analysis – – – –

SPDiag ULSViewer Performance Analyzer Logs (PAL) IIS Log Parser

• Http roundtrip analysis – Fiddler – Netmon 3.4

But Really – What is it? • It’s Free • First Released October 2003 • Developed by one man: Microsoft employee: Eric Lawrence

What does it do? • Capture and view all HTTP and HTTPS • “Fiddle” with incoming and outgoing data – Modifies Page Requests and Responses – Manipulates timing – Decrypts HTTPS traffic

Who uses Fiddler? • Microsoft engineers • Support teams • Lots of external web developers (10K+ downloads per week) • Security researchers • SharePoint Admins • Spence Harbar • Todd Klindt • … • Some bad guys 

How does Fiddler work? Firewall

Firefox

CryptoAPI

Internet Explorer

Office

SPD 2010

Source: Microsoft

WinHTTP

WinINET

Fiddler

Company Proxy

http://intranet .

Demo Getting to know Fiddler

A quick tour of the Fiddler UI

Session Icons

Filtering HTTP Traffic • • • • • •

Application Type Filter - Toggle QuickExec box Process Filter Filters tab Find Sessions Rules

QuickExec box • Type commands: – – – – –

Cls ?sometext >40000 =301 =POST

– http://www.fiddler2.com/fiddler/help/quickexec.asp

• Write Your Own – FiddlerScript • neXpert Performance Tool – Adds commands – Generates HTML recommendations report

Help with SharePoint Captures • Kerberos – http://www.microsoft.com/download/ en/details.aspx?id=23176 – Attend Spence Harbar’s session tomorrow afternoon

InfoPath • Darvish Shadravan: SharePoint Conference 2011, session: SPC296 • blogs.msdn.com/b/shivajin/archive/2009/05/11/deep-

dive-on-infopath-request-and-response.aspx • ipfswebtest.codeplex.com/

Demo Filters

InfoPath

Mac

PC

Debugging non-Windows clients

Windows Phone

iPad 2

Linux

Fiddler

Source: Microsoft

Internet

What about Firefox? • Used to be a problem – Reconfigure proxy settings every time you start and stop Fiddler – FiddlerHook pluggin for Firefox 3+

• Firefox proxy settings to – Use system proxy – Behaves like IE

Demo Remote Clients

Export / Import • Import web traffic from other tools – HTTP Archive JSON (.har) – HTTP Archive XML (exported from IE9 Developer Tools Network Tab)

• Export formats – – – – – – – –

Session Archive ZIP (SAZ) HTTP Archive JSON v1.1 HTTP Archive JSON v1.2 Visual Studio Web Test XML WCAT Load Test Script Raw Files Meddler Scripts (added in v2.3.5) HTML5 AppCache Manifests (added in v2.3.6)

• IE 9 -> Developer Tools -> Network tab blogs.msdn.com/b/ie/archive/2010/04/22/ie9-developer-toolsnetwork-tab.aspx msdn.microsoft.com/en-us/library/gg130952(v=VS.85).aspx

SAZ Files • Specially formatted .zip files • Stores HTTP(S) traffic for later use – File -> Save – QuickExec box: • dump • Savesaz filename

– nExpert tab: Save Sessions \w Report to Zip – File -> Load Archive

• Can be Password-protected/Encrypted File -> Fiddler Options -> General • FiddlerCap – – – –

Used to troubleshoot website problems Lightweight version of Fiddler Non-technical user creates SAZ file Sends to Expert for Analysis

Demo Traffic Export/Import

A quick tour of the Fiddler UI

Fiddler application with extensions

Fiddler 2

Your application hosting FiddlerCore

YourApp.exe

ExecAction.exe

Inspector2 Inspector2 IFiddlerExtension IFiddlerExtension

Fiddler ScriptEngine Your FiddlerScript

FiddlerCore

Xceed*.dll

Makecert.exe

Source: Microsoft

FiddlerCore Xceed*.dll

Makecert.exe

Summary • HTTP/HTTPS Debugger • More than just traffic capture • Runs as Proxy Server: – Local Machine – Remote Server

• Written in C# • Free: www.fiddler2.com

Resources • MSDN blogs: – blogs.msdn.com/b/fiddler/ – blogs.msdn.com/b/nexpert/

• Discussion group: groups.google.com/group/httpfiddler • Twitter tag: #fiddler2 • Facebook: www.facebook.com/pages/Fiddler-Web-Debugger/214143918785

• Other Useful links: – stackoverflow.com/questions/tagged/fiddler – serverfault.com/search?q=fiddler – www.eggheadcafe.com/searchform.aspx?search=fiddler

• HAR file to Page Speed – www.stevesouders.com/blog/2010/05/01/har-to-page-speed/ – stevesouders.com/flint/



neXpert Performance Analysis Plugin – www.microsoft.com/download/en/search.aspx?q=nexpert

Thank You for attending this session! Please fill in the evaluation form