1 / 20

When Errors Happen: Debugging Microsoft Silverlight

When Errors Happen: Debugging Microsoft Silverlight. John Papa www.johnpapa.net. Agenda 20 Minutes of Essential Tools. Tools for the job Which tool for which job HTTP Sniffing Debugging script errors Cross domain detection and debugging Testing posts and gets. Tools.

lluvia
Download Presentation

When Errors Happen: Debugging Microsoft Silverlight

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. When Errors Happen: Debugging Microsoft Silverlight John Papa www.johnpapa.net

  2. Agenda20 Minutes of Essential Tools • Tools for the job • Which tool for which job • HTTP Sniffing • Debugging script errors • Cross domain detection and debugging • Testing posts and gets

  3. Tools • The right tools for the job is critical

  4. Debugging Arsenal • Tools the fit the bill for Silverlight Fiddler 2 IE 8’s Developer Tools Silverlight Spy Web Development Helper FireBug

  5. Watching Over You3 Free Tools • Fiddler 2 • Watches all HTTP traffic on a PC • Issue posts & gets, modify headers, messages • Silverlight Spy • Monitor HTTP traffic for a Silverlight application only • FireBug • Plug in for FireFox • WebDevelopmentHelper • Add-in for Internet Explorer • Works in both version 7 and 8

  6. HTTP SniffingThe Watchdog • Fiddler, WebDevelopmentHelper, FireBug • Sniff out HTTP traffic • Watch requests, responses, and status

  7. demo HTTP Sniffing

  8. Script ErrorsIE 8’s Development Tools • Debug script • Locals • Watches • Breakpoints

  9. Cross Domain Issues • Silverlight client calls a remote server’s service • Service is on different domain than the Silverlight client’s hosted server • Rejection by default • Must allow service to be called • REST, WCF, SOAP • Format: • http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx

  10. Cross Domain Policies • Silverlight looks for both • ClientAccessPolicy.xml (Silverlight) • CrossDomain.xml (Flash format) • File must be in the web root • NOT APP ROOT! • Use HTTP sniffer to detect problems

  11. Restrictive Policy <?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers=“SOAPAction, Content-Type"> <domain uri="http://johnpapa.net"/> </allow-from> <grant-to> <resource path="/MyAwesomeServices/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access> </access-policy>

  12. Cross Domain PoliciesWatching • Silverlight can access web services on different domains • Looks for cross domain policy files • Detect the policy files and analyze them • Options: • HTTP Sniffing detects a problem • Browse directly to see them • Silverlight Spy to analyze them

  13. demo Cross Domain Checks

  14. Tools ReferenceKey Features • Fiddler 2 • HTTP monitoring • Issue posts & gets, modify headers, messages • fiddler2.com • Silverlight Spy • HTTP monitoring • Explore Isolated Storage contents • silverlightspy.com

  15. Tools ReferenceKey Features • WebDevelopmentHelper • HTTP monitoring for Internet Explorer • projects.nikhilk.net/WebDevHelper • FireBug • HTTP monitoring for FireFox • getfirebug.com • Internet Explorer 8 Developer Tools • Debugging scripts and page analysis • Built into IE 8

  16. Right Tool, Right Job

  17. Thanks!Find More Information … • silverlight.net • johnpapa.net

  18. Please Complete an Evaluation FormYour feedback is important! • Evaluation forms can be found on each chair • Temp Staff at the back of the room have additional evaluation form copies

  19. © 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.

More Related