When errors happen debugging microsoft silverlight
1 / 20

When Errors Happen: Debugging Microsoft Silverlight - PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

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.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

When Errors Happen: Debugging Microsoft Silverlight

John Papa


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


  • The right tools for the job is critical

Debugging Arsenal

  • Tools the fit the bill for Silverlight

Fiddler 2

IE 8’s Developer Tools

Silverlight Spy

Web Development Helper


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

HTTP SniffingThe Watchdog

  • Fiddler, WebDevelopmentHelper, FireBug

  • Sniff out HTTP traffic

  • Watch requests, responses, and status


HTTP Sniffing

Script ErrorsIE 8’s Development Tools

  • Debug script

    • Locals

    • Watches

    • Breakpoints

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


  • Format:

    • http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx

Cross Domain Policies

  • Silverlight looks for both

    • ClientAccessPolicy.xml (Silverlight)

    • CrossDomain.xml (Flash format)

  • File must be in the web root


  • Use HTTP sniffer to detect problems

Restrictive Policy

<?xml version="1.0" encoding="utf-8"?>





http-request-headers=“SOAPAction, Content-Type">

<domain uri="http://johnpapa.net"/>



<resource path="/MyAwesomeServices/"






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


Cross Domain Checks

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

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

Right Tool, Right Job

Thanks!Find More Information …

  • silverlight.net

  • johnpapa.net

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

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

  • Login