<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Silverlight Shinobi</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/robertev/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/robertev/feed.xml</link>
    <description>Secret techniques, tips and deadly tricks with Silverlight!</description>
    <lastBuildDate>Tue, 16 Apr 2019 06:15:16 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Windows 8: Windows Store App Labs!</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/windows-8-windows-store-app-labs</link>
      <pubDate>Tue, 22 Jan 2013 11:58:35 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2013/01/22/windows-8-windows-store-app-labs/</guid>
      <description><![CDATA[Windows Store App Labs! 
Windows Store App Labs (WSALs) are here! A place&nbsp;where you can...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/13/metablogapi/5444.windows8logo_0A34E136.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-13-metablogapi/5444.windows8logo_5F00_0A34E136.png"><img style="max-width: 550px;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/38/13/metablogapi/5444.windows8logo_0A34E136.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-38-13-metablogapi/5444.windows8logo_5F00_0A34E136.png" alt="" border="0" /></a></span></p>
<p><span style="font-family: arial black,avant garde; font-size: x-large;"><strong>Windows Store App Labs! </strong></span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Windows </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Store App Labs (WSALs) are here! A place&nbsp;where you can access Windows 8 devices, get </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">design help, and meet with Windows 8 Experts to make your app great! <strong>All for </strong></span><strong><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">free!</span></strong></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"><strong>Get technical guidance from Windows 8 Experts <br /></strong></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Our </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Windows Store app developer experts are on-hand to help you get started, to test your app and </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">offer any technical advice you need! <br /></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">We can help you with coding tips, </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">debugging, and prepping your app to submit to the Windows Store.</span>&nbsp;</p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"><strong>Check out and test on the newest Windows 8 devices <br /></strong></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Test </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">your app on a variety of screen sizes, input methods, and chipsets with the </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">latest Windows 8 devices including Windows RT tablets, Ultrabooks, All-in-Ones, </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">and more.<br /></span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Designers </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">will review your app mock-ups or your complete app and provide feedback on how </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">you can improve your app&rsquo;s layout, navigation, live tile, and other UI </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">elements.</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">As you get started - check out <a href="http://blogs.msdn.com/b/windowsstore/archive/2012/11/19/5-tips-to-getting-your-apps-certified-quickly.aspx">5 tips to help you get your app certified</a> quickly, <a href="http://blogs.msdn.com/b/cbowen/archive/2012/08/01/the-top-10-windows-8-secrets-of-app-success.aspx">top 10 app secrets of success</a>, <a href="http://social.msdn.microsoft.com/Forums/en-US/category/windowsapps">Win8 Forms</a>&nbsp;and more helpful information on <a href="https://applabs.msregistration.com/LabResources.aspx">our lab resources page</a>.</span></p>
<p><strong><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: medium;">All for free! </span></strong></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Space </span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">is limited.&nbsp; Please register for a lab in your location:</span><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"></span></p>
<p>&nbsp;</p>
<table style="width: 759px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p><strong>Country</strong></p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p><strong>City</strong></p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><strong>Link</strong></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>Canada</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Vancouver</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=52&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=52&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>US</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>San Francisco/Santa Clara</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=139&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=139&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>Canada</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Toronto</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=40&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=40&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>US</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>New York</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=140&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=140&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>England</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>London</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=9&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=9&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>France</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Paris</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=13&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=13&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>Belgium</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Brussels</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=25&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=25&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>Czech Republic</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Prague</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=25&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=25&amp;userid=null#list</a><br />&nbsp;</p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>Sweden</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Kista</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=22&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=22&amp;userid=null#list</a><br />&nbsp;</p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>Turkey</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Istanbul</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><span style="text-decoration: underline;"><a href="https://applabs.msregistration.com/LabList.aspx?drop=22&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=22&amp;userid=null#list</a></span></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>India</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Mumbai</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=22&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=22&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>India</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Bangalore</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=3&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=3&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>China</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Beijing</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=11&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=11&amp;userid=null#list</a></p>
</td>
</tr>
<tr>
<td valign="bottom" nowrap="nowrap" width="101">
<p>China</p>
</td>
<td valign="bottom" nowrap="nowrap" width="167">
<p>Shanghai</p>
</td>
<td valign="bottom" nowrap="nowrap" width="491">
<p><a href="https://applabs.msregistration.com/LabList.aspx?drop=58&amp;userid=null#list">https://applabs.msregistration.com/LabList.aspx?drop=58&amp;userid=null#list</a></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"></span></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>HTML5 in MVC</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/html5-in-mvc</link>
      <pubDate>Thu, 09 Feb 2012 11:04:08 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2012/02/09/html5-in-mvc/</guid>
      <description><![CDATA[Live Demo - Source Code
HTML5 is a hot topic lately and developers are eagerly investigating ways...]]></description>
      <content:encoded><![CDATA[<p><a href="http://www.robertev.com/mvc">Live Demo</a> - <a href="http://html5mvc.codeplex.com">Source Code</a></p>
<p><br />HTML5 is a hot topic lately and developers are eagerly investigating ways to use HTML5. One of the more widely discussed capabilities are the built-in form type controls enforcing validation and allowing for placeholder values - new input types such as &ldquo;color&rdquo;, &ldquo;date|datetime&rdquo;, &ldquo;email&rdquo;, &ldquo;phonenumber&rdquo; are now supported in browsers such as Opera and Firefox. <br /><strong><br />Example:</strong><br /><span style="font-family: courier new,courier;">&lt;input name="EmailAddress" placeholder="ex</span><br /><span style="font-family: courier new,courier;">youremail@here.com" required="true" <b>type="email"</b> /&gt;</span></p>
<p><br />HTML5 is not yet standardized and not supported in the more broadly utilized browsers &hellip; so how can we leverage these capabilities when supported &hellip; and yet provide a similar experience for users of non-html5 browsers?</p>
<p>It was this problem that motivated me to create the example project I&rsquo;ll be covering today &ndash; and I threw in a few other useful examples to scenarios often requested by customers.</p>
<p>First I leveraged the nuget package mvchtml5templates which provides new EditorTemplates for the HTML5 types. If you haven&rsquo;t discovered <strong>nuget</strong> yet &ndash; you are in for a treat. Install the latest version from nuget.org &ndash; and you can set Package Manager to check for updates automatically via VS2010 Tools|Options|Package Manager| Automatically "Check for Updates" checkbox.</p>
<p>The EditorTemplates will output &lt;input&gt; with the native html5 types, then I used Modernizer in Javascript to check if the type is supported by the browser.</p>
<p><strong>Example:</strong><br /><br /><span style="font-family: courier new,courier;">if </span><span style="font-family: courier new,courier;">(!Modernizr.inputtypes.email))&hellip;</span></p>
<p>Modernizer uses a combination of pre-defined browser capabilities and real-time client-side capability checks to determine this. If it is supported &ndash; then we get the benefit validation and native browser controls for the types. If not &ndash; then we leverage JQuery for validation, generating controls for the given type (eg date and color) and placeholder.</p>
<p>There are also a few of other scenarios I&rsquo;ve covered in this example that I&rsquo;ll describe in future blog posts such as:</p>
<ul>
<li>Using a JQuery Dialog for the item editing with Ajax and the AntiForgeryToken.</li>
<li>Deleting a row from the grid using Ajax and without a full grid refresh.</li>
<li>Leveraging ViewModels.</li>
<li>Supporting IoC / Repository pattern.</li>
<li>Dev vs. Production setup for Jquery references</li>
<li>T4MVC</li>
</ul>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Silverlight pre-cache dlls in browser cache - the secret compressed dlls as png Trick!</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/silverlight-pre-cache-dlls-in-browser-cache-the-secret-compressed-dlls-as-png-trick</link>
      <pubDate>Mon, 29 Aug 2011 18:24:00 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2011/08/29/silverlight-pre-cache-dlls-in-browser-cache-the-secret-compressed-dlls-as-png-trick/</guid>
      <description><![CDATA[This is a trick used by the Bing Maps Silverlight folks - but as far as I can tell (by Binging the...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/4478.solution.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/4478.solution.png"><img style="float: right;" border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/4478.solution.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/4478.solution.png" width="240" height="906" /></a>This is a trick used by the Bing Maps Silverlight folks - but as far as I can tell (by Binging the web) I"m the first to actually blog about this secret technique and show you how it's done.</p>
<p>I'm using the browser&rsquo;s cache to download our dlls as PNG files from the ASPX page hosting the Silverlight control, then dynamically load those dlls after the application loading and they are already be in the browser&rsquo;s cache.</p>
<p><iframe style="width: 98px; height: 115px; padding: 0; background-color: #fcfcfc;" title="Preview" marginheight="0" src="https://skydrive.live.com/embedicon.aspx/Silverlight/PngPerformanceTrick.zip?cid=8ce2b0e6d7088096&amp;sc=documents" frameborder="0" marginwidth="0" scrolling="no"></iframe></p>
<p>To keep this blog relatively short and sweet - I'll point out only the key parts of the example solution under each project - the rest of the code is self-explanatory. <br /><br />The solution contains 3 projects: (1) MyExternalLib (2) PngPerformanceTrick (3) PngPerformanceTrick.Web<br /><br /><span style="color: #339966; font-size: medium;">MyExternalLib</span><br />This contains a page (representing your view) and a simple class library. This is a Silverlight Application project that when compiled creates a separate&nbsp;xap, the xap (as normal) is in fact a compressed zip file containing the application manifest (AppManifest.xaml) and the dll (MyExternalLib.dll). This library is NOT included in the main project's xap (PngPerformanceTrick) - thus reducing the over-all initial download time.Yet - we are able to have strong type references to this library from our main application project. This is a common technique used normally by adding a reference to the project and then setting the property on the reference to "Copy Local", and adding the attribute "MethodImplOptions.NoInlining" to avoid JIT issues prior to lazy-loading.</p>
<p>I also added a post-build event to this project which copies the output xap to the web project's ExternalLibs folder as a png file. This could be done manually... but this approach makes it much faster to develop code and debug without any manual steps in-between.</p>
<p><strong>Post-Build Event (found by right-clicking project, properties, Build Events)</strong></p>
<pre class="scroll"><code class="csharp">Copy $(TargetDir)$(TargetName).xap $(SolutionDir)PngPerformanceTrick.Web\ExternalLibs\$(TargetName).png</code></pre>
<p><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/6457.buildevent.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/6457.buildevent.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/6457.buildevent.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/6457.buildevent.png" /></a>&nbsp;</p>
<p><span style="color: #339966; font-size: medium;">PngPerformanceTrick</span><br />This is the main entry point application. It has the ExternalLibLoader and a single MainPage. The mainpage uses the ExternalLibLoader to load our library - and display's the ExamplePage on the mainpage. This project contains the ExternalLibLoader which loads the external library as a png (by name). As the web project already loaded this as a png - it will reside in the browser's cache improving loading performance. You can open up the xap for this project (by renaming to zip) and verify the dlls inside only - and it only contains the dll for this project (PngPerformanceTrick.dll). <br /><br />To accomplish this when I added the MyExternalLib project as a reference I right-clicked the reference, Properties, Copy Local=false. Also you will note that in the MainPage.cs where I actually use the MyExternalLib I set <br /><br />[<span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">MethodImpl</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">(</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">MethodImplOptions</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.NoOptimization|</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">MethodImplOptions</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.NoInlining)]</span></span></p>
<p>That is to avoid the JIT from pre-compiling prior to actually dynically loading the external library. That is&nbsp;handled in the ExternalLibrLoader.<br />&nbsp;</p>
<p><span style="color: #339966; font-size: medium;">PngPerformanceTrick.Web</span><br />This is the simple web project that hosts the main application xap. The only "fancy" thing here is that in the aspx page I've got an image tag that references the external library as a png. I've got some aspx code in there to iterate through all files in the "ExternalLibs" folder and create an image tag for each - so that as devs add more external projects this doesn't have to be updated. <br /><br /><strong>Tip:</strong> (You could speed things up even further by putting the PNGs in separate domains to get around the browser&rsquo;s port limit for downloads).</p>
<p>And that's it - now you can really maximize your silverlight application performance.</p>
<p>If you have any questions or problems using the sample code, or suggestions for improvements - please let me know.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Identifying the root of a memory leak in Silverlight using windbg</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/identifying-the-root-of-a-memory-leak-in-silverlight-using-windbg</link>
      <pubDate>Wed, 24 Aug 2011 17:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2011/08/24/identifying-the-root-of-a-memory-leak-in-silverlight-using-windbg/</guid>
      <description><![CDATA[Considering all of the nasty blog comments out there you would think it be easy to create a test...]]></description>
      <content:encoded><![CDATA[<p>Considering all of the nasty blog comments out there you would think it be easy to create a test project to reproduce a leak &ndash; it wasn&rsquo;t. I downloaded the latest version of SL4 and first attempted to create a leak using the inline template, then control template, then listbox items &ndash; all of these prior issues now appear to be resolved as I could not reproduce a leak using any of them with Build 4.0.60310.0 (Released April 19, 2011). In reviewing the <a href="file:///C:/files/silverlight/Microsoft%20Silverlight%20Release%20History.htm#SL_4_60310"><span style="color: #0000ff;" color="#0000ff">release history</span></a> (which I should have done prior to attempting to reproduce these myself) I can see various leaks were already fixed: nested popup (Build 4.0.60310.0), Controls leak INotifyDataErrorInfo.ErrorsChanged, Datagrid leak (4.0.60310.0), Inline data template leak (4.0.60129.0), Mousecapture &amp; usercontrol and various leaks (4.0.50826.0). &nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/3058.pin2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/3058.pin2.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/3058.pin2.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/3058.pin2.png" /></a></p>
<p>So I ended up creating a more mundane simple leak that may occur if you register an event-handler somewhere such as in your view to an object that remains alive (such as a shared model) - and never unregister your event-handler and keep the event publisher instance alive. If you have something more exciting in a simple demo project please email me. &nbsp;First I&rsquo;ll show you this with windbg (free) and then I&rsquo;ll show you in ANTS (my new favorite but not free debugging tool). In either case regardless of the tool it helps to have an idea where the leak(s) may be in advance. In other words &ndash; the tools don&rsquo;t know the software&rsquo;s intention. If you intend to have something collected then you can use these techniques to test to see if they are indeed collected or not. You can also check the number of instances and size of objects and inspect those in Gen 2 and LOH as prime suspects but this walkthrough doesn&rsquo;t focus on that technique &ndash; just touches on it.</p>
<p><span style="font-size: large;">Step 1</span></p>
<ol><ol>
<li>Download the leaky sample zip file, unzip and open the VS 2010 project, set web project as startup and F5 debug to build and run it once. Copy the localhost url (including port) to notepad, and stop debugging in VS &ndash; we will be using windbg for this exercise. &nbsp;</li>
</ol></ol>
<p><iframe style="width: 98px; height: 115px; padding: 0; background-color: #fcfcfc;" title="Preview" marginheight="0" src="https://skydrive.live.com/embedicon.aspx/Silverlight/LeakyExamplesSL.zip?cid=8ce2b0e6d7088096&amp;sc=documents" frameborder="0" marginwidth="0" scrolling="no"></iframe></p>
<ol>
<li>Open that url directly in IE (you may want to close other instances of IE except for these instructions).<ol>
<li>Example: http://localhost:21589/LeakyExamplesSLTestPage.aspx#/Home</li>
</ol></li>
</ol>
<p>&nbsp;</p>
<ol>
<li>Click &ldquo;eventpinned&rdquo;, then click back to home, then click &ldquo;Force a GC&rdquo;.</li>
</ol>
<p><span style="font-size: large;">Step 2</span></p>
<ol>
<li>If you haven&rsquo;t already, install <a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx"><span style="color: #0000ff;" color="#0000ff">ProcessExplorer</span></a> (free from Microsoft&rsquo;s sysinternals). Use the target symbol from the toolbar &ndash; drag it onto your executing SL app to find and note the correct process ID. Also check that process &ldquo;Image Type&rdquo; column in ProcessExplorer to determine if it is 32 or 64 bit. If you don&rsquo;t see that column in ProcessExplorer &ndash; right-click the column header and add it.</li>
</ol>
<p><span style="font-size: large;">Step 3</span></p>
<ol>
<li>Open the version of debugdiag that corresponds to your process Image Type (eg DebugDiag (x86) for 32bit). (Run &agrave; debugdiag).</li>
<li>Find your process by ID, right-click, &ldquo;create full user dump&rdquo;</li>
</ol>
<p><span style="font-size: large;">Step 4 (enter windbg</span></p>
<ol>
<li>Open the corresponding version of Microsoft&rsquo;s windbg (x86 for debugging your 32bit process) &ndash; right-click &ldquo;Run as Administrator&rdquo;. If you haven&rsquo;t downloaded &ndash; go to <a href="http://msdn.microsoft.com/en-us/windows/hardware/gg463009"><span style="color: #0000ff;" color="#0000ff">windbg download</span></a> &ndash; if you scroll to the bottom you will find direct links to both versions.</li>
<li>Open the dump file you just created (File | Open Crash Dump)</li>
<li>Now let&rsquo;s load the Silverlight debugging extensions (sos) and the silverlight coreclr.</li>
</ol>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;">0:000&gt; .load C:\Program Files (x86)\Microsoft Silverlight\4.0.60531.0\mscordaccore.dll</span><br /><span style="font-family: courier new,courier;">0:000&gt; .load C:\Program Files (x86)\Microsoft Silverlight\4.0.60531.0\sos.dll</span></p>
<p>&nbsp;&nbsp;&nbsp; 4. Now let&rsquo;s check the managed threads (remember though from previous session that your Silverlight thread may not show up in managed threads.. you may need to execute ~*kL):</p>
<pre class="scroll"><code class="html"> 0:000&gt; <span style="background-color: #ffff00;">!threads</span><br /> ThreadCount: 3<br /> UnstartedThread: 0<br /> BackgroundThread: 3<br /> PendingThread: 0<br /> DeadThread: 0<br /> Hosted Runtime: yes<br /> PreEmptive GC Alloc Lock<br /> ID OSID ThreadOBJ State GC Context Domain Count APT Exception<br /> 4 1 4d90 08b47888 220 Enabled 0a858950:0a859fe8 08a10978 0 STA<br /> 29 2 578c 08a4f028 b220 Enabled 00000000:00000000 08a10978 0 MTA (Finalizer)<br /> 30 3 21c0 08a52ab0 1220 Enabled 00000000:00000000 08a10978 0 Ukn</code></pre>
<p style="padding-left: 60px;"><span style="font-family: courier new,courier;"></span>&nbsp;</p>
<ol>
<li>Okay &ndash; that confirms we&rsquo;ve got sos loaded&hellip;. but since we are not at a breakpoint of anything interesting in the code we aren&rsquo;t searching for the clrstack&hellip; so we don&rsquo;t need to track down the thread at this time. Instead we care about what is held in memory. Let&rsquo;s get a summary of what&rsquo;s in the heap:</li>
</ol>
<p>&nbsp;<code>0:000&gt; <span style="background-color: #ffff00;">!eeheap -gc</span></code><br /><code>&nbsp;Number of GC Heaps: 1</code><br /><code>&nbsp;generation 0 starts at 0x0a661018</code><br /><code>&nbsp;generation 1 starts at 0x0a66100c</code><br /><code>&nbsp;generation 2 starts at 0x0a661000</code><br /><code>&nbsp;ephemeral segment allocation context: none</code><br /><code>&nbsp;segment begin allocated size</code><br /><code>&nbsp;0a660000 0a661000 0a859ff4 0x1f8ff4(2068468)</code><br /><code>&nbsp;Large object heap starts at 0x0b661000</code><br /><code>&nbsp;segment begin allocated size</code><br /><code>&nbsp;0b660000 0b661000 0b668260 0x7260(29280) </code><br /><code>&nbsp;Total Size: Size: 0x200254 (2097748) bytes.</code><br /><code>&nbsp;------------------------------</code><br /><code>&nbsp;GC Heap Size: Size: 0x200254 (2097748) bytes.</code><br />&nbsp;</p>
<ol>
<li>Interesting &ndash; but not what we are looking for. If you had serious memory leak problems you would see here Gen2 and the LOH grow between two memory dump snapshots. Now let&rsquo;s look at all the objects in the heap&hellip; remember we are checking to see if our view (EventPinnedPage) has been GC&rsquo;ed or not&hellip;</li>
</ol>
<p><span style="font-family: courier new,courier;">0:000&gt; <span style="background-color: #ffff00;">!dumpheap &ndash;stat</span></span><br /><span style="font-family: courier new,courier;">Statistics:</span><br /><span style="font-family: courier new,courier;">MT Count TotalSize Class Name</span><br /><span style="font-family: courier new,courier;">7aa1a178 1 12 System.Windows.Hosting.ManagedRuntimeHost</span><br /><span style="font-family: courier new,courier;">7aa1941c 1 12 System.Windows.Browser.ManagedObjectInfo+ScriptMemberGroup</span><br /><strong><span style="font-family: courier new,courier;">[ ---- RESULTS CUT OUT FOR BREVITY --- ]</span></strong><br /><span style="font-family: courier new,courier;">794aff90 135 250928 System.Byte[]</span><br /><span style="font-family: courier new,courier;">794b1a50 8284 274040 System.Object[]</span><br /><span style="font-family: courier new,courier;">794c05e8 7939 365732 System.String</span><br /><strong><span style="font-family: courier new,courier;">Total 45639 objects</span></strong></p>
<ol>
<li>Well&hellip;. There&rsquo;s a lot of instances in the heap. Typically the System.String are expected and not something to worry about &ndash; but I can&rsquo;t find my &ldquo;EventPinnedPage&rdquo; in this huge list. Let&rsquo;s try a shell search for it:</li>
</ol>
<p><span style="font-family: courier new,courier;">0:000&gt; <span style="background-color: #ffff00;">.shell -ci "!dumpheap -stat" find "Pinned"</span></span><br /><span style="font-family: courier new,courier;">084b2164 2 208 LeakyExamplesSL.Views.EventPinnedPage</span><br /><span style="font-family: courier new,courier;">.shell: Process exited</span></p>
<p><span style="font-size: medium;">&nbsp;Bingo we found it and it&rsquo;s still in memory &ndash; let&rsquo;s take a look at it:<br /></span><code class="html">0:000&gt;<span style="background-color: #ffff00;"> !dumpmt -md <span style="color: #ff0000;">084b2164</span></span><br /> EEClass: 070c5c0c<br /> Module: 06dc49e0<br /> Name: LeakyExamplesSL.Views.EventPinnedPage<br /> mdToken: 02000007<br /> File: LeakyExamplesSL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null<br /> BaseSize: 0x68<br /> ComponentSize: 0x0<br /> Slots in VTable: 67<br /> Number of IFaces in IFaceMap: 4<br /> --------------------------------------<br /> MethodDesc Table<br /> Entry MethodDesc JIT Name<br /> 792ca980 790ca0e4 PreJIT System.Object.ToString()<br /> 792ca9a0 790ca0ec PreJIT System.Object.Equals(System.Object)<br /> 792caa10 790ca10c PreJIT System.Object.GetHashCode()<br /> 792caa20 790ca124 PreJIT System.Object.Finalize()<br /> 082c65a0 084b2118 JIT LeakyExamplesSL.Views.EventPinnedPage..ctor()<br /> 082c6780 084b210c JIT LeakyExamplesSL.Views.EventPinnedPage.InitializeComponent()<br /> [-- deleted for brevity --- ]<br /> 06dcca75 084b2120 NONE<br /> LeakyExamplesSL.Views.EventPinnedPage.commander_SomethingChanged(System.Object, System.EventArgs)<br /> 082c6ca0 084b212c JIT LeakyExamplesSL.Views.EventPinnedPage.EventPinnedPage_Unloaded(System.Object, System.Windows.RoutedEventArgs)<br />&nbsp;</code><code class="cplusplus"> </code></p>
<ol>
<li>Okay but to find out what is causing our instance(s) of this to get stuck in memory we need to get to the instances themselves first. This command will list all instances in memory of a type (and their size) and most importantly &ndash; their virtual address.</li>
</ol>
<pre class="scroll"><code class="cplusplus">0:000&gt; <span style="background-color: #ffff00;">!dumpheap -type LeakyExamplesSL.Views.EventPinnedPage</span><br /> Address MT Size<br /> <span style="color: #ff0000; background-color: #ffff00;">0a78b844</span> 084b2164 104 <br /> 0a7ffc30 084b2164 104 <br /> total 0 objects<br /> Statistics:<br /> MT Count TotalSize Class Name<br /> 084b2164 2 208 LeakyExamplesSL.Views.EventPinnedPage<br /> <br /></code>Now lets take a look at one of those instances and find out what is causing it to stay around like that one pesky party guest that hangs out when he&rsquo;s no longer welcome&hellip;</pre>
<p>&nbsp;</p>
<pre class="scroll"><code class="cplusplus">0:000&gt; <span style="background-color: #ffff00;">!gcroot <span style="color: #ff0000;">0a78b844</span></span><br /> Note: Roots found on stacks may be false positives. Run "!help gcroot" for<br /> more info.<br /> Scan Thread 4 OSTHread 4d90<br /> Scan Thread 29 OSTHread 578c<br /> Scan Thread 30 OSTHread 21c0<br /> DOMAIN(08A54278):HANDLE(Pinned):6e112f8:Root: 0b664260(System.Object[])-&gt;<br /> 0a78b8ac(LeakyExamplesSL.Common.MockCommandManager)-&gt;<br /> 0a801b40(System.EventHandler)-&gt;<br /> 0a801b28(System.Object[])-&gt;<br /> 0a78d954(System.EventHandler)-&gt;<br /> 0a78b844(LeakyExamplesSL.Views.EventPinnedPage)<br /></code></pre>
<p>Well &ndash; that&rsquo;s a pretty clear picture that the event handler to MockCommandManager is causing the problem. I must say that at this point Red Gates <a href="http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/">ANT memory profiler</a> does a wonderful diagram (copied below). After playing around with that tool for a while I may just shell out the $500 out of pocket to use it.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/4505.pinned.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/4505.pinned.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/4505.pinned.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/4505.pinned.png" /></a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Debugging Silverlight with windbg (finding eaten exceptions)</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/debugging-silverlight-with-windbg-finding-eaten-exceptions</link>
      <pubDate>Thu, 04 Aug 2011 19:43:00 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2011/08/04/debugging-silverlight-with-windbg-finding-eaten-exceptions/</guid>
      <description><![CDATA[Lately lot's of people are asking me the question &ldquo;Isn&rsquo;t Silverlight dead?&rdquo; Even...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: trebuchet ms,geneva; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/5633.ninjaKneel.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/5633.ninjaKneel.jpg"><img style="float: left; border: 0px;" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/5633.ninjaKneel.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/5633.ninjaKneel.jpg" width="120" /></a>Lately lot's of people are asking me the question &ldquo;Isn&rsquo;t Silverlight dead?&rdquo; Even with&nbsp;the <strong><a href="http://blogs.msdn.com/b/silverlight/archive/2010/11/01/pdc-and-silverlight.aspx">post</a></strong> rumors still abound strong &ndash; likely due to the prevalence of html5 in the windows 8 <strong><a href="http://microsoft-news.com/windows-8-demo-video/">demo</a></strong>. Today two peopl<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/6406.deadninja.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/6406.deadninja.jpg"></a>e asked me. </span><span style="font-family: trebuchet ms,geneva; font-size: small;">I tell them what I tell you &ndash; stay tuned to the 2011 <strong><a href="http://www.buildwindows.com/">Build Conference</a></strong> September 13<sup>th</sup> .&nbsp;<br /></span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">Today we will start where we left off in <strong><a href="http://blogs.technet.com/b/robertev/archive/2011/07/30/debugging-silverlight-with-windbg-getting-started.aspx">last post</a></strong> and we will take a quick look at exceptions... so load up windbg just like you did last week.</span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">Note that the &ldquo;4&rdquo; represents the 4<sup>th</sup> thread. We switched to that thread in the last post. Here we are listing all objects of type &ldquo;Exception&rdquo; that exist on the heap.</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">0:004&gt; <span style="background-color: #ffff00;">!dumpheap -stat -type Exception</span></span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">And that gives us the results below.</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">total 0 objects</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">Statistics:</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">MT&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Count &nbsp;&nbsp;&nbsp;TotalSize Class Name</span><br /><span style="font-family: courier new,courier; font-size: small;">0cacdb20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32 MS.Internal.Error+GetExceptionTextDelegate</span><br /><span style="font-family: courier new,courier; font-size: small;">0caa8a08&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32 MS.Internal.Error+ClearExceptionDelegate</span><br /><span style="font-family: courier new,courier; font-size: small;">0ca9f974&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32 System.EventHandler`1[[System.Windows.ApplicationUnhandledExceptionEventArgs, System.Windows]]</span><br /><span style="font-family: courier new,courier; font-size: small;">0c403200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32 System.UnhandledExceptionEventHandler</span><br /><span style="font-family: courier new,courier; font-size: small;"><span style="background-color: #ffff00;">0c42d5ec&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 80 System.UnauthorizedAccessException</span><br /><span style="font-family: courier new,courier; font-size: small;">0c42b4ec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 80 System.ExecutionEngineException</span><br /><span style="font-family: courier new,courier; font-size: small;">0c42b45c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 80 System.StackOverflowException</span><br /><span style="font-family: courier new,courier; font-size: small;">0c42b414&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;80 System.OutOfMemoryException</span><br /><span style="font-family: courier new,courier; font-size: small;">0c422a48&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 80 System.Exception</span><br /><span style="font-family: courier new,courier; font-size: small;">0c421990&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 88 System.ArgumentOutOfRangeException</span><br /><span style="font-family: courier new,courier; font-size: small;">0c4285fc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 92 System.IO.FileNotFoundException</span><br /><span style="font-family: courier new,courier; font-size: small;">792c044c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;160 System.UriFormatException</span><br /><span style="font-family: courier new,courier; font-size: small;">0c42d8dc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 160 System.Threading.ThreadAbortException</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">Total 15 objects</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">_____________________________________________________________________</span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">Now you may recall we only threw (and caught) 3 types of Exceptions (ArgumentOutOfRangeException, FileNotFoundException, UnauthorizedAccessException) and we can see those there&hellip; but there are tons more also - so you may wonder where all of these exceptions on the heap are coming from? Some exception info is pre-loaded in the heap for certain exception types [todo: add more info here].</span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">&nbsp;Now l</span><span style="font-family: trebuchet ms,geneva; font-size: small;">et&rsquo;s take a look at the &ldquo;UnauthorizedAccessException&rdquo;</span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">&nbsp;</span><span style="font-family: courier new,courier; font-size: small;">0:004&gt; <span style="background-color: #ffff00;">!dumpheap -mt 0c42d5ec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
<p><span style="font-family: courier new,courier; font-size: small;">Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MT&nbsp;&nbsp;&nbsp;&nbsp; Size<br /></span><span style="font-family: courier new,courier; font-size: small;">09e7a798 0c42d5ec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 80&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="font-family: courier new,courier; font-size: small;">total 0 objects<br /></span><span style="font-family: courier new,courier; font-size: small;">Statistics:</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">MT&nbsp;&nbsp;&nbsp; Count&nbsp;&nbsp;&nbsp; TotalSize Class Name<br /></span><span style="font-family: courier new,courier; font-size: small;">0c42d5ec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 80 System.UnauthorizedAccessException</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">Total 1 objects<br /></span><span style="font-family: trebuchet ms,geneva; font-size: small;"><span style="font-family: Arial;" face="Arial">____________________________________________________<a></a><a></a></span></span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">So if there are multiple instances of the same type of exception they will all be listed there and you can look at them individually. In this case there is only one, so let&rsquo;s do a Print Exception (pe) on that address.</span><span style="font-family: trebuchet ms,geneva; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">0:004&gt; <span style="background-color: #ffff00;">!pe 09e7a798</span></span></p>
<p><span style="font-family: courier new,courier; font-size: small;">Exception object: 09e7a798<br /></span><span style="font-family: courier new,courier; font-size: small;">Exception type:&nbsp;&nbsp; System.UnauthorizedAccessException<br /></span><span style="font-family: courier new,courier; font-size: small;">Message:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="background-color: #00ff00;">you are unauthorized to do that!</span><br /></span><span style="font-family: courier new,courier; font-size: small;">InnerException:&nbsp;&nbsp; &lt;none&gt;<br /></span><span style="font-family: courier new,courier; font-size: small;">StackTrace (generated):</span></p>
<p><span style="font-family: courier new,courier; font-size: small;">&nbsp;&nbsp;&nbsp; SP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Function<br /></span><span style="font-family: courier new,courier; font-size: small;">&nbsp;&nbsp;&nbsp; 0342D6BC 00601F25 UNKNOWN!SLHelloWndbg.MainPage.button1_Click(System.Object, System.Windows.RoutedEventArgs)+0xd5</span></p>
<p></p>
<p><span style="font-family: courier new,courier; font-size: small;">StackTraceString: &lt;none&gt;<br /></span><span style="font-family: courier new,courier; font-size: small;">HResult: 80070005</span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">And that gives us the exception details and the custom message string that we are throwing in the application. So keep in mind &ndash; even though this exception was eaten (caught and handled) we can still determine what exceptions are being thrown. These have a relatively short life-span on the heap so be sure to capture your dump at the right time.</span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">In DebugDiag (comes with Windows SDK) cancel out of the wizard. Then go to &ldquo;Tools&rdquo; in the toolbar, click &ldquo;Add Rule&rdquo; and add a first chance exception configuration (by clicking &ldquo;Exceptions&rdquo; in the Advanced Settings). Play around with these settings &ndash; you may want to make your action limit greater (say 50) to take the memory dump with several hidden exceptions in the heap for you to then examine. Be sure to point it at the right process (see <a href="http://blogs.technet.com/b/robertev/archive/2011/07/30/debugging-silverlight-with-windbg-getting-started.aspx">previous post</a> for details).</span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/6663.dd1.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/6663.dd1.jpg"></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/0250.dd1.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/0250.dd1.jpg"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/0250.dd1.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/0250.dd1.jpg" /></a>&nbsp;&nbsp; and&nbsp;&nbsp; <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/4405.dd2.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/4405.dd2.jpg"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/4405.dd2.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/4405.dd2.jpg" /></a><br /><br />Ah Grasshopper &ndash; you are truly learning very quickly now!</span></p>
<p><span style="font-family: trebuchet ms,geneva; font-size: small;">&nbsp;</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Grasshopper Level 1 - Debugging Silverlight with windbg startup</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/grasshopper-level-1-debugging-silverlight-with-windbg-startup</link>
      <pubDate>Fri, 29 Jul 2011 16:20:00 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2011/07/29/grasshopper-level-1-debugging-silverlight-with-windbg-startup/</guid>
      <description><![CDATA[Goal:The goal of this walkthrough is to find the stacktrace for a currently executing Silverlight...]]></description>
      <content:encoded><![CDATA[<p class="auto-style1"><span style="font-family: helvetica; font-size: small;"><strong><span style="color: #0000ff; font-size: medium;">Goal:</span></strong><br /></span><span style="font-family: verdana,geneva; font-size: x-small;">The goal of this walkthrough is to find the stacktrace for a currently executing Silverlight Application and examine it in windbg. This intro will give you the information you need to "break the ice" with using windbg tool for debugging in Silverlight. Building upon these skills you will soon be able to identify memory leaks, find hidden bugs and thread contention in your Silverlight applications ... and snatch the pebble from my hand.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Let's start off with the simple task of finding the call-stack on an executing Silverlight application. To facilitate this I created a simple <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/6765.SLHelloWndbg.zip" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/6765.SLHelloWndbg.zip" target="_blank">Silverlight 4 application</a> that on a button-click it throws (and catches) three types of Exceptions (<strong>ArgumentOutOfRangeException</strong>, <strong>FileNotFoundException</strong>, <strong>UnauthorizedAccessException</strong>) and then prompts with a MessageBox. We are going to focus on the call stack in this blog - but next we will look at the exception details.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/1440.clrStackSL.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/1440.clrStackSL.jpg"><img style="float: right;" border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/1440.clrStackSL.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/1440.clrStackSL.jpg" width="756" height="433" /></a></span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">The MessageBox prompt is to pause the application so we can take a memory dump to analyze the call stack at that particular point of interest. It is always important to capture your memory dump at the point you are interested in - processes get spawned, threads get recycled... Later we will look at ways you can configure debugdiag to take a dump when it encounters exceptions (first or second chance) of a particular type for effective debugging&nbsp;of customer issues&nbsp;- but for now this is a great way to get familiar with the initial setup and process for working with windbg and Silverlight.</span></p>
<p class="auto-style3"><span style="font-family: helvetica; color: #0000ff; font-size: medium;"><strong>Step 1 - Startup / Install Prerequisites<br /></strong></span><span style="font-family: verdana,geneva; font-size: x-small;">First go ahead and download the windbg and debugdiag tools.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">You can install the <strong><a href="http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx">Windows SDK</a></strong> which contains both tools, or individually install the 32 and 64 bit versions. Chances are you will need the 32 bit version - but better to have both for future use.</span></p>
<ul>
<li style="outline-style: none; outline-color: invert; outline-width: 0px;" class="auto-style2"><span style="font-family: verdana,geneva; font-size: x-small;"><a href="http://msdn.microsoft.com/en-us/windows/hardware/gg463016">Debugging Tools for Windows 32-bit Versions</a></span></li>
<li style="outline-style: none; outline-color: invert; outline-width: 0px;" class="auto-style2"><span style="font-family: verdana,geneva; font-size: x-small;"><a href="http://msdn.microsoft.com/en-us/windows/hardware/gg463012">Debugging Tools for Windows 64-bit Versions</a></span></li>
</ul>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Then download and unzip Microsoft's <strong><a href="http://technet.microsoft.com/en-us/sysinternals/bb896653">Process Explorer</a></strong> from sysinternals. We will need that to positively identify the correct process.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Got all that? Ok... let's get started!</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Let's get a simple silverlight application paused somewhere that we can then investigate the call stack and verify some data in the heap. To facilitate this exercise i created a simple project that has one button and throws 3 types of exceptions (). You can download it <strong><a href="http://www.robertev.com/blog/slhellowndbg.zip">here</a></strong>, and run it and click the "Go!" button.... or create or use your own application - just be sure to have some dialog open (eg MessageBox) or active process when you take your memory dump.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Now you need to identify the right process for your executing Silverlight Application. You might think that's a simple matter with Task Manager and you may open it up and add the "Command Line" column to try to identify your Silverlight application - but you are going down the wrong path - you will instead want to use Process Explorer - but let's meander a bit for sake of clarity. If you open Task Manager you will see:</span></p>
<p><span style="font-family: helvetica; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/7433.taskmanager.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/7433.taskmanager.jpg"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/7433.taskmanager.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/7433.taskmanager.jpg" /></a></span></p>
<p><span style="font-family: verdana,geneva; font-size: x-small;">This isn't much help - other than telling us IE is running in 32bit mode. The command Line parameter won't tell you which process is executing your Silverlight Application - and for those curious the "SCODEF" parameter refers to the parent IE process for the given frame. Pre-frame based IE this approach would've given you the information you need... but not now. Time for the big guns - Process Explorer.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">See the bullseye icon in the Process Explorer toolbar? Click that bullseye and keep your mouse button held down while you drag it directly onto the MessageBox Dialog UI (mine says "Pause here while we look at things...") in your Silverlight UI. You can setup your process explorer and your SL (Silverlight) browser window side-by-side to make this task easier.&nbsp; Be sure to release it on the dialog UX box or you will get a different process and not the one we want to look at right now.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/2134.bullseye.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/2134.bullseye.jpg"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/2134.bullseye.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/2134.bullseye.jpg" width="465" height="119" /></a>&nbsp;&nbsp;<br /></span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">&nbsp;and that gives us... </span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/1185.pid.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/1185.pid.jpg"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/45/1185.pid.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-45/1185.pid.jpg" /></a></span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Take note of your PID (Process ID) (mine is #11156).</span></p>
<p class="auto-style3"><span style="font-family: helvetica; color: #0000ff; font-size: medium;"><strong>Step 2 - Memory Dump<br /></strong></span><span style="font-family: verdana,geneva; font-size: x-small;">So first off - is it IE running in 32-bit or 64-bit? That matters because when you take a memory dump you want to do so with a tool running the same way. You can check this in Process Explorer by checking the "Image Type" column. If you don't see that column, right-click the column header and "Select Columns". In this case IE is running 32 bit. Why is this important? You need to take the dump from a tool executing in the same mode - (preferably DebugDiag). For example those clever folks that noticed from Process Explorer you have a right-click "Create Dump" option might have sought to skip the next step... only to discover problems down the line from generating that dump from the 64 bit Process Explorer.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">So - let's open DebugDiag (x86) that comes with Windows SDK (Start|Run - type "DebugDiag").&nbsp; Cancel out of the wizard, and order the processes under the process tab by PID to locate your process. If you can't locate it, and you've tried F5 to refresh but still can't find it - close DebugDiag and re-open it. I noticed an issue in refreshing processes a few times and that trick seemed to work. See your PID # now? Great.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Right-click and "Create Full User Dump" and note the location of the file created... now things get fun...</span></p>
<p class="auto-style3"><span style="font-family: helvetica; color: #0000ff; font-size: medium;"><strong>Step 3 - welcome to the wonderful world of windbg!<br /></strong></span><span style="font-family: verdana,geneva; font-size: x-small;">So now let's open up windbg (x86) version same as our memory dump and open the memory dump file. The first thing you will want to do is load the SOS.dll for silverlight (no .NET SOS and psscor will not work for SL). </span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">In my case that's Silverlight 4:</span></p>
<p class="auto-style5"><span style="background-color: #ffff00; font-family: helvetica; font-size: small;"><strong>&gt; .load C:\Program Files (x86)\Microsoft Silverlight\4.0.60531.0\sos.dll</strong></span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">you can then do a <strong><span class="auto-style4">&gt;.chain </span></strong>to verify what is loaded... and a <strong><span class="auto-style4">&gt;.help </span></strong>to see the list of available commands.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Let's also be sure our symbols are loaded properly so we can get detailed information (create a local folder to store them). For more info on loading symbols see <strong><a href="http://support.microsoft.com/kb/311503">here</a>.</strong></span></p>
<p class="auto-style5"><span style="background-color: #ffff00; font-family: helvetica; font-size: small;"><strong>&gt;.sympath SRV*c:\localsymbols*http://msdl.microsoft.com/download/symbols</strong></span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">What we really want to get at is the call stack for the currently executing code - but first we have to find the right thread for that and switch context to that thread.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Try :</span></p>
<p class="auto-style5"><span style="background-color: #ffff00; font-family: helvetica; font-size: small;"><strong>&gt; !threads</strong></span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">If you get and error like this: <span class="auto-style4"><strong>Failed to load data access DLL, 0x80004005 </strong></span>then try <strong><span class="auto-style4">&gt;.symfix </span></strong>and then try again.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">You should see something like :</span></p>
<p class="auto-style5"><strong><span style="background-color: #ffff00; font-family: courier new,courier; font-size: small;">0:000&gt; !threads</span></strong><br /><span style="font-family: courier new,courier; font-size: small;">ThreadCount: 3</span><br /><span style="font-family: courier new,courier; font-size: small;">UnstartedThread: 0</span><br /><span style="font-family: courier new,courier; font-size: small;">BackgroundThread: 3</span><br /><span style="font-family: courier new,courier; font-size: small;">PendingThread: 0</span><br /><span style="font-family: courier new,courier; font-size: small;">DeadThread: 0</span><br /><span style="font-family: courier new,courier; font-size: small;">Hosted Runtime: yes</span><br /><span style="font-family: courier new,courier; font-size: small;">PreEmptive GC Alloc Lock</span><br /><span style="font-family: courier new,courier; font-size: small;">ID OSID ThreadOBJ State GC Context Domain Count APT Exception</span><br /><span style="font-family: courier new,courier; font-size: small;">4 1 2360 08492ef0 220 Enabled 09e7a858:09e7bfe8 08497580 0 STA</span><br /><span style="font-family: courier new,courier; font-size: small;">26 2 12b8 084942e8 b220 Enabled 00000000:00000000 08380ca0 0 MTA (Finalizer)</span><br /><span style="font-family: courier new,courier; font-size: small;">27 3 20d4 08496c20 1220 Enabled 00000000:00000000 08380ca0 0 Ukn</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Normally this would list the managed thread we are looking for that contains our code... however in this case the SL is executing in coreCLR and not identified as a managed thread. If you were to take the time to switch context on each of these threads and attempt a &gt;!clrstack you may get a mysterious error like this (below) leaving you a little confused...</span></p>
<p class="auto-style1"><span style="font-family: courier new,courier; font-size: small;"><span style="background-color: #ffff00;"><strong>0:002&gt; !clrstack</strong></span><br />OS Thread Id: 0x1f14 (2)<br />Unable to walk the managed stack. The current thread is likely not a <br />managed thread. You can run !threads to get a list of managed threads in the process</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Don't panic. That's why we have to go a little further and execute this command for a full list of the threads:</span><br /><br /><span style="background-color: #ffff00; font-family: helvetica; font-size: small;"><strong>&gt;~*kL</strong></span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Ok - now you should see a bunch of information scroll by with details for every thread. Take a look through them starting from the top. In my case the first three threads were not familiar - but Thread #4 was the one I am looking for and it was easy to identify by the characteristsics:</span></p>
<p class="auto-style1"><span style="font-family: courier new,courier; font-size: small;">&nbsp;<span class="auto-style4">4 Id: 2b94.2360 Suspend: 0 Teb: 7efa9000 Unfrozen<br />ChildEBP RetAddr <br />WARNING: Stack unwind information not available. Following frames may be wrong.<br />0342d538 75240751 user32!PeekMessageW+0x17b<br />0342d564 7b22cfea user32!PeekMessageW+0x197<br />0342d5ac 7b22cf42 npctrl!RequestFullTrustAppInstall+0x15dc4<br />0342d5c8 7b22ce94 npctrl!RequestFullTrustAppInstall+0x15d1c<br />0342d5ec 7b799a4e npctrl!RequestFullTrustAppInstall+0x15c6e<br />0342d610 0c9a1a0b agcore!MessageBox_ShowCore+0x42<br />0342d674 0c9a1aa1 System_Windows_ni!DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr, System.String, System.String, UInt32, Int32 ByRef)+0x8b<br />0342d698 0ca58e49 System_Windows_ni!MS.Internal.XcpImports.MessageBox_ShowCore(System.String, System.String, UInt32)+0x51<br />0342d6a8 0ca58dff System_Windows_ni!System.Windows.MessageBox.ShowCore(System.String, System.String, System.Windows.MessageBoxButton)+0x39<br />0342d6f0 00601f3e System_Windows_ni!System.Windows.MessageBox.Show(System.String)+0x1f<br />*** WARNING: Unable to verify checksum for SLHelloWndbg.dll<br />*** ERROR: Module load completed but symbols could not be loaded for SLHelloWndbg.dll</span></span><br /><br /><span style="font-family: verdana,geneva; font-size: x-small;">However notice the error in the Thread #4 - that helpful error indicates it could not load the symbols for my SL Application... that's because I forgot to point it to my PDBs. That's easy to fix by adding the folder that contains your Silverlight PDBs to the sympath (as shown below). If you don't have the PDBs you may consider reverse-engineering them by finding the XAP file, renaming to ".zip" - opening that archive that contains all the DLLs and then using a program such as the latest version of RedHat's Reflector (or Mono Cecil) to create the project in Visual Studio and then compile in debug mode to generate your PDBs.... or just have the customer send them to you from their Debug folder.</span></p>
<p class="auto-style5"><span style="font-family: courier new,courier; font-size: small;">&gt;.sympath+ C:\files\Visual Studio 2010\SLHelloWndbg\SLHelloWndbg\Bin\Debug</span><br /><span style="font-family: courier new,courier; font-size: small;">&gt;.symfix</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">And let's check again:<br /></span><br /><span style="font-family: courier new,courier; font-size: small;" class="auto-style4">&gt;~*kL</span></p>
<p class="auto-style1"><span style="font-family: helvetica; font-size: small;">&nbsp;<span style="font-family: verdana,geneva; font-size: x-small;">(results omitted for brevity sake... but there's no more error). Much better. </span></span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Now since we've found the right thread and gotten our symbols loaded - let's switch our context to that thread and then we can finally do a !clrstack to get the juicy information in the callstack we are seeking:</span></p>
<p><span style="font-family: courier new,courier; font-size: small;"><strong><span style="background-color: #ffff00;" class="auto-style7">0:000&gt; ~4s</span></strong></span><br class="auto-style7" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">eax=00000000 ebx=00000000 ecx=00000000 edx=00000000 esi=00000102 edi=0342d588</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">eip=75240735 esp=0342d510 ebp=0342d538 iopl=0 nv up ei pl zr na pe nc</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">user32!PeekMessageW+0x17b:</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">75240735 83c404 add esp,4</span><br class="auto-style6" /><span style="background-color: #ffff00; font-family: courier new,courier; font-size: small;"><strong><span class="auto-style7">0:004&gt; !clrstack</span></strong></span><br class="auto-style7" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">OS Thread Id: 0x2360 (4)</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">Child SP IP Call Site</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d630 75240735 [InlinedCallFrame: 0342d630] </span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d62c 0c9a1a0b DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr, System.String, System.String, UInt32, Int32 ByRef)</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d630 0c9a1aa1 [InlinedCallFrame: 0342d630] MS.Internal.XcpImports.MessageBox_ShowCoreNative(IntPtr, System.String, System.String, UInt32, Int32 ByRef)</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d688 0c9a1aa1 MS.Internal.XcpImports.MessageBox_ShowCore(System.String, System.String, UInt32) [f:\dd\xcp\clr\clrlib\pinvokes.cs @ 5733]</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d6a4 0ca58e49 System.Windows.MessageBox.ShowCore(System.String, System.String, System.Windows.MessageBoxButton) [f:\dd\xcp\clr\clrlib\System\Windows\MessageBox.cs @ 57]</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d6b4 0ca58dff System.Windows.MessageBox.Show(System.String) [f:\dd\xcp\clr\clrlib\System\Windows\MessageBox.cs @ 29]</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d6bc 00601f3e SLHelloWndbg.MainPage.button1_Click(System.Object, System.Windows.RoutedEventArgs)</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d6fc 0c9f4901 System.Windows.Controls.Primitives.ButtonBase.OnClick() [f:\dd\xcp\clr\clrlib\System\Windows\Controls\Primitives\ButtonBase.cs @ 400]</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d710 0ca4f524 System.Windows.Controls.Button.OnClick() [f:\dd\xcp\clr\clrlib\System\Windows\Controls\Button.cs @ 102]</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d71c 0c9f4bfe System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs) [f:\dd\xcp\clr\clrlib\System\Windows\Controls\Primitives\ButtonBase.cs @ 818]</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d72c 0c9b6341 System.Windows.Controls.Control.OnMouseLeftButtonUp(System.Windows.Controls.Control, System.EventArgs) [f:\dd\xcp\clr\clrlib\control.cs @ 574]</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d73c 0c9b5b44 MS.Internal.JoltHelper.FireEvent(IntPtr, IntPtr, Int32, Int32, System.String) [f:\dd\xcp\clr\clrlib\clrlib.cs @ 323]</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d780 0ca3cbcf DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int32, Int32, Int32, Int32, IntPtr)</span><br class="auto-style6" /><span style="font-family: courier new,courier; font-size: small;" class="auto-style6">0342d85c 0668e2dc [ContextTransitionFrame: 0342d85c] </span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">-------------------------------------------------------------------------------------------</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Very well done Sempai - you are learning quickly!&nbsp;</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">That's enough lessions for today. </span><span style="font-family: verdana,geneva; font-size: x-small;">Later we will look at finding those&nbsp;Exceptions and Memory Leaks.</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;">Practice!</span></p>
<p class="auto-style1"><span style="font-family: verdana,geneva; font-size: x-small;"></span>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>ClickOnce Protocol Handler (also works for Silvelight or Xbap)</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/clickonce-protocol-handler-also-works-for-silvelight-or-xbap</link>
      <pubDate>Sat, 20 Dec 2008 22:40:00 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2008/12/20/clickonce-protocol-handler-also-works-for-silvelight-or-xbap/</guid>
      <description><![CDATA[So if your goal is to create a protocol handler so that you can create a link with some data in it,...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: auto 0in" class=style1><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><FONT face=Calibri>So if your goal is to create a protocol handler so that you can create a link with some data in it, click on it and have your clickonce, silverlight or xbap application open up and react to the given data in the link... this is how you do it. As a matter of semantics - you probably know an xbap IS a clickonce deployed application - xml browser application. Actually the application manifest is almost identical to any other clickonce deployed application except that it has an additional few sections indicating to launch in a browser. All three of these will work using this technique though there may be slight variations necessary. I'll cover the more tricky parts that I ran into.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: auto 0in" class=style1><SPAN class=style31><SPAN style="FONT-SIZE: 24pt; mso-bidi-font-family: Arial"><FONT face=Calibri>Protocol Handler</FONT></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><BR><FONT face=Calibri>So let's say you've defined your protocol as MYPROTOCOL. when you normally open a webpage you type in http://whatever - but once your protocol is registered you would type in MYPROTOCOL://whateverarguments and it will execute your deployed application passing the argments specified. You can type that into Vista's start search, or into the browser - or even create a link in an email. Perhaps you will include the ID to some data element and when your application opens it will launch the appropriate UI to load that data based on the ID. This is the scenario I'll be describing - not search protocols or other implementations.<o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: auto 0in" class=style1><STRONG><U><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 24pt; mso-bidi-font-family: Arial">Approach</SPAN></U></STRONG><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><BR><FONT face=Calibri>When the user clicks your new custom link it will execute a bootstrapper passing it the command line arguments. That bootstrapper will in turn execute the URL for your clickonce (or silverlight or xbap) deployed application passing the command line arguments as URL parameters. If you were to try to execute the local installed version of your clickonce exe&nbsp; - you will find that it does not execute under the proper permisisons designated by the certificate you used to sign it. The only way to reliably ensure that your application executes under the correct permissions is to launch the URL and pass querystring parameters to it.&nbsp; Henceforth I'll refer to all of these (clickonce, silverlight, xbap) as simply "application".&nbsp; Note: there is a nifty way to keep a single instance of your application even if they click the link multiple times... however as that applies only to clickonce and not to the other application types I won't cover that here. Tip: look at using the VB libraries in your C# library. Otherwise - each link click will open a new instance.<BR><BR>So here's the task break-down:<BR>1) </FONT><A href="http://blogs.technet.com/ControlPanel/Blogs/posteditor.aspx?SelectedNavItem=NewPost#Configure_your_application_to_accept_querystring_parameters" mce_href="http://blogs.technet.com/ControlPanel/Blogs/posteditor.aspx?SelectedNavItem=NewPost#Configure_your_application_to_accept_querystring_parameters"><FONT color=#0000ff face=Calibri>Configure your application to accept querystring parameters.</FONT></A><BR><FONT face=Calibri>2) Modify the </FONT><A href="http://blogs.technet.com/ControlPanel/Blogs/posteditor.aspx?SelectedNavItem=NewPost#Protocol_Handler_Bootstrapper_" mce_href="http://blogs.technet.com/ControlPanel/Blogs/posteditor.aspx?SelectedNavItem=NewPost#Protocol_Handler_Bootstrapper_"><FONT color=#0000ff face=Calibri>protocol handler bootstrapper</FONT></A><FONT face=Calibri> (download included) for your application url. <BR>3) Create an </FONT><A href="http://blogs.technet.com/ControlPanel/Blogs/posteditor.aspx?SelectedNavItem=NewPost#Register_your_Protocol_" mce_href="http://blogs.technet.com/ControlPanel/Blogs/posteditor.aspx?SelectedNavItem=NewPost#Register_your_Protocol_"><FONT color=#0000ff face=Calibri>MSI installer</FONT></A><FONT face=Calibri> to register your protocol and install the bootstrapper... (yes - you need to install something on the user's client machine!)<o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: auto 0in" class=style1 mce_keep="true"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><FONT face=Calibri><o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: auto 0in 12pt" class=style1><A name=Configure_your_application_to_accept_que></A><SPAN class=style41><SPAN style="FONT-SIZE: 24pt; mso-bidi-font-family: Arial"><U><FONT face=Calibri>Configure your application to accept querystring parameters</FONT></U></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><BR><FONT face=Calibri>The first step is to prepare your application to receive and act on these querystring parameters. You will want to set that up and test it out first. In the end clicking on a link such as http://mydeploymentserver/MyApplicationFolder/MyApplication.application?param1=foo¶m2=bar&nbsp; should open your application and do whatever you want it to do.<BR><BR>There's ton's of articles out there detailing how to do that customized per application type - so I won't regurgitate but instead point you in the right direction...<BR>&gt; For clickonce check out this article </FONT><A href="http://msdn.microsoft.com/en-us/library/system.windows.application.startup.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.windows.application.startup.aspx"><FONT color=#0000ff face=Calibri>here</FONT></A><FONT face=Calibri>.<BR>&gt; For xbaps check out this article </FONT><A href="http://msdn.microsoft.com/en-us/library/aa972168.aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa972168.aspx"><FONT color=#0000ff face=Calibri>here</FONT></A><FONT face=Calibri>.<BR>&gt; For silverlight check out this article </FONT><A href="http://bloggingabout.net/blogs/stephan/archive/2008/12/01/passing-query-string-parameters-to-a-silverlight-app-hosted-in-html.aspx" mce_href="http://bloggingabout.net/blogs/stephan/archive/2008/12/01/passing-query-string-parameters-to-a-silverlight-app-hosted-in-html.aspx"><FONT face=Calibri>here</FONT></A><FONT face=Calibri>.<o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: auto 0in" class=style1><A name=Protocol_Handler_Bootstrapper_></A><STRONG><U><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 24pt; mso-bidi-font-family: Arial">Protocol Handler Bootstrapper </SPAN></U></STRONG><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><BR><FONT face=Calibri>Ok so you've got that first part working now, right? Pretty cool, huh? At this point you may be asking yourself why in the world do I even need a protocol handler? I could just use the full link to do whatever I need and WITHOUT requiring the end user to install anything on their client machine. That's absolutely true - you could and if you don't need any of the advantages listed below then that's what I suggest you do.<BR><BR>Advantages of the protocol handler vs. using the full application url + querystring params directly:<BR>1) The URL data doesn't change per deployed environment. <BR>&gt; This one was a big deal for us. We have a lot of test case data pointing to links such as OurProtocol://id=123 that we didn't want to have to change the data per environment url (dev, smoke, test, uat, etc).<BR>2) The user can type a much shorter entry into Start or Browser (such as openMe:\\id=123 instead of http://www.whatever.com?id=123. )&nbsp; <BR>3) You can piggy back on this to install different desktop shortcuts that will open your application to particular given states.<o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: auto 0in" class=style1><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><FONT face=Calibri>Ok - so you've weighed the pros and cons and still want the protocol handler. :) Your bootstrapper will convert the arguments given into a url and launch your browser with the given URL.&nbsp; See the full solution here.<BR><BR></FONT></SPAN></P>
<P style="MARGIN: auto 0in" class=style1 mce_keep="true"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><FONT face=Calibri><o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: auto 0in" class=style1><A name=Register_your_Protocol_></A><SPAN class=style21><B><SPAN style="FONT-SIZE: 24pt; mso-bidi-font-family: Arial"><U><FONT face=Calibri>Register your Protocol </FONT></U></SPAN></B></SPAN><B><SPAN style="FONT-SIZE: 24pt; mso-bidi-font-family: Arial"><BR></SPAN></B><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><FONT face=Calibri>You have a few options here. In the end you will want to have an addition to the registry that has the path to your ProtocolBootstrapper.exe and the cmd args - as shown below. Note - if you need to bypass some security restrictions use the "runas" instead of the "open" as shown in the second example below. You could create a .reg file and then execute that with elevated permissions directly from your clickonce application (that's what we did) but that won't work for Silverlight and Xbap. The better approach is to put your new ProtocolBootstrapper.exe into a new MSI that will also update the user's registry with the necessary new keys - then have the users that want to enable this functionality install the MSI. <BR><BR>For articles on creating an MSI see </FONT><A href="http://support.microsoft.com/kb/307353" mce_href="http://support.microsoft.com/kb/307353"><FONT color=#0000ff face=Calibri>here</FONT></A><FONT face=Calibri>, </FONT><A href="http://blogs.msdn.com/astebner/archive/2008/11/21/9132456.aspx" mce_href="http://blogs.msdn.com/astebner/archive/2008/11/21/9132456.aspx"><FONT color=#0000ff face=Calibri>here</FONT></A><FONT face=Calibri> and </FONT><A href="http://www.codeproject.com/KB/tips/vssprotocolhandler.aspx" mce_href="http://www.codeproject.com/KB/tips/vssprotocolhandler.aspx"><FONT face=Calibri>here</FONT></A><FONT face=Calibri>!<o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: auto 0in 12pt" class=style1><SPAN class=style21><B><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><U><FONT face=Calibri>Example Registry Entry</FONT></U></SPAN></B></SPAN><B><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><BR></SPAN></B><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><BR></SPAN><SPAN style="FONT-FAMILY: Courier; FONT-SIZE: 10pt; mso-bidi-font-family: Arial">[HKEY_CLASSES_ROOT]<BR>[YourProtocol]<BR>(Default) = "URL:Your Protocol Description"<BR>URL Protocol = ""<BR>[shell]<BR>[open]<BR>[command]<BR>(Default) = "c:\whereever\ProtocolBootstrapper.exe "%1""<BR><BR>[HKEY_CLASSES_ROOT]<BR>[YourProtocol]<BR>(Default) = "URL:Your Protocol Description"<BR>URL Protocol = ""<BR>[shell]<BR>[runas]<BR>[command]<BR>(Default) = "c:\whereever\ProtocolBootstrapper.exe "%1""<o:p></o:p></SPAN></P>
<P style="MARGIN: auto 0in" class=style1><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><BR><BR><FONT face=Calibri>&nbsp;<o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: auto 0in" class=style1 mce_keep="true"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: Arial"><FONT face=Calibri>&nbsp;<o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P mce_keep="true">&nbsp;</P>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/6145/00/00/03/17/16/90/ProtocolHandlerBootStrap.zip" original-url="http://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-6145-00-00-03-17-16-90/ProtocolHandlerBootStrap.zip">ProtocolHandlerBootStrap.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Shared Resources XAML Intellisense</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/shared-resources-xaml-intellisense</link>
      <pubDate>Sat, 29 Mar 2008 20:18:00 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2008/03/29/shared-resources-xaml-intellisense/</guid>
      <description><![CDATA[[ I'll provide a full solution download to anyone interested ]&nbsp;
&nbsp;Our Goals were:
1) Use...]]></description>
      <content:encoded><![CDATA[<P><STRONG>[ I'll provide a full solution download to anyone interested ]&nbsp;</STRONG></P>
<P><STRONG>&nbsp;Our </STRONG><STRONG>Goals were:</STRONG></P>
<P>1) Use images in XAML syntax like this:<SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#0000ff size=2><FONT color=#0000ff size=2><FONT color=#a31515 size=2></P>
<P></FONT><FONT color=#0000ff size=2>&lt;</FONT><FONT color=#a31515 size=2>Image</FONT><FONT color=#ff0000 size=2> Name</FONT><FONT color=#0000ff size=2>="imageSave"</FONT><FONT color=#ff0000 size=2> Height</FONT><FONT color=#0000ff size=2>="16"</FONT><FONT color=#ff0000 size=2> Width</FONT><FONT color=#0000ff size=2>="16"</FONT><FONT color=#ff0000 size=2> Source</FONT><FONT color=#0000ff size=2>="ui:Images.ico_save_16.png"/&gt;</P>
<P></FONT></FONT></FONT></SPAN>2) Break on invalid image references at&nbsp;<U>COMPILE</U> - not at runtime.<BR>3) Automatically add new when new images are copied into project.<BR>4) Share resources within solution across projects.<BR>5) Get intellisense for images from different projects in the same solution where possible (currently only in the codebehind - but the xaml editor will eventually provide intellisense here too).<BR>6) VS 2008</P>
<P mce_keep="true">&nbsp;</P>
<P>_________________________________________________________</P>
<P>We created a separate "Resources" class library. In that class library we created an Images folder and&nbsp;under that an "ico" and "png" folders with all our images. Not added to "Resources" or "settings" as these generate only internal strongly typed - you need public.</P>
<P>Step 2:</P>
<P>Inside that class library create a text template&nbsp;- I called it Generator.tt. This text template will scan your directory of files and&nbsp;output something like this (below). We have two sub properties "ico" and "png" for the same resource... but you don't have to have that complexity.</P><FONT color=#0000ff size=2><FONT color=#008000 size=2>
<P>// &lt;auto-generated&gt;<BR></FONT>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>Images<BR></FONT><FONT size=2>{</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>ico_user_16<BR></FONT><FONT size=2>{</P>
<P></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>BitmapFrame</FONT><FONT size=2> png<BR>{<BR></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get</FONT><FONT size=2> { </FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>ResourceLocator</FONT><FONT size=2>.GetImageSource(</FONT><FONT color=#a31515 size=2>"ico_user_16.png"</FONT><FONT size=2>); }<BR>}</P>
<P mce_keep="true">}</FONT><FONT color=#008000 size=2>//end ico_user_16 </P></FONT><FONT color=#0000ff size=2>
<P>#endregion</P>
<P>------------------------------------------</P>
<P>The only really tricky part in creating the tt file was figuring out how to find the current directory to scan the project files... </P><FONT size=2>
<P>string icoPath = this.Host.ResolvePath(@"Images\ico");</P>
<P></FONT>Now you can add references to that "Resources" class library from any project in your solution and get static resources in your xaml files... and share them across projects. As you add new images to your resource library simply save your Generator.tt file to&nbsp;re-generate your static resources.</P>
<P>Enjoy!!!&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P></FONT><FONT size=2>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P></FONT>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P><BR>&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>AJAX, XBAP, Silverlight</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/ajax-xbap-silverlight</link>
      <pubDate>Tue, 08 Jan 2008 14:39:00 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2008/01/08/ajax-xbap-silverlight/</guid>
      <description><![CDATA[Ramblings (in response to a question)…
&nbsp;
I would have to know a lot more about his...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Ramblings (in response to a question)…<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">I would have to know a lot more about his requirements before making a recommendation. In particular – what are the <I>skill sets</I> of his existing resources?<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">I’m guessing the primary things you are looking for are ease of deployment for first-time use as subsequent updates. Performance over high latency. Resiliency – say when your internet connection goes down. Client-server transactions. Etc..<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo1"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">High performance over high latency networks comes from asynchronous transactions and transferring as little data as possible per transaction. Compression and other factors also come into play.<o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo1"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Optimum resiliency/stability typically translates to a form of local storage. If you are able to queue transactions locally and securely - you can re-try in the event that the network is down – otherwise your transaction data may be lost.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">For us – those two factors eliminated asp.net / ajax. Secure local storage isn’t an option. And - even with maximum caching enabled – in a sizable application most transactions still contain UI rendering information in addition to the data – eg html – that has to be downloaded to the client (browser). Also Silverlight’s or XBAP’s use of the CLR is much faster than the browser’s javascript engine (by about 42%). <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Let’s start with XBAP… XBAP (or Xml Browser Application) really just refers to a standard WPF application deployed via clickonce over the internet – and hosted within the browser. Clickonce, of course, allows for incremental updates – so most of the time you don’t need to re-download your presentation layer. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">I’ve seen blogs and info stating a variety of limitations inherent in XBAP such as calling web services, opening new windows, talking to the registry and/or local files… but from our experience I know all of those things are possible with an XBAP. Those are not limitations inherent in the technology. So long as your XBAP application and deployment manifests are signed with a certificate that resides in your Trusted Root certificates then you can do pretty much anything with an XBAP application. If you don’t need that much power – you can still write files to isolated storage and go with a less trusted cert – giving you the resiliency.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">The cons of using xbap vs. silverlight is that you require the end user to trust your certificate (typically a prompt) and – the big “and” – they have to be on the windows operating system and download the prerequisite version of .NET 3.0 (or greater). The bootstrapper is only around 2.5mb – but the entire framework is around 50mb! Imagine how long that takes to install with 300ms latency. Once they have that installed – as your application advances be prepared for upgrades (3.5, etc). <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Silverlight provides capabilities to use Web Services, Isolated Storage and other features but with a small &nbsp;under 5mb initial download, cross-platform capabilities and most of the core features that come in the WPF libraries – hence the name “WPF/e”. &nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Depending on your resources - if they are C# / web developers – then Silverlight may be the best option for you. Silverlight 2.0 due out this month - is releasing a whole bunch of new controls – mirroring all the standard control in the WPF library. (eg textbox, combobox, etc) – making development in visual studio fairly easy. It isn’t just a “flash” replacement anymore. When <B>*matured*</B> – it’s a substantial new technology. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">I’m currently investigating Silverlight 2.0 for migration of our xbap/clickonce WPF application to Silverlight 2.0.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo2"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"><SPAN style="mso-list: Ignore">-<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Rob.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>_____________________________________________________________</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Hi Rob,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">One of my friend has the following requirement,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Thin client <o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Real time update of data from server to client (Since server push is not possible, he is thinking of AJAX. There are commercial frameworks like COMET available that gives the server push which he &nbsp;will not be using )<o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo3"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Performance (Stability and responsiveness are preferred over jazzy look and feel – say 3d transformations)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">He is looking at the following options:<o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo4"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">ASP.net + AJAX<o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo4"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">MS Silverlight<o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo4"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">XBAP<o:p></o:p></SPAN></P>
<P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo4"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Smartclients with CAB framework <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Each has its own advantages and disadvantages. It is hard to decide as he does not have visibility into the roadmap for some of these options. Can you suggest something on this?<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">In fact “Adobe Flex” supports all these requirements except the fact that integration with .net framework is not available. So he had to drop the idea of using Flex!!!!<o:p></o:p></SPAN></P>]]></content:encoded>
    </item>
    <item>
      <title>Download Pictures from your Cell Phone via Bluetooth</title>
      <link>https://docs.microsoft.com/archive/blogs/robertev/download-pictures-from-your-cell-phone-via-bluetooth</link>
      <pubDate>Sat, 05 Jan 2008 17:54:00 GMT</pubDate>
      <dc:creator><![CDATA[Robert Evans (REDMOND)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/robertev/2008/01/05/download-pictures-from-your-cell-phone-via-bluetooth/</guid>
      <description><![CDATA[If you have a bluetooth enabled laptop and a bluetooth enabled cellphone you may be able to download...]]></description>
      <content:encoded><![CDATA[<P>If you have a bluetooth enabled laptop and a bluetooth enabled cellphone you may be able to download the pictures from your phone to your laptop via bluetooth... EVEN if your cell phone provider says it isn't possible (as in my case).</P>
<P>Perhaps they direct you to use their picture place service and to message your phone's images to that picture place. The down-side of this approach is that you loose resolution, it takes forever, and it costs a fortune!</P>
<P>This weekend I discovered a nifty&nbsp;free application that allows me to download my picutures from my camera phone faster, wireless via bluetooth, without loosing picture resolution - and for FREE!</P>
<P>Here's what you need to do:</P>
<OL>
<LI>Pair your phone to your laptop via bluetooth. (instructions for <A class="" title=instructions href="http://windowshelp.microsoft.com/Windows/en-US/Help/67cdb8d4-c3fe-43db-a00e-53159bf8695b1033.mspx" target=_blank mce_href="http://windowshelp.microsoft.com/Windows/en-US/Help/67cdb8d4-c3fe-43db-a00e-53159bf8695b1033.mspx">vista</A>)</LI>
<LI>Download and install the bitpim exe from <A href="http://www.bitpim.org/">http://www.bitpim.org</A> </LI>
<LI>Once Installed start it up.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>You should now see a screen like:</LI></OL>
<P><IMG title="BitPim Setup" height=348 alt="BitPim Setup" src="http://www.ensosoft.com/images/myblog/bitpimsetup.jpg" width=381 mce_src="http://www.ensosoft.com/images/myblog/bitpimsetup.jpg"></P>
<P>You can walk through the wizard to setup your phone. For my model phone - I found that the images were downloaded as part of the "wallpaper" download.</P>
<P>In addition - you can find (or create)&nbsp;ringtones and upload them to your phone via bluetooth, wireless and for FREE.</P>
<P>This is a great little jem of a find. </P>
<P><IMG title="Bitpim after" style="WIDTH: 444px; HEIGHT: 353px" height=353 alt="Bitpim after" src="http://www.ensosoft.com/images/myblog/bitpim_after.jpg" width=444 mce_src="http://www.ensosoft.com/images/myblog/bitpim_after.jpg"></P>]]></content:encoded>
    </item>
  </channel>
</rss>