<?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>Mike Kelly's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mikekelly/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mikekelly/feed.xml</link>
    <description>From my Office to Yours</description>
    <lastBuildDate>Tue, 31 Mar 2015 19:58:21 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Tuesday Keynote @ Build Windows 8</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/tuesday-keynote-build-windows-8</link>
      <pubDate>Tue, 13 Sep 2011 13:26:28 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2011/09/13/tuesday-keynote-build-windows-8/</guid>
      <description><![CDATA[Here are my notes from the Steven Sinofsky keynote at BUILD.  Keynote started with a video of...]]></description>
      <content:encoded><![CDATA[<p><em>Here are my notes from the Steven Sinofsky keynote at <a href="http://www.buildwindows.com">BUILD</a>.</em></p>  <p>Keynote started with a video of developers, designers etc. working on Windows 8 giving their favorite features in Win8.</p>  <ul>   <li>~450 million copies of Win7 sold (1500 non-security product changes seamlessly delivered)</li>    <li>Consumer usage higher than XP</li>    <li>542 million Windows Live sign-ins every month</li> </ul>  <p><strong>Lots of change in Windows</strong></p>  <ul>   <li>Form factors/UI models create new opportunities (touch)     <ul>       <li>&quot;People who say touch is only for small or lightweight devices are wrong. As soon as you use touch on a tablet, you're going to want to touch on your desktop &amp; laptop.&quot;</li>     </ul>   </li> </ul>  <ul>   <li>Mobility creates new usage models – e.g. use while reclining on a couch</li> </ul>  <ul>   <li>Apps can't be silos - &quot;customers want a web of applications&quot;     <ul>       <li>Apps to interact easily</li>     </ul>      <ul>       <li>Services are intrinsic</li>     </ul>   </li> </ul>  <p>What is Win8?</p>  <ul>   <li>Makes Windows 7 even better - everything that runs on Win7 will run on Win8</li> </ul>  <ul>   <li>Reimagines Windows from the chipset (ARM work) through the UI experience     <ul>       <li>All demos shown today are equally at home on ARM and x86</li>     </ul>   </li> </ul>  <p><strong>Performance / Fundamentals</strong></p>  <p><em>Kernel Memory Usage</em></p>  <table border="0" cellspacing="0" cellpadding="2" width="400"><tbody>     <tr>       <td valign="top" width="133">Win 7 RTM</td>        <td valign="top" width="133">540 MB</td>        <td valign="top" width="133">34 processes</td>     </tr>      <tr>       <td valign="top" width="133">Win 7 SP 1</td>        <td valign="top" width="133">404 MB</td>        <td valign="top" width="133">32 processes</td>     </tr>      <tr>       <td valign="top" width="133">Win 8 Dev Preview</td>        <td valign="top" width="133">281 MB</td>        <td valign="top" width="133">29 processes</td>     </tr>   </tbody></table>  <h2><strong>Demos</strong></h2>  <h3>User Experience (Julie)</h3>  <ol>   <li>Fast and fluid - everything's animated</li>    <li>Apps are immersive and full screen</li>    <li>Touch first - keyboard/mouse are first-class citizens (&quot;you're going to want all three&quot;)</li>    <li>Web of apps that work together - &quot;when you get additional apps, the system just gets richer and richer&quot;</li>    <li>Experience this across devices and architectures</li>    <li>Notes from Julie's demo</li> </ol>  <ul>   <li>Picture password - poke at different places on an image (3 strokes) to login</li> </ul>  <ul>   <li>Tiles on the home screen - each is an app - easily rearranged. Pinch to zoom in/out</li> </ul>  <ul>   <li>On screen keyboard pops up</li> </ul>  <ul>   <li>Swipe from right side to bring up Start screen - swipe up from bottom to get app menus (&quot;app bar&quot;) - relevant system settings (e.g. sound volume/mute) also appear</li> </ul>  <ul>   <li>Select text in a browser - drag from right side to see &quot;charms&quot; - these are exposed by apps. One is &quot;Share&quot; - shows all apps that support the &quot;Share contract&quot;.     <ul>       <li>Think of sharing as a very semantically rich clipboard.</li>     </ul>      <ul>       <li>Target app can implement its own panel for information (e.g. login, tags, etc.) for sharing when it's the target.</li>     </ul>   </li> </ul>  <ul>   <li>Search     <ul>       <li>Can search applications, files - apps can also expose a search contract to make it easy for search to find app-specific data.</li>     </ul>   </li> </ul>  <ul>   <li>Inserting a picture     <ul>       <li>Shows pix on computer</li>     </ul>      <ul>       <li>Social networking sites can add content right into picture file picker</li>     </ul>   </li> </ul>  <ul>   <li>Showed settings syncing from one machine to another machine she is logged in on that is an ARM machine.</li> </ul>  <h3>Metro-style Platform/Tools (Antoine)</h3>  <ul>   <li>Current platform a mixed bag - silo of HTML/Javascript on top of IE, C#/VB on top of .NET &amp; Silverlight, and </li> </ul>  <ul>   <li>Metro apps can be built in any language</li> </ul>  <ul>   <li>Reimagined the Windows APIs - &quot;Windows Runtime&quot; (Windows RT).     <ul>       <li>1800 objects natively built into Windows - not a layer.</li>     </ul>      <ul>       <li>Reflect those in C#/VB.Net/C++/C/JavaScript</li>     </ul>      <ul>       <li>Build your UI in XAML or HTML/CSS</li>     </ul>   </li> </ul>  <ul>   <li>Launch Visual Studio 11 Express - new app to build Metro apps.     <ul>       <li>Pick the language you want - pick the app template you want.</li>     </ul>   </li> </ul>  <ul>   <li>Enable millions of web developers to build these apps for Windows.</li> </ul>  <ul>   <li>Code you write can run either locally or in a browser from a web server - just JavaScript and HTML 5.</li> </ul>  <ul>   <li>New format - App Package - that encapsulates</li> </ul>  <ul>   <li>Use mouse or touch seamlessly - no special code.</li> </ul>  <ul>   <li>Modify button to bring up file picker dialog…     <ul>       <li>Also allows connecting to Facebook if the app that connects FB photos to the local pictures is there - every app now gets access to FB photos.</li>     </ul>   </li> </ul>  <ul>   <li>Adding support for the &quot;Share&quot; contract is 4 lines of JS</li> </ul>  <ul>   <li>Use Expression Blend to edit not just XAML but HTML/CSS.     <ul>       <li>Add an App Bar - just a &lt;div&gt; on the HTML page.</li>     </ul>      <ul>       <li>Drag button into there to get Metro style where commands are in the app bar</li>     </ul>   </li> </ul>  <ul>   <li>Uses new HTML 5 CSS layout as Grid. Allows for rotation, scaling, etc. Center canvass within the grid.</li> </ul>  <ul>   <li>Expression lets you look at snapped view, docked view, portrait, landscape.</li> </ul>  <ul>   <li>58 lines of code total</li> </ul>  <ul>   <li>Post app to the Windows Store     <ul>       <li>In VS Store / Upload Package…</li>     </ul>      <ul>       <li>Licensing model built into app package format. Allows trials.</li>     </ul>      <ul>       <li>Submit to Certification         <ul>           <li>Part of the promise of the store to Windows users is the apps are safe and high quality.</li>         </ul>          <ul>           <li>Processes can be a bit bureaucratic.</li>         </ul>          <ul>           <li>Does compliance, security testing, content compliance.</li>         </ul>          <ul>           <li>Will give Developers all the technical compliance tools to run themselves.</li>         </ul>       </li>     </ul>      <ul>       <li>The Store is a Windows app. Built using HTML/JavaScript</li>     </ul>   </li> </ul>  <ul>   <li>Win32 Apps     <ul>       <li>Not going to require people to rewrite those to be in the store.</li>     </ul>      <ul>       <li>Don't have to use Win8 licensing model.</li>     </ul>      <ul>       <li>Give the Win32 apps a free listing service.</li>     </ul>   </li> </ul>  <ul>   <li>XAML / Silverlight     <ul>       <li>Using ScottGu sample SilverLight 2 app.</li>     </ul>      <ul>       <li>Not a Metro app - input stack doesn't give touch access.</li>     </ul>      <ul>       <li>How to make it a Metro app?         <ul>           <li>Runtime environments between SL and Win8 are different.</li>         </ul>          <ul>           <li>Had to change some using statements, networkin layer.</li>         </ul>          <ul>           <li>Reused all the XAML and data binding code - it just came across.</li>         </ul>          <ul>           <li>Declare it supports &quot;Search&quot; and add a couple of lines of code.</li>         </ul>       </li>     </ul>      <ul>       <li>Also can use same code on the Windows Phone.</li>     </ul>      <ul>       <li>&quot;All of your knowledge around Silverlight, XAML just carries across.&quot;</li>     </ul>   </li> </ul>  <ul>   <li>If you write your app in HTML5/CSS/XAML, it will run on x86/x64/ARM. If you want to write native code, we'll help make it cross-compile to these platforms.</li> </ul>  <ul>   <li>IE 10 is the same rendering engine as for the Metro apps.</li> </ul>  <ul>   <li>Can roam all settings across your Win8 machines - including you app settings if you want.</li> </ul>  <h3>Hardware Platform (MikeAng)</h3>  <ul>   <li>8 second boot time - win7 pc.</li> </ul>  <ul>   <li>UEFI</li> </ul>  <ul>   <li>New power state called &quot;Connected Standby&quot;     <ul>       <li>Windows coalesces all the timer and network requests, turns the radio on periodically to satisfy them, then goes back to very low power consumption.</li>     </ul>      <ul>       <li>But because app requests are getting satisfied they are up to date as soon as you press &quot;ON&quot;</li>     </ul>   </li> </ul>  <ul>   <li>USB 3 ~4x faster at copying a 1 GB file than USB 2</li>    <li>Can boot Win8 from up to 256 TB drive.</li> </ul>  <ul>   <li>Direct Compute API - can offload compute loads to GPU</li> </ul>  <ul>   <li>Every Metro app has hardware acceleration UI baked in.</li> </ul>  <ul>   <li>Doing work with OEMs on testing sensitivity of touch hardware     <ul>       <li>Windows reserves only one pixel on each side for the Windows UI, so sensitivity important.</li>     </ul>   </li> </ul>  <ul>   <li>Down to 1024 x 768 for Metro apps. If 1366 x 768, get full Windows UI (side-by-side snap in). Any form factor - about resolution.</li> </ul>  <ul>   <li>Have a sensor fusion API - accelerameter, touch.</li> </ul>  <ul>   <li>NFC - near field communication - business card can have a little antenna built in to send data to Win8.</li> </ul>  <ul>   <li>Integrating device settings (web cam, HP printer, etc.) into Metro UI rather than as a third-party app.</li>    <li>Ultra Books     <ul>       <li>Full core powered processor in a super-thin and light package.</li>     </ul>      <ul>       <li>Some are thinner than legacy connectors - RJ45 and VGA - they are bumps.</li>     </ul>      <ul>       <li>These things are mostly battery.</li>     </ul>   </li> </ul>  <ul>   <li>Samsung PC giveaway - to all BUILD attendees     <ul>       <li>64 GB SSD</li>     </ul>      <ul>       <li>4 GB RAM (Steven: &quot;so you can run Visual Studio&quot;)</li>     </ul>      <ul>       <li>AT&amp;T 3G included for one year (2GB/mo)</li>     </ul>      <ul>       <li>Windows tablet + development platform.</li>     </ul>      <ul>       <li>2nd generation core i5</li>     </ul>      <ul>       <li>1366x768 display from Samsung - amazing</li>     </ul>   </li> </ul>  <ul>   <li>Refresh your PC without affecting your files     <ul>       <li>Files and personalization don't change.</li>     </ul>      <ul>       <li>PC settings are restored to default</li>        <li>All Metro apps are kept - others are removed.</li>     </ul>      <ul>       <li>Command-line tool to establish base image for this for pros.</li>     </ul>   </li> </ul>  <ul>   <li>Hyper-V in the Windows 8 client</li> </ul>  <ul>   <li>ISOs get mounted as DVD drives.</li> </ul>  <ul>   <li>Multi Mon -     <ul>       <li>Screen background extends</li>        <li>Task bar customizes to multi-mon - can have identical across two mons or have per-monitor task bar (show only apps running on that monitor)</li>     </ul>      <ul>       <li>Ctrl/PgDn to switch Metro start screen between the two monitors - develop on one, test on another.</li>     </ul>   </li> </ul>  <ul>   <li>Keyboard works the same - type &quot;cmd&quot; from Metro Start screen and are in search for CMD.</li> </ul>  <h3>Cloud Services (ChrisJo)</h3>  <ul>   <li>Windows Live mail Metro client connects both Exchange and Hotmail.     <ul>       <li>Full power delivered by ActiveSync.</li>     </ul>   </li> </ul>  <ul>   <li>Windows Live Metro calendar app.</li> </ul>  <ul>   <li>Bring together all the Friends through Linked In, Facebook, Windows Live.</li> </ul>  <ul>   <li>Photos     <ul>       <li>Connected to Facebook, Flickr, local photos.</li>     </ul>      <ul>       <li>Written as a Metro app.</li>     </ul>   </li> </ul>  <ul>   <li>SkyDrive - 100 million people.     <ul>       <li>Every Win8 user, every Win Phone has a SkyDrive.</li>     </ul>      <ul>       <li>Also accessible to developers - access the same way as you would use local store.</li>     </ul>   </li> </ul>  <h2>Wrap</h2>  <ul>   <li>Used college interns to develop sample apps included in dev preview build.</li> </ul>  <ul>   <li>17 teams (2-3 devs per team).</li> </ul>  <ul>   <li>10 weeks.</li> </ul>  <p>Developer Preview (not Beta).</p>  <p>Learn more:</p>  <ul>   <li><a href="http://blogs.msdn.com/b8">http://blogs.msdn.com/b8</a></li> </ul>  <p>MSFT will let everyone download the Developer preview starting tonight.</p>  <p><a href="http://dev.windows.com">http://dev.windows.com</a></p>  <ul>   <li>X86 (32- and 64-bit)</li> </ul>  <ul>   <li>With Tools + Apps or just Apps</li> </ul>  <ul>   <li>No activation, self-support.</li> </ul>]]></content:encoded>
    </item>
    <item>
      <title>BUILD Windows 8</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/build-windows-8</link>
      <pubDate>Mon, 12 Sep 2011 16:00:05 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2011/09/12/build-windows-8/</guid>
      <description><![CDATA[I'm down in LA (OK, Anaheim actually...) for the BUILD Windows 8 conference&nbsp;- what was...]]></description>
      <content:encoded><![CDATA[<p>I'm down in LA (OK, Anaheim actually...) for the <a href="http://www.buildwindows.com/" target="_blank">BUILD Windows 8 conference</a>&nbsp;- what was previously known as the "<a href="https://channel9.msdn.com/events/PDC/PDC10" target="_blank">Professional Developers' Conference</a>" (PDC)&nbsp;- not sure if the fact that it's changed names means that they want a broader appeal beyond just professional developers, but we'll see.&nbsp; At $1600-$2400 to attend (plus travel) I doubt too many hobbyists are coming.</p>
<p>I'll be posting here my impressions from the keynotes and from the sessions I attend.&nbsp; There is a rumor that a new tablet with Win8 is going to be distributed to attendees - we'll see.&nbsp; <a href="http://www.microsoftpdc.com/WhatsHappening/Attendees-Receive-a-FREE-Acer-Tablet-PC-Today" target="_blank">Microsoft gave an Acer tablet</a> to all attendees at the last PDC I attended in 2009.&nbsp; Looking forward to getting my hands on a beta of Win8 and especially comparing it to my current favorite tech device, the iPad2 I bought in June.&nbsp; There are some promising indicators - a friend sent me a link to <a href="http://www.v3.co.uk/v3-uk/news/2108072/microsoft-demonstrates-boot-windows" target="_blank">this video showing an absolutely amazing bootup time for Win8</a>.&nbsp; We'll see...</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Getting BidNow to Work</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/getting-bidnow-to-work</link>
      <pubDate>Mon, 07 Feb 2011 16:56:02 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2011/02/07/getting-bidnow-to-work/</guid>
      <description><![CDATA[For the auction at my kid’s school, I volunteered to set up a simple web site to be able to review...]]></description>
      <content:encoded><![CDATA[<p>For the auction at my kid’s school, I volunteered to set up a simple web site to be able to review items available; there is no online bidding at present.&#160; I decided to use the BidNow Azure sample as a base for this, figuring it will also give me a chance to play around a bit with Identity Foundation to enable creating an account on the auction site.</p>  <p>I downloaded the <a href="http://code.msdn.microsoft.com/BidNowSample">BidNow sample</a> and followed the directions under Getting Started on the home page to install the various required components – this required me to update my Azure tools to the release from the October 2010 PDC (it’s been a while since I’ve played with Azure) and the AppFabric SDK as well as the Identity Foundation SDK and runtime.</p>  <p>There are a set of automated scripts the developers of BidNow have provided to configure things, which is good and bad.&#160; It’s <strong><em>good</em></strong> in that the configuration is somewhat complex and the scripted PowerShell scripts take you through setting it up by asking you a set of questions, TurboTax-style.&#160; It’s <strong><em>bad</em></strong> in that error-handling in the scripts isn’t very robust and so a number of times I encountered stack traces and exception messages from PowerShell which quickly disappeared from my console as the PowerShell scripts blithely continued running, clearing the screen of previous errors before I could even read them.&#160; It’s too bad that PowerShell doesn’t have an easy way of comprehensively logging everything that happened so I could go back and review which steps had failed so I could try to do those manually.&#160; For instance, here is one error I managed to capture:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/4477.Error%20Setting%20up%20-%201-28-11_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/4477.Error-Setting-up-_2D00_-1_2D00_28_2D00_11_5F00_2.png"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Error Setting up - 1-28-11" border="0" alt="Error Setting up - 1-28-11" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/3487.Error%20Setting%20up%20-%201-28-11_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/3487.Error-Setting-up-_2D00_-1_2D00_28_2D00_11_5F00_thumb.png" width="563" height="304" /></a></p>  <p>It’s unclear whether the error is expected since a Yahoo provider didn’t exist, or whether the error occurred trying to set up the ACS.&#160; It’s also unclear whether the scripts are re-runnable or not, and afraid of further screwing up my configuration, I didn’t try that.</p>  <p>Instead, I figured I could figure out whatever steps the scripts missed and just manually do those.&#160; So I built the sample, fired it up and got a home screen – so not all is bad, it could at least connect to the database under local dev fabric and display items.&#160; But when I clicked “log in” the problems started.</p>  <p>The code apparently uses <a href="http://www.appfabriclabs.com/">AppFabric Labs</a> identity providers to allow for sign-in across a number of services – Windows Live, Google, Facebook, etc.&#160; That’s great and one reason I picked it.&#160; However, it does this by using some JavaScript to retrieve the identity providers as JSON and then populate the login screen – so debugging why that isn’t working isn’t too straightforwar.&#160; The symptoms are that I just see a “Please Wait” screen when I click login; this is the default HTML for that division on the page, which is replaced by a JavaScript callback when the JSON for the identity providers is delivered.&#160; So apparently it is never getting called back to repopulate the content of that division.</p>  <p>I figured I’d just try the URL the page issues to retrieve the AppFabric Labs identity providers and see what I got.&#160; The URL is something like: (<i>spacing added for readability):</i></p>  <pre>https://bidnow-sample.accesscontrol.appfabriclabs.com:443/v2/metadata/IdentityProviders.js?
                 protocol=wsfederation&amp;realm=http%3a%2f%2flocalhost%3a8080%2f&amp;
                 reply_to=http%3a%2f%2flocalhost%3a8080%2fLogOn.aspx&amp;version=1.0</pre>

<p>It seemed wrong to me that it was referring to the <font style="background-color: #ffff00" face="Courier New">bidnow-sample</font> namespace within AppFabric labs, not the namespace I had created, so I figured that was probably one of the things that didn’t get updated by the scripts.&#160; However, plugging this URL into a web browser, I get this:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/2728.image_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/2728.image_5F00_2.png"><img style="background-image: none; border-right-width: 0px; margin: 5px 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/8182.image_thumb.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/8182.image_5F00_thumb.png" width="431" height="173" /></a></p>

<p>Hmm, so it’s not complaining about an invalid namespace, as I’d expect; it’s complaining about the <strong><em>realm</em></strong> (whatever the hell that is) and which appears to point to the Azure local dev fabric.&#160; Looking a bit into what a “realm” is, I find that this is the URI that the issued token from ACS will be valid for.&#160; Searching a bit on the web, I found <a href="http://microsoft.realdolmenblogs.com/post/Simplified-access-control-using-Windows-Azure-AppFabric-Labs.aspx">this page</a> which explains how to set up ACS with Windows Azure.&#160; It explains that when registering the “relying party application” with ACS, you have to specify the URI – I didn’t do that when I set up my AppFabrics lab info.&#160; (<a href="http://acs.codeplex.com/wikipage?title=Relying%20Party%20Applications%20Explained">This page</a> also has more in-depth information about “relying party applications” and the realm – one of the challenging things about learning any new technology like this is that there are a bunch of new terms which you have to first learn; a good resource here is the <a href="http://msdn.microsoft.com/en-us/magazine/gg490345.aspx">December 2010 MSDN article “reintroducing” :) ACS</a>; I guess you have to write an article <em>re-introducing</em> something when the first documentation on this just led to ho-hums and scratching heads.&#160; But this article actually guides you through the necessary steps of configuring the ACS namespace and realm and all up on the AppFabrics Labs web site reasonably well.</p>

<p>Now the MSDN article is concerned with a generic ASP.Net web site, not the Azure BidNow sample, so there’s a bit of reading between the lines here.&#160; After getting you to configure ACS, the MSDN article has you add an STS Reference to your web site.&#160; BidNow already has this configured, so you just have to change the configuration of this.&#160; Open the web.config file in the BidNow.Web project and change the places where it refers to bidnow-sample.accesscontrol… to &lt;namespace&gt;.accesscontrol… where &lt;namespace&gt; is the name of your ACS namespace, created as the MSDN article describes.</p>

<p>You can do this manually, or you can just follow the steps in the article by clicking “Add STS Reference…” to the BidNow.Web project.&#160; The directions in the article are a bit out of date – it seems that some of the UI has changed – but basically, you have to click through, paste in the information from the ACS web site as described (to the “WS-Federation Metadata” URL).&#160; You also have to tell the wizard to generate a certificate for your application – the default of “no encryption” didn’t work for me.</p>

<p>This got me past the first step – when I build and run the app and go to the BidNow home page and click “Login”, I now get a list of providers:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/5556.image_7.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/5556.image_5F00_7.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 5px 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/4863.image_thumb_2.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/4863.image_5F00_thumb_5F00_2.png" width="327" height="221" /></a></p>

<p>So far, so good.&#160; Clicking on Google takes me to the Google federated login and I am able to login using my GMail account – I am then prompted to share my GMail email address with the ACS – this is as expected and is covered in the article.&#160; However, when I click Approve here, I get this error:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/0184.image_5.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/0184.image_5F00_5.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 5px 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/8512.image_thumb_1.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/8512.image_5F00_thumb_5F00_1.png" width="628" height="243" /></a></p>

<p>Hmm…&#160; Searching for this error on the web, I find a helpful explanation on acs.codeplex.com:</p>

<blockquote>
  <p>The rule group(s) associated with the chosen relying party has no rules that are applicable to the claims generated by your identity provider. Configure some rules in a rule group associated with your relying party, or generate passthrough rules using the rule group editor.</p>

  

  

  
</blockquote>

<p>OK, so where in the article it told me “just use default rules”, I guess it wasn’t quite right.&#160; Actually, it was – but I missed a step in my haste.&#160; I forgot to click the “Generate Rules” for the default rules group for the providers selected on the ACS portal:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/6457.image_9.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/6457.image_5F00_9.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 5px 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/metablogapi/1261.image_thumb_3.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90-metablogapi/1261.image_5F00_thumb_5F00_3.png" width="594" height="302" /></a></p>

<p>Now you would think that default rules would be, oh, I don’t know, <strong><em>defaulted</em></strong> but apparently not unless you click the button to generate them.&#160; Yup, I’m understanding more and more why they had to write an article <strong>re-introducing</strong> this service.</p>

<p>After generating these, going back to my dev fabric hosted BidNow, I am able to login!</p>]]></content:encoded>
    </item>
    <item>
      <title>VMWare and Hyper-V</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/vmware-and-hyper-v</link>
      <pubDate>Sun, 09 Jan 2011 11:52:56 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2011/01/09/vmware-and-hyper-v/</guid>
      <description><![CDATA[For a client engagement, I was provided VMWare images.&#160; I don’t have VMWare, but have a server...]]></description>
      <content:encoded><![CDATA[<p>For a client engagement, I was provided VMWare images.&#160; I don’t have VMWare, but have a server running Windows Server 2008 R2 with Hyper-V.&#160; So I needed a conversion from the VMWare image to a Hyper-V image.</p>  <p>As is often the case, I figured I must not be the first person to want to do this, so there’s probably info on the web about it.&#160;&#160; Back when I worked as a dev on Office, we had a strategy of being a universal receiver – no matter what format you had, you could open it in Office.&#160; This was in the days when WordPerfect 4.1 and Lotus were the market leaders, so it makes sense to make it super easy for people to move from what they have to your format.&#160; I figured the same must be true for Hyper-V, the kind of underdog in the VM space.</p>  <p>Sure enough, I found a good <a href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/04/26/moving-from-vmware-server-to-hyper-v.aspx">blog post</a> from John Robbins describing how he did this.&#160; John is doing a more complex migration than I need –he’s moving his whole environment, including an Active Directory domain controller from VMWare to Hyper-V.&#160; I just have a couple of virtual disk images I need to be able to run under Hyper-V.&#160; But John’s post links to just what I needed - a tool which does a sector-by-sector conversion from the VMWare .VMDK format for virtual hard disks to Hyper-V’s VHD format.&#160; </p>  <p>But that gives me a virtual hard drive with the image – it doesn’t give me a virtual machine.&#160; Here are the steps to convert that from the VMWare virtual machine information provided:</p>  <ol>   <li>Download the <a href="http://vmtoolkit.com/files/folders/converters/entry8.aspx">VMDK to VHD Converter</a> from <a href="http://vmtoolkit.com">VMToolkit</a>. </li>    <li>Use it to convert the VMWare VMDK (virtual disk image) to a Hyper-V VDK (virtual disk image).&#160; This creates a new file that is a sector-by-sector copy of the original virtual hard disk. </li>    <li>Start Hyper-V Manager and click on your server name in the tree control on the left. </li>    <li>Click New / Virtual Machine… and name it and configure memory/networking. </li>    <li>When you get to step 4 (Connect Virtual Hard Disk), click the second option “Use an existing virtual hard disk” and point it at the VHD you created from the VMDK. </li>    <li>Start the Virtual Machine.&#160;&#160;&#160; Depending on whether the virtual configuration is significantly different than the VMWare image you received, Windows may need to configure hardware and restart the VM – this will happen automatically.</li> </ol>  <p>That’s about it – pretty easy migration from VMWare to Hyper-V!</p>]]></content:encoded>
    </item>
    <item>
      <title>Excel Pivot Table Missing a Column from Source Data?</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/excel-pivot-table-missing-a-column-from-source-data</link>
      <pubDate>Fri, 19 Nov 2010 11:32:54 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2010/11/19/excel-pivot-table-missing-a-column-from-source-data/</guid>
      <description><![CDATA[I have a large spreadsheet I’ve gotten from a colleague.&#160; To help categorize it for a pivot...]]></description>
      <content:encoded><![CDATA[<p>I have a large spreadsheet I’ve gotten from a colleague.&#160; To help categorize it for a pivot table, I added a column which is “group”.&#160; I then added a table in a different sheet that mapped people to groups – and used the VLOOKUP function in the “Group” column to lookup the group from the mapping table sheet.&#160; </p>  <p>I then went to pivot the data by clicking “Summarize with Pivot Table” in the “Table Tools” ribbon section, but the pivot table field list doesn’t contain my group column.</p>  <p>At first I thought that maybe for some reason calculated fields wouldn’t be included in the pivot table – but this made no sense and there are are other calculated fields in my source data.</p>  <p>After poking around a bit on the web, I found <a href="http://social.answers.microsoft.com/Forums/en-US/excelchart/thread/4f85a8b5-50c9-45b7-8b5e-b8481984995a" target="_blank">this post</a> which describes the problem and how to fix it.&#160; Basically, Excel has a “pivot table” cache which needs to get refreshed.&#160; Since other pivot tables had been created in the workbook based on my source data by the person who gave it to me, Excel “knew” what the source data looked like – and in its view, it didn’t have a “Group” column.&#160; Simply going to the pivot table sheet, selecting the “Pivot Table Options” tab and clicking “Refresh” made the “Group” column appear in my pivot table field list.</p>]]></content:encoded>
    </item>
    <item>
      <title>Bruce Springsteen and Fred Brooks on Design</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/bruce-springsteen-and-fred-brooks-on-design</link>
      <pubDate>Wed, 17 Nov 2010 16:58:52 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2010/11/17/bruce-springsteen-and-fred-brooks-on-design/</guid>
      <description><![CDATA[I’ve just been listening to Ed Norton interviewing Bruce Springsteen at the Toronto Film Festival...]]></description>
      <content:encoded><![CDATA[<p>I’ve just been listening to <a href="http://www.npr.org/templates/rundowns/rundown.php?prgId=13&amp;prgDate=11-15-2010">Ed Norton interviewing Bruce Springsteen</a> at the Toronto Film Festival earlier this fall at the premiere of the movie “The Promise: The Making of ‘Darkness on the Edge of Town’”.&#160; One of the comments Springsteen made in the interview reminded me of a point that Fred Brooks made at the <a href="http://www.construx.com/summit">Construx Software Executive Summit</a> last week (which was a great event).</p>  <p>Springsteen put it this way:</p>  <blockquote>   <p>And I said man, there’s other guys that play guitar well. There's other guys that really front well. There’s other rocking bands out there. But the writing and the imagining of a world, that's a particular thing, you know, <strong>that's a single fingerprint.</strong> <strong>All the filmmakers we love, all the writers we love, all the songwriters we love, they have they put their fingerprint on your imagination and then on - in your heart and on your soul.</strong> That was something that I'd felt, you know, felt touched by. And I said well, I want to do that.</p> </blockquote>  <p><a href="http://www.cs.unc.edu/~brooks/">Fred Brooks</a> (author of “<a href="http://www.amazon.com/Design-Essays-Computer-Scientist/dp/0201362988">The Design of Design</a>”, and of course, famously, “The Mythical Man-Month”) put it a bit differently:</p>  <blockquote>   <p>“Great design does not come from great processes; it comes from great designers.&#160;&#160;&#160; Choose a chief designer separate from the manager and give him authority over the design and your trust.”</p> </blockquote>  <p>Both are really saying the same thing – great, consistent, beautiful designs always come from a single mind expressing himself or herself.</p>  <p>I had lunch with a friend who now works at Facebook and he told me he’s working alone on his project – if he gets to the point where he needs others, he will enlist them, but so far he hasn’t.&#160; He said this is how most things happen at Facebook and the processes would make an experienced software manager like me aghast.&#160; No specs.&#160; No schedules.&#160; No testing beyond developer-driven testing to a percentage of users on the live site.&#160; The ability for any developer to deploy to the live site.&#160; But it’s hard to argue with the results.&#160; This may be how to scale out – have a consistent design (Zuckerberg still oversees the overall design of the site, according to David Kirkpatrick, author of the Facebook Effect) but then allow for autonomy within that design.</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows 7 Homegroup and Domain</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/windows-7-homegroup-and-domain</link>
      <pubDate>Fri, 01 Oct 2010 10:50:59 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2010/10/01/windows-7-homegroup-and-domain/</guid>
      <description><![CDATA[For a consulting project, I recently had to join my laptop to an Active Directory domain at a...]]></description>
      <content:encoded><![CDATA[<p>For a consulting project, I recently had to join my laptop to an Active Directory domain at a client's workplace.&nbsp; Suddenly, my home computers can no longer see the computer.&nbsp; I found that the laptop could see shared items on my home network, though.</p>
<p>I went to the "Network and Sharing Center" to see if there was some setting I had to tweak and found this:</p>
<p><img height="218" width="550" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/34/90/5734.WindowsSharingHomegroup.PNG" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-34-90/5734.WindowsSharingHomegroup.PNG" border="0" /></p>
<p>Hmmm... so I'm kinda/sorta still part of a homegroup, it sounds like.&nbsp; Searching for the message highlighted I found this Windows Online help topic that explains it: </p>
<p><a href="http://windows.microsoft.com/en-US/windows7/Switching-between-your-home-and-workplace-networks">http://windows.microsoft.com/en-US/windows7/Switching-between-your-home-and-workplace-networks</a></p>
<p>So it turns out that yes, you can see other computers from the domain-joined laptop, but the other computers on the homegroup can't see the domain-joined laptop any longer.&nbsp; I suspect this is a security thing.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Outlook 2010 Always Trying to Send Messages</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/outlook-2010-always-trying-to-send-messages</link>
      <pubDate>Fri, 17 Sep 2010 14:13:33 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2010/09/17/outlook-2010-always-trying-to-send-messages/</guid>
      <description><![CDATA[I noticed a while ago that my Outlook 2010 connected over IMAP to my company email and Outlook...]]></description>
      <content:encoded><![CDATA[<p>I noticed a while ago that my Outlook 2010 connected over IMAP to my company email and Outlook Connector for MSN to my personal Hotmail account was always in the process of trying to send messages – even when I hadn’t written a message.&#160; This started causing more problems as things would sit in my Outbox rather than going, so I decided yesterday to get to the bottom of it.</p>  <p>I found <a href="http://www.howto-outlook.com/howto/deletereadreceipt.htm">this post</a> which explained that it could be an old read receipt.&#160; I downloaded the tool referenced in there and ran it but didn’t find any read receipts – but did find two old email messages sitting in outbox for a Personal Folders file (not the default PST as the post mentions – that one was empty, but there was another one that had messages sitting in it).&#160; Deleting those as described in the post (admittedly a rather geeky process that involves using this tool to call specific MAPI APIs, but it’s well outlined in the blog post how to do this) fixed the problem.</p>  <p>There is a <a href="http://www.dimastr.com/outspy/">$50 tool called OutlookSpy</a> (with a&#160; free 30-day trial) that was also mentioned and might help some folks who find the tool I used a bit too geeky.</p>]]></content:encoded>
    </item>
    <item>
      <title>Serializing to XML</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/serializing-to-xml</link>
      <pubDate>Tue, 03 Aug 2010 14:45:47 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2010/08/03/serializing-to-xml/</guid>
      <description><![CDATA[I’m doing some performance testing on Azure tracing to figure out the overhead of trace statements...]]></description>
      <content:encoded><![CDATA[<p>I’m doing some performance testing on Azure tracing to figure out the overhead of trace statements in code, especially when the tracing level is such that the statement does nothing – but clearly it has to do something to figure out to do nothing.&#160; So I have a simple Worker Role that calculates the 10,000th number in the Fibonacci sequence.&#160; I run this with tracing every 100th time through the loop (but the trace level set such that the trace statement won’t emit the output) and with no tracing code.&#160; </p>  <p>To gather the data, I use a timer which I put into a simple value class:</p>  <pre>[Serializable]
public struct TimerInstance
    {
        public TimerInstance(string str, Int32 nTicks)
        {
            _name = str;
            _ticks = nTicks;
        }

        private readonly string _name;
        private readonly Int32 _ticks;

        public string Name { get { return _name == null ? String.Empty : _name; } }
        public Int32 Ticks { get { return _ticks; } }

        public override string ToString()
        {
            return string.Format(&quot;{0,20}: {1,10:N}&quot;, Name, Ticks);
        }
    }</pre>

<p>Then I just have a list of these which I add to as I run each test:</p>

<pre>    static private List&lt;TimerInstance&gt; _Timers = new List&lt;TimerInstance&gt;();</pre>

<p>At the end of a batch of tests, I want to persist out all the timer values into XML. I decided it was easiest to just store those in Azure blob storage. I can then import these into Excel where I can do some analysis to figure out the average overhead, minimum, etc.</p>

<p>This seemed super easy, but I found that serializing to XML is not as straightforward as I thought it would be.</p>

<p>First, I added the &lt;pre&gt;[Serializable]&lt;/pre&gt; attribute to the struct (as shown above).&#160; But what I ended up with was something like this:</p>

<pre>&lt;?xml version=&quot;1.0&quot;?&gt;

&lt;ArrayOfTimerInstance xmlns:xsd=&quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot;&quot;&gt;
                                    <a href="http://www.w3.org/2001/XMLSchema&quot;&lt;/a&gt;">http://www.w3.org/2001/XMLSchema&quot;&lt;/a&gt;
</a>                      xmlns:xsi=&quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&quot;&gt;
                                    <a href="http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/a&gt;&gt;">http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/a&gt;&gt;
</a>
<br />&#160;&#160;&#160; &lt;TimerInstance /&gt;
<br />&#160;&#160;&#160; &lt;TimerInstance /&gt;<br />&#160;&#160;&#160; &lt;TimerInstance /&gt;<br />&#160;&#160;&#160; &lt;TimerInstance /&gt;
<br />&lt;/ArrayOfTimerInstance&gt;</pre>

<p>I couldn’t figure out why the public properties (Name and Ticks) of the items in the list weren’t getting serialized. </p>

<p>After poking around a bit, I realized two things:</p>

<ul>
  <li>The Serialize attribute has nothing to do, really, with XML Serialization – it marks the object as binary serializable which I wasn’t interested in for this. </li>

  <li>There is an interface, IXmlSerializable, you can implement on a struct or a class to control how XML serialization happens. </li>
</ul>

<p>So I modified my struct as follows:</p>

<pre>    public struct TimerInstance : IXmlSerializable
    {
        public TimerInstance(string str, Int32 nTicks)
        {
            _name = str;
            _ticks = nTicks;
        }

        private readonly string _name;
        private readonly Int32 _ticks;

        public string Name { get { return _name == null ? String.Empty : _name; } }
        public Int32 Ticks { get { return _ticks; } }

        public override string ToString()
        {
            return string.Format(&quot;{0,20}: {1,10:N}&quot;, Name, Ticks);
        }

        #region IXMLSerializable Members

        public System.Xml.Schema.XmlSchema GetSchema()
        {
            throw new ApplicationException(&quot;This method is not implemented&quot;);
        }

        public void ReadXml(System.Xml.XmlReader reader)
        {
            throw new ApplicationException(&quot;XML deserialization of TimerInstance not supported&quot;);
        }

        public void WriteXml(System.Xml.XmlWriter writer)
        {
            writer.WriteStartAttribute(&quot;Name&quot;);
            writer.WriteString(Name);
            writer.WriteEndAttribute();

            writer.WriteStartAttribute(&quot;Ticks&quot;);
            writer.WriteString(Ticks.ToString());
            writer.WriteEndAttribute();
        }

        #endregion
    }</pre>

<p>and used this code to serialize it into a MemoryStream:</p>

<pre>        // Return items that should be persisted.  By convention, we are eliminating the &quot;outlier&quot;
        // values which I've defined as the top and bottom 5% of timer values.
        private static IEnumerable<timerinstance> ItemsToPersist()
        {
            // Eliminate top and bottom 5% of timers from the enumeration.  Figure out how many items
            // to skip on both ends.  Assuming more than 10 timers in the list, otherwise just take
            // all of them
            int nTimers = (_Timers.Count &gt; 10 ? _Timers.Count : 0);
            int iFivePercentOfTimers = nTimers / 20;
            int iNinetyPercentOfTimers = _Timers.Count - iFivePercentOfTimers * 2;

            return (from x in _Timers
                    orderby x.Ticks descending
                    select x).Skip(iFivePercentOfTimers).Take(iNinetyPercentOfTimers);
        }

        // Serialize the timer list as XML to a stream - for storing in an Azure Blob
        public static void SerializeTimersToStream(Stream s)
        {
            if (_Timers.Count &gt; 0)
            {
                System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(typeof(List<timerinstance>));
                x.Serialize(s, ItemsToPersist().ToList());
             }
         }</timerinstance></timerinstance></pre>

<p>Notice that I have a LINQ enumerator which sorts the list and eliminates the outliers - which I define as the bottom and top 5% of timer values. Probably something wierd was going on when these happened, so I don't want the outliers to skew the mean of my overhead calculation. </p>

<p>Once I have this, it's a pretty straightforward thing to store the memory stream in an Azure Blob using <a href="http://msdn.microsoft.com/en-us/library/ee772826.aspx">UploadFromStream</a>: </p>

<pre>        // Serialize the timers into XML and store in a blob in Azure
        private void SerializeTimersToBlob(string strTimerGroupName)
        {
            // add the binary to blob storage
            try
            {
                // Create container if it doesn't exist.  Make it publicly accessible.
                if (_blobContainer == null)
                {
                    CloudBlobClient storage = _storageAccount.CreateCloudBlobClient();
                    storage.GetContainerReference(&quot;timers&quot;).CreateIfNotExist();
                    if ((_blobContainer = storage.GetContainerReference(&quot;timers&quot;)) == null)
                        throw new ApplicationException(&quot;Failed to create Azure Blob Container for timers&quot;);
                    _blobContainer.SetPermissions(
                                      new BlobContainerPermissions()
                                                 { PublicAccess = BlobContainerPublicAccessType.Blob });
                }

                // Remove invalid characters from timer group name and add XML extension to create Blob name.
                string  strBlobName = strTimerGroupName.Replace(':', '.') + &quot;.xml&quot;;
                var blob = _blobContainer.GetBlobReference(strBlobName);
                MemoryStream ms = new MemoryStream();

                // Serialize all the recorded timers in XML into the stream
                TraceTimer.SerializeTimersToStream(ms);

                // Seek back to the beginning of the stream.
                ms.Seek(0, SeekOrigin.Begin);

                // Save the stream as the content of the Azure blob
                blob.Properties.ContentType = &quot;text/xml&quot;;
                blob.UploadFromStream(ms);
                Diagnostics.WriteDiagnosticInfo(Diagnostics.ConfigTrace,
                                                TraceEventType.Information,
                                                WorkerDiagnostics.TraceEventID.traceFlow, &quot;Added &quot; + strBlobName);
            }
            catch (Exception exp)
            {
                Diagnostics.WriteExceptionInfo(Diagnostics.ConfigTrace,
                                               &quot;Saving Timer Information to Azure Blob&quot;, exp);
            }
        }</pre>

<p>(Diagnostics is my own class to provide TraceSource-based logging to Azure). The only additional trick I needed here was to Seek on the MemoryStream to the beginning - I was getting empty blobs before I did that. </p>

<p>The final result: </p>

<pre><p>&lt;?xml version=&quot;1.0&quot;?&gt;<br />&lt;ArrayOfTimerInstance xmlns:xsi=&quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&quot;&gt;</p><p>                                    http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/a&gt;</p><p>                      xmlns:xsd=&quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot;&quot;&gt;</p><p>                                    <a href="http://www.w3.org/2001/XMLSchema&quot;&lt;/a">http://www.w3.org/2001/XMLSchema&quot;&lt;/a</a>&gt;&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 1&quot; Ticks=&quot;468294&quot; /&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 9&quot; Ticks=&quot;410877&quot; /&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 3&quot; Ticks=&quot;402439&quot; /&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 5&quot; Ticks=&quot;388574&quot; /&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 8&quot; Ticks=&quot;385690&quot; /&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 2&quot; Ticks=&quot;385261&quot; /&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 10&quot; Ticks=&quot;376425&quot; /&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 6&quot; Ticks=&quot;345973&quot; /&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 7&quot; Ticks=&quot;339461&quot; /&gt;<br />&#160; &lt;TimerInstance Name=&quot;Fibonacci Generation (Trace) 4&quot; Ticks=&quot;331053&quot; /&gt;<br />&lt;/ArrayOfTimerInstance&gt;</p><p>&#160;</p></pre>]]></content:encoded>
    </item>
    <item>
      <title>Virtual Memory and Performance</title>
      <link>https://docs.microsoft.com/archive/blogs/mikekelly/virtual-memory-and-performance</link>
      <pubDate>Fri, 16 Jul 2010 15:02:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike J Kelly]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikekelly/2010/07/16/virtual-memory-and-performance/</guid>
      <description><![CDATA[There&rsquo;s an interesting article about performance of server apps in the July 2010...]]></description>
      <content:encoded><![CDATA[<p>There&rsquo;s an <a target="_blank" href="http://queue.acm.org/detail.cfm?id=1814327">interesting article</a> about performance of server apps in the July 2010 Communications of the ACM somewhat provocatively titled &ldquo;You&rsquo;re Doing It Wrong&rdquo;.&nbsp; In it, Poul-Henning Kamp, the architect of an HTTP cache called <a target="_blank" href="http://varnish-cache.org/wiki/ArchitectNotes">Varnish</a>, describes the &ldquo;ah ha!&rdquo; moment (on a night train to Amsterdam, no less) where he realized that traditional data structures &ldquo;ignore the fact that memory is virtual&rdquo;.</p>
<p>The problem is that very large address spaces encourage very large &ldquo;in-memory&rdquo; data structures (&ldquo;The user paid for 64 bits of address space,&rdquo; Kamp writes, &ldquo;and I am not afraid to use it&rdquo;) but those structures are not really in (physical) memory.&nbsp; Depending on the virtual memory &ldquo;pressure&rdquo; (i.e. how many logical VM pages are actually on disk) memory accesses can vary by a factor of ten (if a page has to be retrieved from disk, even a very fast disk obviously cannot match the performance of RAM).&nbsp; So algorithms that pretend that all memory accesses are equal can be quite inefficient compared to the algorithm for the Varnish cache that Kamp describes which "actively exploits&rdquo; the fact that it is running in a VM environment.</p>
<p>There is a bigger point here, which is that all the layers of abstraction we&rsquo;ve built (virtual machines, IL, class libraries, etc.) can be quite seductive. I made an entire class serializable into XML yesterday by adding one line of code (&ldquo;[Serializable]&rdquo; to the class declaration).&nbsp; But part of me thought, hmmm, I wonder what the compiler actually generates now to do that?&nbsp; It&rsquo;s important that especially in hotspots we are aware of what the cost of abstraction is and actively look for ways to reduce it.&nbsp; </p>
<p>Many of the comments about this article on the ACM site for this article can be summed up as &ldquo;ho hum &ndash; you think you&rsquo;ve discovered something new?&rdquo;&nbsp; But others are more in agreement with my perspective: I have been a practicing computer scientist (i.e. I write and design computer software for a living) for thirty years and I have not seen something as clearly written as this article about how to write code to exploit a VM environment.&nbsp; The fact that some can point to theoretical pieces that have been written just shows how removed from practice that theory is.&nbsp; But it is also a sign of how much the CACM has changed that it is running articles like this interesting to practitioners.</p>]]></content:encoded>
    </item>
  </channel>
</rss>