<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Diary of a Ninja</title><link>http://www.diaryofaninja.com</link><description>A blog about life, code and beating level 99 to brag to your mates.</description><language>English</language><copyright>Doug Rathbone</copyright><pubDate>5/21/2013 7:07:52 AM</pubDate><feedburner:info uri="diaryofaninja" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-nc-sa/2.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://www.diaryofaninja.com/rss/main" /><feedburner:emailServiceId>DiaryOfANinja</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://www.diaryofaninja.com/rss/main" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Fwww.diaryofaninja.com%2Frss%2Fmain" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item><title>Show Your Recipients You Care – Avoid noreply@</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/R3Km6W68sJc/show-your-recipients-you-care-ndash-avoid-noreply</link><description>&lt;p&gt;When delivering messages to people using email, companies and website owners have fallen into a common fallacy about the internet: believing its OK to show contempt for our readers by not caring for their reply. We do this every time we send an email, however important, that comes from noreply@mywebsite.com. Like a number of life’s oddities this doesn’t make sense – let’s look at why and how we can change it.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/9cf18711-60bd-44e2-a500-1bb1d587808a_image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 15px 0px 15px 15px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/9d3ada69-145b-4470-9e40-936139b0741f_image_thumb.png" width="321" height="194"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;As old as time Itself&lt;/h3&gt; &lt;p&gt;Sending email to your visitors, customers or anyone that is important to us is an extremely important task. E-mail is the modern day equivalent of sending a letter – at its basic level; human communication. Not too long ago, people used to spend inordinate amounts of time penning letters to each other with important information, things to watch out for, or good news. You name it, someone would have probably made the decision that taking the time to send a letter or message to another human being was worth the effort.&lt;/p&gt; &lt;p&gt;And guess what?&lt;/p&gt; &lt;p&gt;Not much has changed.&lt;/p&gt; &lt;p&gt;Humans still feel the need to write each other messages. Entire cottage industries (is Twitter considered a cottage industry?) have developed for differing levels of modern communication.&lt;/p&gt; &lt;p&gt;And yet when it comes to e-mail, companies and website owners seem to be show contempt for their message’s recipients in what can only be called the &lt;em&gt;status quo&lt;/em&gt; of modern broadcast communication.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;We send them a message from an email address that cannot be replied to. &lt;/p&gt; &lt;p&gt;We make it clear we don’t care for their response.&lt;/p&gt;&lt;/blockquote&gt; &lt;h3&gt;Why this is bad #1 – Emotional&lt;/h3&gt; &lt;p&gt;Situate yourself as the recipient;&lt;/p&gt; &lt;p&gt;As a sender, if you can’t show that you’re bothered to read my response then why should I give you the time to read your email?&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/40a81b82-899e-4862-8038-db44edc8615c_image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/f3a48c16-38db-4f06-b255-a1cad468f71c_image_thumb_1.png" width="354" height="101"&gt;&lt;/a&gt;What if I want to give you feedback?&lt;em&gt; &lt;/em&gt;What if I want to tell you &lt;a href="http://blog.scottw.com/post/23101337673/when-you-give-your-customers-the-option-to-simply"&gt;you’re awesome&lt;/a&gt;?&lt;em&gt; If you are a start up this is the best thing you can ever receive, why would you want to ignore it?&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Getting a response from your subscribers, customers or visitors means they care.&lt;/p&gt; &lt;p&gt;Either they care enough to spend their time abusing you. Or spend their time telling you what you could change. Or spend their time telling you how much they appreciate your product or service.&lt;/p&gt; &lt;p&gt;All good things – why miss out?&lt;/p&gt; &lt;h3&gt;Why this is bad #2 – The Dreaded Spam Filter&lt;/h3&gt; &lt;p&gt;A number of spam filters use the words &lt;strong&gt;noreply&lt;/strong&gt; or &lt;strong&gt;dontreply&lt;/strong&gt; as trigger words and therefore give your e-mail a higher spam score. Do you want your email even delivered?&lt;/p&gt; &lt;p&gt;When people reply to your e-mail, many spam filters and webmail services (Gmail etc) put your e-mail address on a &lt;em&gt;whitelist&lt;/em&gt;. &lt;/p&gt; &lt;p&gt;This ensures that you don’t ever get flagged as spam – you get this awesomeness for free just by making yourself available for reply. Why would you want to miss out on this?&lt;/p&gt; &lt;p&gt;The American CAN-SPAM act gives us a &lt;a href="http://www.ftc.gov/bcp/edu/pubs/business/ecommerce/bus61.shtm"&gt;legal reason for not doing this&lt;/a&gt;;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The CAN-SPAM Act: A Compliance Guide for Business&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“Your “From,” “To,” “Reply-To,” and routing information – including the originating domain name and email address – must be accurate and identify the person or business who initiated the message.”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;In America and Europe &lt;a href="http://en.wikipedia.org/wiki/MAAWG"&gt;MAAWG&lt;/a&gt; give us &lt;a href="http://www.maawg.org/system/files/pubdocs/MAAWG_Senders_BCP_Ver2.pdf"&gt;further guidance&lt;/a&gt;;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;MAAWG Sender Best Communications Practices:&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“Senders should have the capability to process email-based unsubscribe requests. Senders should also consider making offline unsubscribe mechanisms available. The sender’s ‘From’ or ‘Reply-to’ email address should also be able to receive unsubscribe requests, unless otherwise indicated.”&lt;/p&gt;&lt;/blockquote&gt; &lt;h3&gt;What we can do&lt;/h3&gt; &lt;p&gt;When building your next website, or firing up that next &lt;a href="http://www.campaignmonitor.com/"&gt;Campaign Monitor&lt;/a&gt; email blast, use a real email address; one that has a mailbox attached to it that a human reads now and then.&lt;/p&gt; &lt;p&gt;Some options:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;support@yourwebsite.com  &lt;li&gt;info@yourwebsite.com &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;And before we get all worried that the mailbox we’re sending from being filled to the brim with crap consider a few rules you can implement on that mailbox to keep you sane:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Weed out the “postmasters”, “delivery failure” and “delayed” messages with mailbox rules. &lt;li&gt;Send using a lesser known part of the SMTP RFC;&amp;nbsp; &lt;a href="http://gmailblog.blogspot.com.au/2008/03/2-hidden-ways-to-get-more-from-your.html"&gt;+ addressing&lt;/a&gt; to separate out different mail from different sources using simple rules.&lt;/li&gt;&lt;/ul&gt; &lt;h3&gt;Summary&lt;/h3&gt; &lt;p&gt;Sending email to your customers or visitors for marketing, usability (sign up validation) or just to say hello can be a great way to keep them engaged and foster two-way communication. If you’re using a &lt;em&gt;noreply@&lt;/em&gt; address as your sender, your conversations will always be one-sided. You’re missing out.&lt;/p&gt; &lt;p&gt;If you are using a &lt;em&gt;noreply@&lt;/em&gt; address, it’s time to change. Why not do it in the open? Send an email informing your customers or visitors that you will be changing your address shortly and encourage them to add the new one to their Safe list. &lt;/p&gt; &lt;p&gt;Tell them you welcome their feedback with open arms and show them you care – it can only be a good thing!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=gTZynAknS6I:ZnQIaPiPOj4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=gTZynAknS6I:ZnQIaPiPOj4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=gTZynAknS6I:ZnQIaPiPOj4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=gTZynAknS6I:ZnQIaPiPOj4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/R3Km6W68sJc" height="1" width="1"/&gt;</description><pubDate>7/11/2012 6:08:47 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/07/11/show-your-recipients-you-care-ndash-avoid-noreply</feedburner:origLink></item><item><title>Dear Microsoft, Please Include Web Deployment Projects in Visual Studio 2012</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/eJ5Gg-YGq3Y/dear-microsoft-please-include-web-deployment-projects-in-visual-studio-2012</link><description>&lt;p&gt;Microsoft Web Deployment projects are an easy way to add a MSBUILD scripting to your Visual Studio web projects. I use them all the time for personal deployment projects and at work so do all my team members. With the upcoming release of Visual Studio 2012 there is currently no Web Deployment project type. Luckily there is something we can try and do about it – &lt;a href="http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2639368-add-web-deployment-projects-to-vs11" target="_blank"&gt;Let Microsoft know&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/0b0a4109-e3c1-454f-9645-9b677f545ee3_image_a13342f3-77de-4489-b8f1-e977e8659778.png" width="304" height="244"&gt;If you hadn’t noticed, I love Continuous Integration. CI makes up so much of an important part of my development flow that I don’t deploy any other way anymore. It’s a matter of religion for me.&lt;/p&gt; &lt;p&gt;My personal projects are deployed through TeamCity, Web Deployment projects and Git.&lt;/p&gt; &lt;p&gt;My works projects are deployed through &lt;a href="/blog/2010/05/09/automated-site-deployments-with-teamcity-deployment-projects-amp-svn" target="_blank"&gt;TeamCity, Web Deployment projects and SVN&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Some of my private clients are deployed through Bamboo, Web Deployment projects and Mercurial.&lt;/p&gt; &lt;p&gt;I simply love Web Deployment projects and the power they make available to you – &lt;a href="http://www.iis.net/download/WebDeploy" target="_blank"&gt;MSDeploy&lt;/a&gt; is great, but is a very specialised tool for deploying over Http. &lt;/p&gt; &lt;p&gt;Web Deployment projects on the other hand allow you to script &lt;em&gt;anything&lt;/em&gt; using MSBUILD scripting and integrate it into your build process.&lt;/p&gt; &lt;h3&gt;Visual Studio 2012 Web Deployment Projects – An Unknown&lt;/h3&gt; &lt;p&gt;In &lt;a href="http://www.microsoft.com/en-au/download/details.aspx?id=19995" target="_blank"&gt;Visual Studio 2010 Web Deployment projects&lt;/a&gt; were not included in the standard install. They were available as an &lt;a href="http://www.microsoft.com/en-au/download/details.aspx?id=19995" target="_blank"&gt;aftermarket download&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;Currently the Visual Studio 2012 RC doesn’t have the Web Deployment project type included either.&lt;/p&gt; &lt;p&gt;What is more unsure is whether Microsoft are actually going to build the add-on anytime at all.&lt;/p&gt; &lt;p&gt;There is the possibility that if they don’t think it is used by many developers that Microsoft simply won’t be creating one. &lt;strong&gt;(!!!!!)&lt;/strong&gt;&lt;/p&gt; &lt;h3&gt;Have your say!&lt;/h3&gt; &lt;p&gt;If you visit the link below to vote for Web Deployment Projects to be included in the new version of Visual Studio 2012.&lt;/p&gt; &lt;p&gt;&lt;a href="http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2639368-add-web-deployment-projects-to-vs11" target="_blank"&gt;Vote for Web Deployment projects!&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=dRStPaQmKJc:txEbRVkGbFQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=dRStPaQmKJc:txEbRVkGbFQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=dRStPaQmKJc:txEbRVkGbFQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=dRStPaQmKJc:txEbRVkGbFQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/eJ5Gg-YGq3Y" height="1" width="1"/&gt;</description><pubDate>7/15/2012 5:27:32 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/07/15/dear-microsoft-please-include-web-deployment-projects-in-visual-studio-2012</feedburner:origLink></item><item><title>Autoplay, a New Type of Popup Plaguing the Web</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/hBMqU7Q0_7Q/autoplay-a-new-type-of-popup-plaguing-the-web</link><description>&lt;p&gt;When placing audio and video elements on a web page I’ve worked on a number of pieces of work where, for one reason or another, clients want to have their media Autoplay. To us nerds it may seem like common sense that Automatically playing media to a visitor is a bad idea for accessibility. The W3C has made this clear with it’s WCAG guidelines – we’re nerds; we care about these kinds of things. It’s worth mentioning that as with most accessibility features though, proper use of Autoplay also does a lot for usability and visitor sanity for the rest of your audience as well. &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/4bf35c01-0cfe-4b85-8976-b05d28e0b1c4_image_7a627b0e-7b4f-4a19-bfec-3eae37e02ff7.png" width="250" height="167" /&gt;In the last 6 months I’ve had a number of projects that have potentially involved autoplaying video or audio to visitors. Some of these pieces of work have been full blown interactive &lt;em&gt;arty&lt;/em&gt; web sites where the target audience is expecting it (similar to &lt;a href="http://thewildernessdowntown.com/" target="_blank"&gt;The Wilderness Down Town&lt;/a&gt;), while others have simply been over excited clients or creative/designer folk wanting to make “&lt;em&gt;something epic on the interweb&lt;/em&gt;”. &lt;/p&gt;  &lt;p&gt;Autoplay is not a new thing, however like a lot of things that aren’t necessarily “the right thing to do” on the web, there are still a number of &lt;a href="http://dominos.com.au/" target="_blank"&gt;brands&lt;/a&gt; and companies doing it that should really know better. &lt;/p&gt;  &lt;h3&gt;“Crap!… mute, mute mute!”&lt;/h3&gt;  &lt;p&gt;If you’ve ever been rocking out to some tunes and visited a site that autoplays some media content with the volume on full you’ll know first hand how annoying this can be. &lt;/p&gt;  &lt;p&gt;If this happens at work and that video you’ve just clicked on of an &lt;a href="http://www.youtube.com/watch?v=yO7MWuJ7zLA&amp;amp;feature=g-all-f"&gt;Asian German man techno yodelling with chickens&lt;/a&gt; just autoplayed, you might find yourself attracting the wrong kind of attention to your work browsing habits – YouTube makes this very clear by getting this wrong; they autoplay. My work colleagues have been wondering ever since…&lt;/p&gt;  &lt;p&gt;Picture this same scenario but instead put yourself in the shoes of a blind website visitor – if a website is playing a video using a flash video player and a visitor viewing the site is using a screen reader, the flash video player becomes for all intents and purposes “invisible”. That &lt;em&gt;pause &lt;/em&gt;button the website’s flash developer has placed on the page to stop the video &lt;em&gt;also&lt;/em&gt; becomes “invisible” – so if you autoplay video, they may potentially be unable to stop the video playing at all.&lt;/p&gt;  &lt;p&gt;Now if only the developers working on &lt;a href="http://www.smh.com.au"&gt;The Sydney Morning Herald&lt;/a&gt; understood this!&lt;/p&gt;  &lt;h3&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 15px 0px 15px 15px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/c40d1632-2b0e-4adc-900d-e3ff4e2f5779_image_ce8aad57-9d9d-4eb4-82a1-5de02b13a922.png" width="250" height="189" /&gt;People who do this stuff for a living – the W3C&lt;/h3&gt;  &lt;p&gt;When it comes to building websites for a client that mandates accessibility such as the Government or a major corporation the main source of reference that everyone turns too is the W3C and their Web Content accessibility guidelines (&lt;a href="http://www.w3.org/TR/WCAG/" target="_blank"&gt;WCAG 2.0&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;In the section of the specification talking about implementing audio, there is a quote that is definitely worth a read (&lt;a href="http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-dis-audio.html"&gt;Understanding Success Criterion 1.4.2 [Audio Control]&lt;/a&gt;) (&lt;a href="http://www.punkchip.com/2009/04/autoplay-is-bad-for-all-users/"&gt;source&lt;/a&gt;)&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;“…        &lt;br /&gt;Note:&lt;/i&gt; Playing audio automatically when landing on a page may affect a screen reader user’s ability to find the mechanism to stop it because they navigate by listening and automatically started sounds might interfere with that navigation. Therefore, we discourage the practice of automatically starting sounds (especially if they last more than 3 seconds), and encourage that the sound be &lt;em&gt;started&lt;/em&gt; by an action initiated by the user after they reach the page, rather than requiring that the sound be &lt;em&gt;stopped&lt;/em&gt; by an action of the user after they land on the page.       &lt;br /&gt;…” &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you are implementing anything that allows for visitors to &lt;em&gt;&lt;a href="http://www.w3.org/TR/UNDERSTANDING-WCAG20/time-limits-pause.html" target="_blank"&gt;Pause, Stop and Hide&lt;/a&gt;&lt;/em&gt; multimedia they also mention the following (&lt;a href="http://www.punkchip.com/2009/04/autoplay-is-bad-for-all-users/"&gt;source&lt;/a&gt;): &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“…      &lt;br /&gt;Moving content can also be a severe distraction for some people. Certain groups, particularly those with attention deficit disorders, find blinking content distracting, making it difficult for them to concentrate on other parts of the Web page. Five seconds was chosen because it is long enough to get a user’s attention, but not so long that a user cannot wait out the distraction if necessary to use the page.       &lt;br /&gt;…” &lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;The future of media on the web – HTML5 Audio/Video&lt;/h3&gt;  &lt;p&gt;The current work-in-progress HTML5 specification from the W3C includes new attributes that support autoplaying media with the &lt;code&gt;&lt;a href="http://www.w3.org/wiki/HTML/Elements/video" target="_blank"&gt;autoplay&lt;/a&gt;&lt;/code&gt; attribute of video and audio elements with the following statements appearing inside the “&lt;a href="http://www.whatwg.org/specs/web-apps/current-work/#attr-media-autoplay" target="_blank"&gt;HTML living standard&lt;/a&gt;”: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“…      &lt;br /&gt;Authors are urged to use the autoplay attribute rather than using script to trigger automatic playback, as this allows the user to override the automatic playback when it is not desired, e.g. when using a screen reader.       &lt;br /&gt;…” &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Many agree that having this option included in the specification is a good thing as &lt;a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019647.html"&gt;Simon Pieters&lt;/a&gt; points out:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“…      &lt;br /&gt;Removing the attribute will not make pages stop autoplaying video. Instead they will use script to make videos autoplay, and then it becomes harder for the user to prevent videos from autoplaying. (You could have a pref in the UA to disable autoplay.)…” &lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;A word on walled Gardens&lt;/h3&gt;  &lt;p&gt;Whether you love or hate the impact that Apple mobile handsets have had on the market, you’ve got to give it them that sometimes their opinionated take on how they implement or &lt;em&gt;not&lt;/em&gt; implement certain functionality sometimes is spot on. &lt;/p&gt;  &lt;p&gt;Emma Sax mentions in &lt;a href="http://www.punkchip.com/2012/05/autoplay-is-still-bad-for-all-users/"&gt;her post&lt;/a&gt; that Apple has made the decision to &lt;a href="http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html" target="_blank"&gt;disable autoplay on iOS devices&lt;/a&gt;, both using script blocking techniques and removal of support for the attribute implementation (&lt;a href="http://www.punkchip.com/2009/04/autoplay-is-bad-for-all-users/"&gt;source&lt;/a&gt;): &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“…      &lt;br /&gt;In Safari on iOS (for all devices, including iPad), where the user may be on a cellular network and be charged per data unit, preload and autoplay are disabled. No data is loaded until the user initiates it.       &lt;br /&gt;…       &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;This plays the movie: &lt;code&gt;&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Play&amp;quot; onClick=&amp;quot;document.myMovie.play()&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;    &lt;p&gt;This does nothing on iOS: &lt;code&gt;&amp;lt;body onLoad=&amp;quot;document.myMovie.play()&amp;quot;&amp;gt;&lt;/code&gt;       &lt;br /&gt;…” &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;They also mention in the same document&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“…      &lt;br /&gt;It is especially important to provide user controls on iPad because autoplay is disabled to prevent unsolicited cellular download.       &lt;br /&gt;…” &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;From recent tests we’ve done for clients on a number of current Android devices (Galaxy S3, HTC Desire) it appears that many mobile devices appear to ignore the &lt;code&gt;autoplay&lt;/code&gt; attribute all together. Based on this I'd hesitate to even consider the autoplay attribute “usable” in a commercial development sense based on the ever growing amount of mobile traffic from visitors.&lt;/p&gt;  &lt;h3&gt;Advice if you &lt;em&gt;have&lt;/em&gt; to “go there”&lt;/h3&gt;  &lt;p&gt;If you are working on a site that has a really strong need (&lt;em&gt;subjective&lt;/em&gt;, or actual) to include Autoplay there are a few things you can do to make your site less painful for your visitor; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Autoplaying your media is a lot more acceptable if your intent to play media was made before a visitor came to your page i.e. following a link that says “Click here to view this video”. &lt;/li&gt;    &lt;li&gt;If you ignore all I've mentioned in this post and use autoplay, ensure that your clip only lasts a few seconds to ensure that you are also abiding by the W3C spec when it mentions how you should build &lt;a href="http://www.w3.org/TR/2008/REC-WCAG20-20081211/#time-limits-pause"&gt;‘Moving, blinking, scrolling’&lt;/a&gt; content. &lt;/li&gt;    &lt;li&gt;If using video, autoplay with the volume muted, and give users the option of “unmuting” your media. This will stop non-vision impaired users from being embarrassed while ensuring the vision impaired can still navigate your site. &lt;/li&gt;    &lt;li&gt;If the clip lasts more than a few seconds, make sure that you include an &lt;em&gt;extremely visible, easy to find&lt;/em&gt; way for your visitors to pause or stop your media. This needs to be done using semantic HTML mark-up – not just a larger “invisible” button in your flash video player. &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;&lt;font color="#ff0000"&gt;Stop! Thief!&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;The motivation for this post was like many things in my life inspired by frustrations I had experienced during my work day. Like others may have done when arguing a point with others that weren’t close to the subject, I searched for reference material to back up my argument at the time as to why we “shouldn’t use Autoplay”. One of these places of reference was&amp;#160; &lt;a href="http://www.punkchip.com/2009/04/autoplay-is-bad-for-all-users/"&gt;Emma Sax’s post&lt;/a&gt; on exactly the same topic. Recently I was contacted by Emma Sax on twitter about the lack of reference I had made to &lt;a href="http://www.punkchip.com/2009/04/autoplay-is-bad-for-all-users/"&gt;her post on Autoplay&lt;/a&gt; and her feelings that I had plagiarised some of her writings. When I wrote this post I was lazy in that a number of her quotes from the W3C as well as Apples SDK were copy-paste jobs. This was unprofessional and crude on my part but was not meant to cause harm.&lt;/p&gt;  &lt;p&gt;I have since rewritten a large part of this post to further separate her opinions from mine and apologised to Emma. We both share similar feelings on two things: Autoplay being bad for the internet; and due credit being given where it’s due. &lt;a href="http://www.punkchip.com/2009/04/autoplay-is-bad-for-all-users/"&gt;Emma’s post&lt;/a&gt; is definitely worthy of credit.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=sYMWv--EU2k:RRtxjZpX0gs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=sYMWv--EU2k:RRtxjZpX0gs:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=sYMWv--EU2k:RRtxjZpX0gs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=sYMWv--EU2k:RRtxjZpX0gs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/hBMqU7Q0_7Q" height="1" width="1"/&gt;</description><pubDate>7/10/2012 7:22:42 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/07/10/autoplay-a-new-type-of-popup-plaguing-the-web</feedburner:origLink></item><item><title>Micro Benchmarking Your ASP.Net Pages Using Apache Bench</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/05EXg68ScjY/micro-benchmarking-aspnet-sites-using-apache-bench</link><description>&lt;p&gt;In ASP.net land we are often lead to think the “Microsoft way” when it comes to a lot of things. Running performance tests and benchmarking is one of these tasks where we are often found looking into commercial tooling or products to help us find out how our applications handle load. Meanwhile a lot of web developers on other stacks are doing it with great free tooling. There is nothing stopping us from stealing the best parts from these stacks and bringing them back to the land of ASP.Net.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/bdabe066-11da-41c7-98cf-35f9d1d12637_image_11.png"&gt;&lt;img style="background-image: none; border-right-width: 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="http://www.diaryofaninja.com/asset/blogimages/cb8f1160-4d26-45f5-9e9d-0a8d83d8396b_image_thumb_4.png" width="600" height="310"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Image: &lt;a href="http://www.flickr.com/photos/martin_heigan/4544138976/"&gt;Martin Heigan&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Tooling tooling everywhere…&lt;/h3&gt; &lt;p&gt;If you’re developing ASP.Net websites and web services you’ve probably turned to a few different options to performance test your pages and web services.&lt;/p&gt; &lt;p&gt;You may be lucky and happen to own a copy of Visual Studio Ultimate and have had a play with the &lt;a href="http://msdn.microsoft.com/en-us/library/dd293540.aspx" target="_blank"&gt;Performance and Stress testing tooling&lt;/a&gt; that comes along with it.&lt;/p&gt; &lt;p&gt;In the non-microsoft tooling world I’ve used a few tools such as &lt;a href="http://www.loadui.org/" target="_blank"&gt;Load UI&lt;/a&gt; and &lt;a href="http://www.soapui.org/" target="_blank"&gt;Soap UI&lt;/a&gt; for a number of projects successfully. There are many &lt;em&gt;many&lt;/em&gt; commercial products that do similar jobs.&lt;/p&gt; &lt;p&gt;But a lot of these tools sometimes actually don’t make it&amp;nbsp; really clear how to get answers to some simple questions that both we and our clients often want to know.&lt;/p&gt; &lt;p&gt;Simple questions like:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“How many users can my application take at once?”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Or other gems that you might like to know;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“How long does my page take to execute? How long does it take when 100 visitors are using it at the same time?”&lt;/p&gt;&lt;/blockquote&gt; &lt;h3&gt;Info for nothing, and the tests for free…&lt;/h3&gt; &lt;p&gt;When you install Apache you get a whole heap of tools along with it. We normally think of Apache as a Linux/Unix web server, but there is a windows version that contains all the same power.&lt;/p&gt; &lt;p&gt;One of the included tools that comes with Apache is the performance testing tool &lt;a href="http://httpd.apache.org/docs/2.2/programs/ab.html"&gt;Apache Bench&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Apache Bench is a really powerful and simple command line tool for performance testing and gathering metrics on how your application pages respond under load. It does this with very little CPU usage and a very small memory footprint, allowing you to run it on hardware that has lower spec than a lot of the commercial tools around. This makes it great if you want to use old machines on your network to run testing concurrently form different network addresses.&lt;/p&gt; &lt;p&gt;Apache Bench allows you to simulate a defined number of requests at a time for a set amount of total requests and view results on how your pages respond.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/1ff62f32-8c2f-4c09-adcc-37461fe413eb_image_9.png"&gt;&lt;img style="background-image: none; border-right-width: 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="http://www.diaryofaninja.com/asset/blogimages/dce324bd-eb6e-432f-9591-5ac731105d26_image_thumb_3.png" width="504" height="460"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This allows us to do the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Test a page with 10 users at a time for 1,000 requests  &lt;li&gt;Test a page with 50 users at a time for 10,000 requests  &lt;li&gt;Test a page with 100 users at a time for 100,000 requests  &lt;li&gt;etc.  &lt;li&gt;etc.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Do the above for 1 minutes, 5 minutes…&lt;/p&gt; &lt;p&gt;And get response times; failure rates; requests a second; transfer rates for each level of user load.&lt;/p&gt; &lt;p&gt;Actually get data that can help you estimate how your application will function once it goes live. &lt;/p&gt; &lt;p&gt;For Free.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;WARNING&lt;br&gt;&lt;/strong&gt;&lt;/font&gt;This is not a “this is how you should perform tests on your website to become invincible”. There are plenty of blog posts and articles out there to get you strategies an approaches on how to do this. This post &lt;em&gt;is&lt;/em&gt; however a guide to doing basic micro-benchmarking on individual pages during development to test performance in ways that you won’t be able to do on your dev machine without other software.&lt;/p&gt; &lt;p&gt;Performance testing and website load generators such as Apache Bench can be dangerous things in shared hosting environments and without your webhosts knowledge, so please take precautions before testing on other peoples sites or hardware.&lt;/p&gt;&lt;/blockquote&gt; &lt;h3&gt;Performance testing - Thinking it through&lt;/h3&gt; &lt;p&gt;As web applications use networking bandwidth, you need to take this into account when deciding how you are going to be doing your testing.&lt;/p&gt; &lt;p&gt;Are you testing &lt;em&gt;just&lt;/em&gt; your application? or are you testing your application &lt;em&gt;and&lt;/em&gt; your server’s internet bandwidth? (and your test machine’s bandwidth…)&lt;/p&gt; &lt;p&gt;If you want to know how your application responds independent of the internet, you should test from a machine that is on the same internal network as your webserver to ensure that your internet pipe is not the bottleneck in testing. This will give you upper bounds on your application, but will not give you the full picture for launch day.&lt;/p&gt; &lt;p&gt;If you want to &lt;em&gt;also&lt;/em&gt; test the internet link that your server is serving through (i.e. the real-world), run your tests from machines &lt;em&gt;outside&lt;/em&gt; your server’s internal network – somewhere on the internet. &lt;/p&gt; &lt;p&gt;Maybe an Amazon EC2 Instance? (If so use the Linux Apache Binaries – Linux instances of EC2 are cheaper…)&lt;/p&gt; &lt;p&gt;I do suggest you do this with your ISP’s knowledge and only when you are running dedicated servers – otherwise you may become a willing participant in a DOS attack against your web host, and also take the other sites on your box down at the same time from the performance hit.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/338deaa7-cef9-410e-91b5-ba1188f7187f_image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 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="http://www.diaryofaninja.com/asset/blogimages/959659db-5b5e-44a9-8cb7-bca2de8fb233_image_thumb.png" width="600" height="358"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Making it all happen&lt;/h3&gt; &lt;p&gt;Download the &lt;a href="http://www.apachefriends.org/en/xampp-windows.html#641"&gt;XAMPP zip file&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;In the &lt;strong&gt;bin&lt;/strong&gt; folder of the zip file extract the file &lt;strong&gt;ab.exe&lt;/strong&gt; into a location on the machine you will be running your tests &lt;strong&gt;from&lt;/strong&gt; so that you can easily get to it.&lt;/p&gt; &lt;p&gt;For the point of this demo I've placed mine in “&lt;strong&gt;C:\testing\&lt;/strong&gt;”.&lt;/p&gt; &lt;p&gt;On the machine you will be testing &lt;strong&gt;from&lt;/strong&gt; open a command prompt window and move into the above created directory (enter “&lt;strong&gt;cd C:\testing\&lt;/strong&gt;”).&lt;/p&gt; &lt;p&gt;Now we will start by issuing 1,000 requests from 5 concurrent clients at the same time.&lt;/p&gt; &lt;p&gt;The –n is the number of requests to process (we want this to be a high enough number that the tests run for a minimum amount of time (a minute or 30 seconds should give you an idea on numbers)&lt;/p&gt; &lt;p&gt;The –c is the amount of concurrent requests to run. This is the equivalent of a number of people hitting your site at the same time.&lt;/p&gt;&lt;pre class="code"&gt;ab.exe -n 1000 -c 10 -b http://mywebsite.com/mycontroller/myaction&lt;/pre&gt;
&lt;p&gt;This will return a result similar to the below ( the below result was run with 10,000 requests from 50 clients against my blog home page):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/98dc5039-2fa2-4ae9-aebb-198463d03fff_image37.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 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="http://www.diaryofaninja.com/asset/blogimages/8ecff95d-6355-48aa-9121-d12c1be44386_image37_thumb.png" width="600" height="520"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see from my results above my page could handle requests at a rate of 105.90 requests per second, the fastest request was 422ms, the slowest 4307ms. While I &lt;em&gt;have&lt;/em&gt; pummelled this page - I'm making 50 requests at once over many requests, these response times are simply not what I had hoped.&lt;/p&gt;
&lt;p&gt;My testing above was conducted with Apache Bench and I purposely made this page perform worse by turning off ASP.Net caching. While I am not testing anything &lt;em&gt;but&lt;/em&gt; my home page this does show me that my homepage needs work. I want to get the homepage response time down to around the 100ms mark.&lt;/p&gt;
&lt;p&gt;If I turn my ASP.Net MVC controller caching back on this result then becomes much better:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/2ac6f5a0-3aae-44f7-adb5-39e32d1222f0_image32.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 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="http://www.diaryofaninja.com/asset/blogimages/18740366-b2b5-4f89-9131-b735fb07f4f1_image32_thumb.png" width="600" height="520"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is now handling requests at a rate of 871.64 requests per second, the fastest request was 57ms, the slowest 180ms. Wow – that’s &lt;em&gt;a lot&lt;/em&gt; faster.&lt;/p&gt;
&lt;p&gt;When testing your pages you want to start with a number of concurrent sessions where the response times and requests per second are repeatable and fast (around ~100ms), and then walk this number up until you get a feel for the peak your page can take.&lt;/p&gt;
&lt;p&gt;So try with 20 concurrent requests&lt;/p&gt;&lt;pre class="code"&gt;ab.exe -n 1000 -c 20 -b http://mywebsite.com/mycontroller/myaction&lt;/pre&gt;
&lt;p&gt;If this is successful while still keeping ~100ms response times try 30, and then 40 and then 50 concurrent requests (the –&lt;strong&gt;c 20&lt;/strong&gt; is the number of concurrent requests) and so on and so forth until you start to see you application degrade (degrade = have a &lt;em&gt;higher&lt;/em&gt; response times than say 300-400 ms).&lt;/p&gt;
&lt;h3&gt;Taking it one step further&lt;/h3&gt;
&lt;p&gt;So now that you’ve micro benchmarked &lt;em&gt;a single page&lt;/em&gt; it’s time to think about ways we can take Apache Bench further. We want to test multiple pages concurrently – maybe with differing loads (as not everyone will be surfing your site in an even spread across all your pages.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Batching requests.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When people surf your site during a busy period you will have differing loads across differing pages and your testing your reflect that.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/067c5cdc-c13a-4f56-8cce-b2da02c7b1fd_image_19.png"&gt;&lt;img style="background-image: none; border-right-width: 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="http://www.diaryofaninja.com/asset/blogimages/cf1438ed-c9c2-4651-b494-843be4464e5e_image_thumb_8.png" width="500" height="202"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As Apache Bench is a command line application you can easily batch multiple executions together to create this load.&lt;/p&gt;
&lt;p&gt;As it supports command line trunking we can save results out to text files.&lt;/p&gt;
&lt;p&gt;If I want to have say 50 users on the site at once and I look at the split of numbers I’m wanting to test above, I can easily spread this across multiple concurrent Apache Bench sessions from my test machine.&lt;/p&gt;
&lt;p&gt;Place something similar to the below in a batch file to simulate different areas of your site being accessed at the same time.&lt;/p&gt;&lt;pre class="code"&gt;REM 30 users accessing a content page
start cmd /c ab.exe -n 1000 -c 30 http://mywebsite.com/mycontentpage &amp;gt; results-contentpage.txt

REM 10 users accessing a forum page
start cmd /c ab.exe -n 1000 -c 10 http://mywebsite.com/myforum/thread-123 &amp;gt; results-forumpage.txt

REM 7 users accessing the homepage at once
start cmd /c ab.exe -n 1000 -c 7 http://mywebsite.com/ &amp;gt; results-homepage.txt

REM 3 users accessing the support section
start cmd /c ab.exe -n 1000 -c 3 http://mywebsite.com/support/list &amp;gt; results-support.txt&lt;/pre&gt;
&lt;p&gt;Save this as a new batch file &lt;strong&gt;apache-bench-tests.bat&lt;/strong&gt; and run it from the command line – this should spawn a number of command line sessions concurrently all running Apache Bench.&lt;/p&gt;
&lt;p&gt;The results from each of your bench marks will be saved in the text files mentioned after the &lt;strong&gt;&amp;gt;&lt;/strong&gt; in each batch run.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Testing from multiple machines at the same time.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you’re wanting to really test your application in a more realistic setting you need to test everything – including your network hardware.&lt;/p&gt;
&lt;p&gt;For this I would suggest setting up a collection of machines or virtual machines and run batch scripting on each of them with Apache Bench to simulate your site from multiple physical locations.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Testing forms and search pages by posting data.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can test your application using more than just GET requests.&lt;/p&gt;
&lt;p&gt;Apache Bench supports http PUT and POST and can simply take a text file with your POST or PUT data in the command execution.&lt;/p&gt;&lt;pre class="code"&gt;ab.exe -n 1000 -c 5 http://mywebsite.com/ -p file-that-you-will-post.txt

ab.exe -n 1000 -c 5 http://mywebsite.com/ -u file-that-you-will-put.txt&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;The above is not a scientific in depth approach to performance testing, but if it will definitely give you a better feel for how each page of your application responds under load and on the cheap. &lt;/p&gt;
&lt;p&gt;By scripting multiple pages of your site to be hit concurrently you will get a clearer indication of how it will perform in the wild and which pages may need optimisation or caching to ensure your site can handle extra traffic concurrently so that when those spikes happen on launch day, you will either be better prepared or know how bad the situation will be – Profiling and performance work should get you the rest of the way there.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=M7FKXUVi1qs:jvEvHDSGMdY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=M7FKXUVi1qs:jvEvHDSGMdY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=M7FKXUVi1qs:jvEvHDSGMdY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=M7FKXUVi1qs:jvEvHDSGMdY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/05EXg68ScjY" height="1" width="1"/&gt;</description><pubDate>7/30/2012 8:05:45 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/07/30/micro-benchmarking-aspnet-sites-using-apache-bench</feedburner:origLink></item><item><title>Up Log Creek Without a Paddle – Part 1: Windows Audit Logs</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/jCde9Jp8kCg/up-log-creek-without-a-paddle-ndash-part-1-windows-audit-logs</link><description>&lt;p&gt;When bad things happen to either your website or your server you’re usually faced with a situation that either makes or breaks you. Much like having a good backup and restore plan, being able to filter and scan log files for what you need to help draw conclusions on how a situation occurred or by whom it was conducted, is an important part of your security plan. However if you have a heavily traffic’d website, network share or part of your file system and you’re doing a lot of logging, you probably have files the size of the moon to wade through, so making sense of them can be a nightmare. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;This is part 1 of 2 in a series on how to wade through the information overload that can come when searching giant logs files.&lt;/strong&gt;&lt;/p&gt; &lt;h3&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 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="http://www.diaryofaninja.com/asset/blogimages/0dcbd655-f94c-4f65-a7af-07c582135ed3_image_3837e20c-3a74-4bd5-af47-cb4a8e220f3b.png" width="600" height="444"&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.flickr.com/photos/slack12/248326861/"&gt;Photo from slack12&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Searching through Windows Auditing Logs&lt;/h3&gt; &lt;p&gt;If you have &lt;a href="http://technet.microsoft.com/en-us/library/dd408940(v=ws.10).aspx"&gt;Windows File System Auditing turned on&lt;/a&gt;, you should be able to see all sorts of valuable information about actions that have occurred on your file system.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Files being created, saved, deleted (maybe by your IIS user?).  &lt;ul&gt; &lt;li&gt;has a hack occurred that has provided the IIS user with more access than wanted?  &lt;li&gt;has someone discovered a security hole in your site allowing the IIS user to do things unintended?&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Web.config files being changed (Either by the IIS user, or an admin user).  &lt;li&gt;Has a third party user gained access to your server and logged in by RDP? Has your webhost done so without your knowledge? &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;While IIS logs can help with shed light on some of these things, actual file level actions are best recorded using &lt;a href="http://www.petri.co.il/windows_auditing.htm"&gt;Windows File System Auditing&lt;/a&gt; as this can be setup to record not just logs of requests such as those recorded in IIS logs, but also file opens and edits inside an RDP session, an FTP session and generally any other point of interaction with the file system.&lt;/p&gt; &lt;p&gt;This can be an important record when it comes to retracing the steps of an attack against your server – &lt;strong&gt;if you just remember to turn auditing on in sensitive parts of your file system&lt;/strong&gt;!&lt;/p&gt; &lt;p&gt;Once you do turn it on however the next problem arises when it comes to investigating an incident on your server: Oceans of data. &lt;/p&gt; &lt;p&gt;So much data, that the Event Viewer itself is unable to filter and search this haystack at anything but a glacial pace.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/ea049ceb-11d6-48eb-8b70-2abd57604992_image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 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="http://www.diaryofaninja.com/asset/blogimages/99fd4c1d-c8ce-44a9-b479-705c5ffe05ad_image_thumb_1.png" width="604" height="367"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Finding a Paddle&lt;/h3&gt; &lt;p&gt;This problem can get really bad. I’ve had to search through Windows Event Logs that were many gigabytes before, and the event viewer simply packs it in.&lt;/p&gt; &lt;p&gt;So what can you use to scan logs these big? &lt;/p&gt; &lt;p&gt;Microsoft has the answer in the form of an unsupported tool called &lt;strong&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=24659#overview"&gt;Log Parser 2.2&lt;/a&gt;&lt;/strong&gt; that is just the ticket.&lt;/p&gt; &lt;p&gt;While I'm definitely not the first to talk about this tool (Jeff Atwood was &lt;a href="http://www.codinghorror.com/blog/2005/08/microsoft-logparser.html"&gt;writing about Log Parser in 2005&lt;/a&gt;!) it’s a utility that often goes unknown outside the server admin world.&lt;/p&gt; &lt;p&gt;Although it was released in 2005, Log Parser 2.2 is still a very powerful and an extremely fast command line tool used to query log files using SQL queries. &lt;/p&gt; &lt;p&gt;When it comes to taking on the monumental task of querying 100’s of megabyte or 100’s of gigabyte log files, it soon becomes your best friend.&lt;/p&gt;&lt;pre class="code"&gt;logparser.exe "SELECT * from 'C:\LogFiles\example_windows_eventviewer_file.evtx'" –i:EVT&lt;/pre&gt;
&lt;h3&gt;2012 – Log Parsing; Now With GUI!&lt;/h3&gt;
&lt;p&gt;Log Parser 2.2 was released in 2005. The log formats for a lot of different applications haven’t changed much in this time – although a number of things have occurred in the “Log Parser world” since.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lizard Labs has released &lt;a href="http://www.lizard-labs.net/log_parser_lizard.aspx"&gt;Log Parser Lizard&lt;/a&gt;, a GUI wrapper for Log Parser.
&lt;li&gt;The Exchange team has released &lt;a href="http://blogs.technet.com/b/exchange/archive/2012/03/07/introducing-log-parser-studio.aspx"&gt;Log Parser Studio&lt;/a&gt; another GUI wrapper for Log Parser.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;I still use the command line exe to query large files. I’m not sure if its simply instinct or placebo, but it &lt;em&gt;feels&lt;/em&gt; faster (I haven’t tested it), but I almost always use &lt;a href="http://www.lizard-labs.net/log_parser_lizard.aspx"&gt;Log Parser Lizard&lt;/a&gt; to build my queries before running my command line log searches.&lt;/p&gt;
&lt;p&gt;The main reason I use this is that Log Parser Lizard has intellisense to help write your queries (this saves you &lt;em&gt;a lot&lt;/em&gt; of time)&lt;/p&gt;
&lt;p&gt;The Log Parser Lizard application itself does have a downfall, in that it is not being written in a very async manner, meaning that if you use it on extremely large files, Log Parser Lizard will block the UI thread and hang – another reason that I use the command line to scan large files.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://blogs.technet.com/b/exchange/archive/2012/03/07/introducing-log-parser-studio.aspx"&gt;Exchange team’s tool&lt;/a&gt; &lt;em&gt;is&lt;/em&gt; written to not block the UI while processing files, but is very feature poor compared to Log Parser Lizard. &lt;/p&gt;
&lt;p&gt;So my recommendation:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Build your queries using Log Parser Lizard on a smaller subset of your log file. 
&lt;li&gt;Copy your query into the command line and run it against the command line tool. &lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/5e440817-0e3a-40f9-b52d-4454cbb211bc_image3.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 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="http://www.diaryofaninja.com/asset/blogimages/fdf5fa32-ee15-484c-8c50-8f8196267867_image3_thumb.png" width="600" height="491"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Example queries for Windows Security Logs&lt;/h3&gt;
&lt;p&gt;If you have &lt;a href="http://technet.microsoft.com/en-us/library/dd408940(v=ws.10).aspx"&gt;file system auditing turned on&lt;/a&gt;, and you export your Windows Security logs to external files (evtx), you can then use Log Parser to query them directly.&lt;/p&gt;
&lt;p&gt;For security logs, i’ve created a few sample queries, to give you an idea on some searches that help provide intelligence on what has occurred on your server and to get you started.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All actions against a folder within a certain timeframe&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“What’s been happening in the folder that my website/application stores data in between date X and date Y”&lt;/p&gt;&lt;/blockquote&gt;&lt;pre class="code"&gt;logparser.exe "SELECT TimeGenerated, EventID, EventType, EventTypeName, EventCategory, EventCategoryName, SourceName, Strings, ComputerName, SID, Message&amp;nbsp; FROM 'C:\LogFiles\example_windows_eventviewer_file.evtx' WHERE Strings LIKE ‘%C:\\MyWebsiteRootFolder%’ AND TimeGenerated BETWEEN timestamp(’04/04/2012', ‘dd/MM/yyyy’) and timestamp(’06/04/2012', ‘dd/MM/yyyy’) ORDER BY TimeGenerated DESC" -i:EVT&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;All successful file actions&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Who/what users have accessed my folders and files inside a certain directory”&lt;/p&gt;&lt;/blockquote&gt;&lt;pre class="code"&gt;logparser.exe "SELECT TimeGenerated, EventID, EventType, EventTypeName, EventCategory, EventCategoryName, SourceName, Strings, ComputerName, SID, Message FROM 'C:\LogFiles\example_windows_eventviewer_file.evtx' WHERE Strings LIKE '%C:\\MyWebsiteRootFolder%' AND EventTypeName='Success Audit Event'" -i:EVT&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All failed attempts to do something to a file/folder&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Who/what users have &lt;em&gt;attempted&lt;/em&gt; to run an action against a file that they aren’t allowed to do” (maybe a hacker, testing your site)&lt;/p&gt;&lt;/blockquote&gt;&lt;pre class="code"&gt;logparser.exe "SELECT TimeGenerated, EventID, EventType, EventTypeName, EventCategory, EventCategoryName, SourceName, Strings, ComputerName, SID, Message FROM 'C:\LogFiles\example_windows_eventviewer_file.evtx' WHERE Strings LIKE '%C:\\MyWebsiteRootFolder%' AND EventTypeName='Failure Audit Event'" -i:EVT&lt;/pre&gt;
&lt;h3&gt;Next up -&amp;gt; Scanning IIS Logs to investigate security incidents&lt;/h3&gt;
&lt;p&gt;While File system auditing is not something you want to turn on your entire servers disk drive, for instances where few writes occur (such as your website directory), setting it up and then using it to “play back the tape” on what has occurred on your server’s file system is a powerful tool to have in your arsenal.&lt;/p&gt;
&lt;p&gt;What’s more important is that when you go to inspect these logs files, that you have an easy and fast way to query them.&lt;/p&gt;
&lt;p&gt;Next we’ll cover how to do the same thing against IIS logs.&lt;/p&gt;
&lt;h3&gt;Further Reading&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://blog.scottlowe.org/2006/07/19/monitoring-event-logs-with-log-parser/"&gt;Monitoring Event Logs with Log Parser&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.logparser.com"&gt;Unofficial Log Parser Fan Site&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/b/exchange/archive/2012/03/07/introducing-log-parser-studio.aspx"&gt;Exchange Team Log Parser Studio (GUI for log parser)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lizard-labs.net/log_parser_lizard.aspx"&gt;Log Parser Lizard (GUI for Log Parser)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://aspalliance.com/1714_Using_LogParser_22_to_Parse_IIS_Logs_and_Other_Logs.10"&gt;Using LogParser 2.2 to Parse IIS Logs and Other Logs&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=Z5_8oqLM9uU:-e4b6FxV2nw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=Z5_8oqLM9uU:-e4b6FxV2nw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=Z5_8oqLM9uU:-e4b6FxV2nw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=Z5_8oqLM9uU:-e4b6FxV2nw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/jCde9Jp8kCg" height="1" width="1"/&gt;</description><pubDate>8/15/2012 7:14:33 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/08/15/up-log-creek-without-a-paddle-ndash-part-1-windows-audit-logs</feedburner:origLink></item><item><title>Up Log Creek Without a Paddle – Part 2: IIS Log File Investigations</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/zO5CA6DARCs/up-log-creek-without-a-paddle-ndash-part-2-iis-log-file-investigations</link><description>&lt;p&gt;When it comes to reviewing visitor site usage, server bandwidth usage, or forensic security investigations; IIS log files often hold the answers. Although as I'm sure you’re more than aware, gigantic text files can be hard to view let alone pull intelligence from. Investigating a website attack can be really daunting when looking at log files as an information source. In my previous post I covered a tool to help with &lt;a href="/blog/2012/08/15/up-log-creek-without-a-paddle-ndash-part-1-windows-audit-logs"&gt;Windows Security Logs&lt;/a&gt;. Lucky for us it’s just as awesome when dealing with huge IIS logs.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;This is part 2 in a 2 part series on reviewing actual or investigating potential website security intrusions on IIS hosted websites. &lt;a href="/blog/2012/08/15/up-log-creek-without-a-paddle-ndash-part-1-windows-audit-logs"&gt;View part 1 here&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/e1e48fb0-a49e-4f69-b894-4d895cbb9239_image_12.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/ad83be31-acc5-408b-a95b-82e81cc75bf4_image_thumb_5.png" width="600" height="303"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Image credit: &lt;a href="http://www.flickr.com/photos/jimbl/3079927501/"&gt;Jim B L&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Information overload…&lt;/h3&gt; &lt;p&gt;IIS Log files are great as they store the timeline of all usage on your website. If you know where to look, you can retrieve information that helps draw conclusions on so many different visitor scenarios. In the context of security, if you’re armed with the knowledge of what to look for, IIS log files can be a great tool to forensically review an attackers behaviour; whether they have been passive in their prodding of your application by just sniffing around or active by actually trying to break things.&lt;/p&gt; &lt;h3&gt;Fields of Gold&lt;/h3&gt; &lt;p&gt;When setting up your website, IIS can log a significant set of data; but not every option is turned on. To turn on &lt;em&gt;full&lt;/em&gt; logging, open IIS Manager, select your server’s root node and select “Logging”, then open up the “Select Fields” button.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/5dbb61b2-426f-484f-bb64-5af0801fd4be_image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/efce399a-bd9a-4f80-91ac-15783adbfd5d_image_thumb_1.png" width="354" height="132"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Select every option to include as much data as possible.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/0a948149-e872-4fb4-b8db-7ac3f2644bda_image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/4917d8f9-a6f8-471b-9c9e-aeeceb42d491_image_thumb.png" width="354" height="426"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Once you have this turned on, you’ll end up with a sea of information in these log files. On a busy website, these files will probably be too large to open in notepad.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/e940e6f3-5114-4fe3-94ff-dbefd6119196_image_6.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/2ab9cea5-4e79-4d41-9afb-1a96c730c0db_image_thumb_2.png" width="354" height="257"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Log Parser to the Rescue&lt;/h3&gt; &lt;p&gt;As I covered in my &lt;a href="/blog/2012/08/15/up-log-creek-without-a-paddle-ndash-part-1-windows-audit-logs"&gt;previous post&lt;/a&gt;, opening and then scanning huge logs can be a daunting task – luckily &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=24659#overview"&gt;Microsoft Log Parser 2.2&lt;/a&gt; solves this problem with a tool that makes it easy to query multiple &lt;em&gt;huge&lt;/em&gt; log files using well known SQL in record time!&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.lizard-labs.net/log_parser_lizard.aspx"&gt;Log Parser Lizard&lt;/a&gt; takes this one step further by allowing you to do this from a GUI interface.&lt;/p&gt; &lt;p&gt;To prove this point, load up Log Parser Lizard and write a simple query against the &lt;em&gt;whole &lt;/em&gt;log folder (not just a since large file, but many) for one of your IIS sites:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;SELECT &lt;/span&gt;&lt;span style="color: gray"&gt;TOP &lt;/span&gt;&lt;span style="color: red"&gt;100 &lt;/span&gt;&lt;span style="color: #006400"&gt;* &lt;/span&gt;&lt;span style="color: blue"&gt;FROM &lt;/span&gt;&lt;span style="color: red"&gt;'C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER*\*.log'&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/f710f57e-1a0a-4525-a25c-4b6cf257b0e0_image_8.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/01ec4466-ce0e-43f8-9922-661e5d9b9c1f_image_thumb_3.png" width="354" height="293"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Pretty cool, eh?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So you’ve got log files, you’ve got a kick ass tool to query them, but what queries will help you make sense of the data or track down the evil doers?&lt;/p&gt;
&lt;h3&gt;First look: Security queries&lt;/h3&gt;
&lt;p&gt;To start with, you need to think of the context you’re looking at when querying your log files in. In issues where someone has attacked your site in the past, you’re probably in the search for answers on how.&lt;/p&gt;
&lt;p&gt;If so, do you have an incident time to start trying to track down how it happened?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Getting a feel for when/how&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Maybe try a query for a certain date/time:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;SELECT&lt;/span&gt;&lt;span style="color: red"&gt; &lt;/span&gt;&lt;span style="color: #006400"&gt;* &lt;/span&gt;
&lt;span style="color: blue"&gt;FROM &lt;/span&gt;&lt;span style="color: red"&gt;'C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER*\*.log'
&lt;span style="color: blue"&gt;WHERE &lt;/span&gt;&lt;span style="color: black"&gt;date &lt;/span&gt;&lt;span style="color: #006400"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;'2012-07-26' &lt;/span&gt;&lt;span style="color: gray"&gt;AND &lt;/span&gt;&lt;span style="color: black"&gt;time &lt;/span&gt;&lt;span style="color: gray"&gt;BETWEEN TIMESTAMP&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: red"&gt;'02:03:00'&lt;/span&gt;&lt;span style="color: #006400"&gt;,&lt;/span&gt;&lt;span style="color: red"&gt;'hh:mm:ss'&lt;/span&gt;&lt;span style="color: #006400"&gt;) &lt;/span&gt;&lt;span style="color: gray"&gt;AND timestamp&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: red"&gt;'02:07:00'&lt;/span&gt;&lt;span style="color: #006400"&gt;,&lt;/span&gt;&lt;span style="color: red"&gt;'hh:mm:ss'&lt;/span&gt;&lt;span style="color: #006400"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Or maybe you just want to start by looking for server errors as a start, to see if an attacker was testing your website for vulnerabilities?&lt;/p&gt;
&lt;p&gt;Query looking for server Http response code 500:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;SELECT&lt;/span&gt;&lt;span style="color: red"&gt; &lt;/span&gt;&lt;span style="color: #006400"&gt;* &lt;/span&gt;
&lt;span style="color: blue"&gt;FROM &lt;/span&gt;&lt;span style="color: red"&gt;'C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER*\*.log'
&lt;span style="color: blue"&gt;WHERE &lt;/span&gt;&lt;span style="color: black"&gt;sc&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;status &lt;/span&gt;&lt;span style="color: #006400"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;500&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;p&gt;Another handy behaviour to look for is where you have a secure admin section. Most admin sections on websites redirect you if you aren’t logged in. They usually do this with a 302 redirect.&lt;/p&gt;
&lt;p&gt;So let’s look for visitors trying to access your site using the relative URL &lt;strong&gt;“/admin/*”&lt;/strong&gt; and who’re being redirected using 302 headers. While this &lt;em&gt;will&lt;/em&gt; show some false positives for wherever you’ve tried to log in and forgotten the password, it’ll also give you an idea if someone is sniffing around.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;SELECT &lt;/span&gt;&lt;span style="color: #006400"&gt;* 
&lt;/span&gt;&lt;span style="color: blue"&gt;FROM &lt;/span&gt;&lt;span style="color: red"&gt;'C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER*\*.log' 
&lt;/span&gt;&lt;span style="color: blue"&gt;WHERE  &lt;/span&gt;&lt;span style="color: black"&gt;cs&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;uri&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;stem &lt;/span&gt;&lt;span style="color: gray"&gt;LIKE &lt;/span&gt;&lt;span style="color: red"&gt;'/admin/%' &lt;/span&gt;&lt;span style="color: gray"&gt;AND &lt;/span&gt;&lt;span style="color: black"&gt;sc&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;status &lt;/span&gt;&lt;span style="color: #006400"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;302&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Following a security trail&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once you have what looks like an intruder poking around, you then want to see what else they’ve been doing – and you should have their IP address from the previous query so we can query the logs for them:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;SELECT &lt;/span&gt;&lt;span style="color: #006400"&gt;*
&lt;/span&gt;&lt;span style="color: blue"&gt;FROM &lt;/span&gt;&lt;span style="color: red"&gt;'C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER*\*.log'
&lt;/span&gt;&lt;span style="color: blue"&gt;WHERE &lt;/span&gt;&lt;span style="color: black"&gt;s&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;ip&lt;/span&gt;&lt;span style="color: #006400"&gt;=&lt;/span&gt;&lt;span style="color: red"&gt;'*IP ADDRESS OF ATTACKER*'&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;You can also see how much traffic is coming from single IP addresses by querying for each of their total usage – this might show someone attempting to brute force your site over time.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;select &lt;/span&gt;&lt;span style="color: teal"&gt;TO_LOCALTIME&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: teal"&gt;QUANTIZE&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: teal"&gt;TO_TIMESTAMP&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;date&lt;/span&gt;&lt;span style="color: #006400"&gt;, &lt;/span&gt;&lt;span style="color: black"&gt;time&lt;/span&gt;&lt;span style="color: #006400"&gt;), &lt;/span&gt;&lt;span style="color: red"&gt;3600&lt;/span&gt;&lt;span style="color: #006400"&gt;)), &lt;/span&gt;&lt;span style="color: magenta"&gt;count&lt;/span&gt;&lt;span style="color: #006400"&gt;(*) &lt;/span&gt;&lt;span style="color: gray"&gt;as &lt;/span&gt;&lt;span style="color: black"&gt;numberrequests 
&lt;/span&gt;&lt;span style="color: blue"&gt;from &lt;/span&gt;&lt;span style="color: red"&gt;'C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER*\*.log'  
&lt;/span&gt;&lt;span style="color: blue"&gt;group by &lt;/span&gt;&lt;span style="color: teal"&gt;TO_LOCALTIME&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: teal"&gt;QUANTIZE&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: teal"&gt;TO_TIMESTAMP&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;date&lt;/span&gt;&lt;span style="color: #006400"&gt;,&lt;/span&gt;&lt;span style="color: black"&gt;time&lt;/span&gt;&lt;span style="color: #006400"&gt;), &lt;/span&gt;&lt;span style="color: red"&gt;3600&lt;/span&gt;&lt;span style="color: #006400"&gt;))
&lt;/span&gt;&lt;span style="color: blue"&gt;order by &lt;/span&gt;&lt;span style="color: black"&gt;numberrequests &lt;/span&gt;&lt;span style="color: gray"&gt;desc&lt;/span&gt;&lt;/pre&gt;



&lt;p&gt;You can then query your logs for how many requests are coming from certain IP addresses to your “admin” section, again seeing brute forcing issues.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;select &lt;/span&gt;&lt;span style="color: teal"&gt;TO_LOCALTIME&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: teal"&gt;QUANTIZE&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: teal"&gt;TO_TIMESTAMP&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;date&lt;/span&gt;&lt;span style="color: #006400"&gt;, &lt;/span&gt;&lt;span style="color: black"&gt;time&lt;/span&gt;&lt;span style="color: #006400"&gt;), &lt;/span&gt;&lt;span style="color: red"&gt;3600&lt;/span&gt;&lt;span style="color: #006400"&gt;)), &lt;/span&gt;&lt;span style="color: magenta"&gt;count&lt;/span&gt;&lt;span style="color: #006400"&gt;(*) &lt;/span&gt;&lt;span style="color: gray"&gt;as &lt;/span&gt;&lt;span style="color: black"&gt;numberrequests 
&lt;/span&gt;&lt;span style="color: blue"&gt;from &lt;/span&gt;&lt;span style="color: red"&gt;'C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER*\*.log'
&lt;/span&gt;&lt;span style="color: blue"&gt;where &lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;cs&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;uri&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;stem &lt;/span&gt;&lt;span style="color: gray"&gt;like &lt;/span&gt;&lt;span style="color: red"&gt;'/admin/%'&lt;/span&gt;&lt;span style="color: #006400"&gt;) 
&lt;/span&gt;&lt;span style="color: blue"&gt;group by &lt;/span&gt;&lt;span style="color: teal"&gt;TO_LOCALTIME&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: teal"&gt;QUANTIZE&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: teal"&gt;TO_TIMESTAMP&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;date&lt;/span&gt;&lt;span style="color: #006400"&gt;,&lt;/span&gt;&lt;span style="color: black"&gt;time&lt;/span&gt;&lt;span style="color: #006400"&gt;), &lt;/span&gt;&lt;span style="color: red"&gt;3600&lt;/span&gt;&lt;span style="color: #006400"&gt;))
&lt;/span&gt;&lt;span style="color: blue"&gt;order by &lt;/span&gt;&lt;span style="color: black"&gt;numberrequests &lt;/span&gt;&lt;span style="color: gray"&gt;desc&lt;/span&gt;&lt;/pre&gt;
&lt;h3&gt;Non security related queries&lt;/h3&gt;
&lt;p&gt;Checking for incoming broken referral links:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;SELECT DISTINCT &lt;/span&gt;&lt;span style="color: #191970"&gt;cs&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;Referer&lt;/span&gt;&lt;span style="color: #006400"&gt;) &lt;/span&gt;&lt;span style="color: gray"&gt;as &lt;/span&gt;&lt;span style="color: black"&gt;Referer&lt;/span&gt;&lt;span style="color: #006400"&gt;, &lt;/span&gt;&lt;span style="color: black"&gt;cs&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;uri&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;stem &lt;/span&gt;&lt;span style="color: gray"&gt;as &lt;/span&gt;&lt;span style="color: black"&gt;Url
&lt;/span&gt;&lt;span style="color: blue"&gt;FROM &lt;/span&gt;&lt;span style="color: red"&gt;&lt;span style="color: red"&gt;'C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER*&lt;/span&gt;\*.log'
&lt;/span&gt;&lt;span style="color: blue"&gt;WHERE &lt;/span&gt;&lt;span style="color: #191970"&gt;cs&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;Referer&lt;/span&gt;&lt;span style="color: #006400"&gt;) &lt;/span&gt;&lt;span style="color: gray"&gt;IS NOT NULL AND &lt;/span&gt;&lt;span style="color: black"&gt;sc&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;status &lt;/span&gt;&lt;span style="color: #006400"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;404 &lt;/span&gt;&lt;span style="color: gray"&gt;AND &lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;sc&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;substatus &lt;/span&gt;&lt;span style="color: gray"&gt;IS NULL OR &lt;/span&gt;&lt;span style="color: black"&gt;sc&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;substatus&lt;/span&gt;&lt;span style="color: #006400"&gt;=&lt;/span&gt;&lt;span style="color: red"&gt;0&lt;/span&gt;&lt;span style="color: #006400"&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Top 10 slowest pages/files to load:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;SELECT &lt;/span&gt;&lt;span style="color: gray"&gt;TOP &lt;/span&gt;&lt;span style="color: red"&gt;10 &lt;/span&gt;&lt;span style="color: black"&gt;cs&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;uri&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;stem&lt;/span&gt;&lt;span style="color: #006400"&gt;, &lt;/span&gt;&lt;span style="color: magenta"&gt;max&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;time&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;taken&lt;/span&gt;&lt;span style="color: #006400"&gt;) &lt;/span&gt;&lt;span style="color: gray"&gt;as &lt;/span&gt;&lt;span style="color: black"&gt;MaxTime&lt;/span&gt;&lt;span style="color: #006400"&gt;, &lt;/span&gt;&lt;span style="color: magenta"&gt;avg&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;time&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;taken&lt;/span&gt;&lt;span style="color: #006400"&gt;) &lt;/span&gt;&lt;span style="color: gray"&gt;as &lt;/span&gt;&lt;span style="color: black"&gt;AvgTime
&lt;/span&gt;&lt;span style="color: blue"&gt;FROM &lt;/span&gt;&lt;span style="color: red"&gt;'&lt;span style="color: red"&gt;C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER*&lt;/span&gt;\*.log'
&lt;/span&gt;&lt;span style="color: blue"&gt;GROUP BY &lt;/span&gt;&lt;span style="color: black"&gt;cs&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;uri&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;stem
&lt;/span&gt;&lt;span style="color: blue"&gt;ORDER BY &lt;/span&gt;&lt;span style="color: black"&gt;MaxTime &lt;/span&gt;&lt;span style="color: gray"&gt;DESC&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Traffic by day:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Select &lt;/span&gt;&lt;span style="color: teal"&gt;To_String&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: teal"&gt;To_timestamp&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;date&lt;/span&gt;&lt;span style="color: #006400"&gt;, &lt;/span&gt;&lt;span style="color: black"&gt;time&lt;/span&gt;&lt;span style="color: #006400"&gt;), &lt;/span&gt;&lt;span style="color: red"&gt;'MM-dd'&lt;/span&gt;&lt;span style="color: #006400"&gt;) &lt;/span&gt;&lt;span style="color: gray"&gt;As &lt;/span&gt;&lt;span style="color: black"&gt;Day&lt;/span&gt;&lt;span style="color: #006400"&gt;, 
    &lt;/span&gt;&lt;span style="color: teal"&gt;Div&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: magenta"&gt;Sum&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;cs&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;bytes&lt;/span&gt;&lt;span style="color: #006400"&gt;),&lt;/span&gt;&lt;span style="color: red"&gt;1024&lt;/span&gt;&lt;span style="color: #006400"&gt;) &lt;/span&gt;&lt;span style="color: gray"&gt;As &lt;/span&gt;&lt;span style="color: #191970"&gt;Incoming&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;K&lt;/span&gt;&lt;span style="color: #006400"&gt;), 
    &lt;/span&gt;&lt;span style="color: teal"&gt;Div&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: magenta"&gt;Sum&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;sc&lt;/span&gt;&lt;span style="color: #006400"&gt;-&lt;/span&gt;&lt;span style="color: black"&gt;bytes&lt;/span&gt;&lt;span style="color: #006400"&gt;),&lt;/span&gt;&lt;span style="color: red"&gt;1024&lt;/span&gt;&lt;span style="color: #006400"&gt;) &lt;/span&gt;&lt;span style="color: gray"&gt;As &lt;/span&gt;&lt;span style="color: #191970"&gt;Outgoing&lt;/span&gt;&lt;span style="color: #006400"&gt;(&lt;/span&gt;&lt;span style="color: black"&gt;K&lt;/span&gt;&lt;span style="color: #006400"&gt;)
&lt;/span&gt;&lt;span style="color: blue"&gt;From &lt;/span&gt;&lt;span style="color: red"&gt;'C:\inetpub\logs\LogFiles\*WEBSITE LOG FOLDER\*.log'
&lt;/span&gt;&lt;span style="color: blue"&gt;Group By &lt;/span&gt;&lt;span style="color: black"&gt;Day&lt;/span&gt;&lt;/pre&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=24659"&gt;Log Parser&lt;/a&gt; is an awesome tool for querying large log files. &lt;a href="http://www.lizard-labs.net/log_parser_lizard.aspx"&gt;Log Parser Lizard&lt;/a&gt; makes this even easier with the addition of a GUI interface. For extremely large files I prefer to use the command line client for speed, but using the GUI to build your queries makes like just so easy – all of a sudden your information overload becomes a high signal/noise ratio sweet symphony that can help you either get a better feel for how your site is being used, or in the worst case scenario help you track down an evil doer and how they got in.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=D1C_jeL0knE:9ZgTGOsI3KE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=D1C_jeL0knE:9ZgTGOsI3KE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=D1C_jeL0knE:9ZgTGOsI3KE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=D1C_jeL0knE:9ZgTGOsI3KE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/zO5CA6DARCs" height="1" width="1"/&gt;</description><pubDate>8/23/2012 8:12:15 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/08/23/up-log-creek-without-a-paddle-ndash-part-2-iis-log-file-investigations</feedburner:origLink></item><item><title>Visual Studio 2012 Web Deployment Projects are Dead – Long Live Publishing Profiles</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/iNTd2okJ5lU/visual-studio-2012-web-deployment-projects-are-dead-ndash-long-live-publishing-profiles</link><description>&lt;p&gt;I’ve been a long time supporter of Visual Studio &lt;a href="http://www.microsoft.com/en-au/download/details.aspx?id=24509"&gt;Web Deployment projects&lt;/a&gt;. Not because I built ASP.Net websites and wanted to compile them, but more because they held so much unadulterated power from the simplicity of just being an MSBUILD file inside your solution. With the launch of Visual Studio 2012 Microsoft has made the call to &lt;a href="http://blogs.msdn.com/b/webdev/archive/2012/08/06/plans-regarding-website-projects-and-web-deployment-projects.aspx"&gt;no longer support WDP&lt;/a&gt; moving forward. This made me sad; but I was just being naive. Visual Studio 2012’s Publishing profiles are even more powerful, and they bring all your old friends along for the ride.&lt;/p&gt; &lt;h3&gt;Blinded by the light…&lt;/h3&gt; &lt;p&gt;A couple of weeks ago I attempted to rally some troops to &lt;a href="/blog/2012/07/15/dear-microsoft-please-include-web-deployment-projects-in-visual-studio-2012"&gt;fight the good fight.&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“… Who took my cheese?…”&lt;br&gt;- WDP Lovers everywhere&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I’ve been using Web Deployment projects to power the Continuous Integration of &lt;em&gt;every project&lt;/em&gt; that my work has built in the last 3 years. I work in an agency where we release up to 10 sites a month. This is a lot of projects. And they all rely on Visual Studio Web Deployment projects to be deployed reliably from day one.&lt;/p&gt; &lt;p&gt;The removal of Web Deployment projects from Visual Studio 2012 worried me. Not “ get your pitch forks” level of worry, but more a “wow what a real shame”.&lt;/p&gt; &lt;p&gt;This is where you may say:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“…Hey guy, why use WDP when Web Deploy has been around for years. I thought WDP were just for ASP.Net “website” n00bs living in the past?”&lt;br&gt;- Web Deploy user&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;You may wonder why I love Web Deployment Projects so much? Well its quite simple really;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;They sit nicely inside your Visual Studio IDE and were easily saved your deployment config to your source control.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/6e7698de-c518-4d34-8483-9c8f0ac93f15_image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/ee3b5077-ab1a-41d1-ae37-8f3fd7f115cc_image_thumb.png" width="354" height="179"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Web Deployment projects are really just MSBUILD files, and therefore you can do &lt;em&gt;anything&lt;/em&gt; inside them using the already outlined build tasks.&lt;/strong&gt;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target &lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;BeforeBuild&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;  
  &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;// MAGIC UNICORNS ARE BORN HERE!! &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;  
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;  
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target &lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;BeforeMerge&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;// MAGIC UNICORNS ARE BORN HERE!! &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target &lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;AfterMerge&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;// MAGIC UNICORNS ARE BORN HERE!! &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target &lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;AfterBuild&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;// MAGIC UNICORNS ARE BORN HERE!! &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;As they’re just MSBUILD they are supported nearly everywhere by everything, and can use all MSBUILD extensions inside them.&lt;/strong&gt;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;!-- 
&lt;/span&gt;&lt;span style="color: green"&gt;Import the oober cool MSBUILD community tasks from
https://github.com/loresoft/msbuildtasks  
&lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Import &lt;/span&gt;&lt;span style="color: red"&gt;Project&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;It’s also really easy to build different configurations for different environments simply through different Configuration Manager Solution profiles.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/a61f6f85-e248-4184-8fd9-57c5beb06d31_image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/bc42e691-a989-4331-9514-9a81c91ccf01_image_thumb_1.png" width="354" height="207"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And you could script the entire deployment, including calling Web Deploy from &lt;em&gt;inside&lt;/em&gt; the web deployment project, to avoid having configuration mixed into your build server’s config. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;All of this is testable on the local dev machine.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;But guess what?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;I was worried about nothing.&lt;/u&gt;&lt;/strong&gt; The new publishing profiles are really &lt;strong&gt;the exact same thing&lt;/strong&gt; as Web Deployment projects, but actually &lt;em&gt;more&lt;/em&gt; powerful.&lt;/p&gt;
&lt;h3&gt;It’s time to move on… Publishing Profiles are actually better&lt;/h3&gt;
&lt;p&gt;The new publishing profiles in Visual Studio allow us to do &lt;em&gt;all of the above,&lt;/em&gt; without really giving up anything at all.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;They site nicely inside the IDE and are easily saved to your source control:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/114a5a0e-b1f9-4ca8-a07a-64a06d01e2b8_image_6.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/646d7cd3-2d57-4a46-a2e1-d7949469c2cb_image_thumb_2.png" width="354" height="290"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Publishing profiles are really just MSBUILD files, and therefore you can do &lt;em&gt;anything&lt;/em&gt; inside them you just by using the same build target names.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background: white; color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style="background: white; color: green"&gt;OMG WTF BBQ THESE STILL WORK INSIDE A PUBLISHING PROFILE PUBXML!!!&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;--&amp;gt;&lt;br&gt;&amp;nbsp; &lt;br&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="background: white; color: red"&gt;Name&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;BeforeBuild&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;!--&lt;/span&gt;&lt;span style="background: white; color: green"&gt;// MAGIC UNICORNS ARE _STILL_ BORN HERE!!&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;--&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&lt;br&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="background: white; color: red"&gt;Name&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;BeforeMerge&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;!--&lt;/span&gt;&lt;span style="background: white; color: green"&gt;// MAGIC UNICORNS ARE _STILL_ BORN HERE!!&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;--&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&lt;br&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="background: white; color: red"&gt;Name&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;AfterMerge&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;!--&lt;/span&gt;&lt;span style="background: white; color: green"&gt;// MAGIC UNICORNS ARE _STILL_ BORN HERE!!&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;--&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&lt;br&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="background: white; color: red"&gt;Name&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;AfterBuild&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;!--&lt;/span&gt;&lt;span style="background: white; color: green"&gt;// MAGIC UNICORNS ARE _STILL_ BORN HERE!!&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;--&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Because of the above, you can &lt;em&gt;still&lt;/em&gt; user all your MSBUILD extensions.&lt;/strong&gt;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;!-- 
&lt;/span&gt;&lt;span style="color: green"&gt;Import the oober cool MSBUILD community tasks from
https://github.com/loresoft/msbuildtasks  
&lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Import &lt;/span&gt;&lt;span style="color: red"&gt;Project&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;And its still just as easy to build different configurations using the IDE and test locally.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You can also call these publishing profiles from the command line!&lt;/strong&gt;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: #e6e7e8; color: #1e1e1e"&gt;C:\Code\MyWebsite&amp;gt;msbuild MySolution.sln /p:DeployOnBuild=true;PublishProfile=Deploy-Production;&lt;/span&gt;&lt;/pre&gt;
&lt;h3&gt;Awesome things that get to join the party&lt;/h3&gt;
&lt;p&gt;As I mentioned above, publishing profiles actually add &lt;em&gt;more&lt;/em&gt; power to this story, as they have a number of features that Web Deployment Projects missed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;They have native IDE support for building your publishing settings. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;These get saved into your profile &lt;em&gt;without&lt;/em&gt; touching anything you’ve put inside your profile such as custom build targets.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/2acdf430-26f1-4fef-8503-3df4a4fe0aed_image_8.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/8617b349-2afe-46e9-9544-b1a9aa281396_image_thumb_3.png" width="454" height="355"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You can leverage all of MS Deploy to plug in at any step of the deployment.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This allow you to do things like customise &lt;a href="/blog/2010/09/28/continuous-integration-tip-2-ndash-using-appofflinehtm-in-your-build"&gt;app_offline.htm files&lt;/a&gt; during deployment, and anything else you have in mind. Package a deployment package and check it into your source control? easy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You can also run &lt;em&gt;tiered&lt;/em&gt; web.config transforms&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This allows you to run a transform for “debug” builds that maybe does things like turning custom errors pages off and then another transform for your “Staging” environment that sets your database connection strings up correctly. This is powerful. I used to have to do this level of granularity &lt;a href="/blog/2011/09/14/using-custom-webconfig-transformations-in-msbuild"&gt;manually&lt;/a&gt; in an “AfterBuild” target in my web deployment projects. Now it’s there out of the box.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/a87a7931-5c69-457c-a973-1bab1f896965_image_10.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/45702977-48b6-4aad-a5cd-8eb65dc6e468_image_thumb_4.png" width="454" height="43"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;The future looks bright&lt;/h3&gt;
&lt;p&gt;If you were like me and were worried about &lt;a href="http://sedodream.com/2012/08/06/PlansRegardingWebsiteProjectsAndWebDeploymentProjects.aspx"&gt;Sayed’s post&lt;/a&gt; it’s time to calm down. There is no fire – in fact publishing profiles actually are &lt;em&gt;more integrated, more powerful, &lt;/em&gt;and are going to be &lt;em&gt;more widely used&lt;/em&gt; than web deployment projects ever were. This will mean&amp;nbsp; great things for developers wanting to get into using Continuous Integration with ASP.Net as there will be lots of documentation floating around from different people’s take on what works for them.&lt;/p&gt;
&lt;p&gt;If Continuous Integration and Deployment are your pot of gold, Publishing Profiles just might be the rainbow that’ll help lead you there. Well done Visual Studio team.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=gDyLVf73fz0:yrqXSHmORbo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=gDyLVf73fz0:yrqXSHmORbo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=gDyLVf73fz0:yrqXSHmORbo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=gDyLVf73fz0:yrqXSHmORbo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/iNTd2okJ5lU" height="1" width="1"/&gt;</description><pubDate>8/26/2012 11:00:43 PM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/08/26/visual-studio-2012-web-deployment-projects-are-dead-ndash-long-live-publishing-profiles</feedburner:origLink></item><item><title>The Senior Position Fallacy</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/JpHcfQFqxLo/the-senior-position-fallacy</link><description>&lt;p&gt;In the IT industry employees experience a weird phenomenon once they begin to move up the ranks. You often start work in IT because you get to build stuff, monitor things, and watch your creations grow. The weirdest thing about this is that in our industry to step up in your career you often have to actually stop producing things. To move into management put down the tools, and loosen your grip on what you love.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/e739a2f5-3244-43a5-a460-9b6765587c71_image_2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 15px 0px 15px 15px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/c01c529f-1d79-42a3-8263-d4d3545fd465_image_thumb.png" width="254" height="182"&gt;&lt;/a&gt;I’ve been working in IT my entire career. I started building websites and helping fix networks while I was still in high school. My first well paying job was actually working for myself growing a little digital production business. I learnt many things along the way, but I was lucky to realise quite early on that I would much rather be paying someone else to do the managing and accounting; leaving me to stay close to what I loved. I wasn't yet ready to move up the ranks.&lt;/p&gt; &lt;p&gt;Fast forward to today and I am now a year and a bit into my current role as a Technical Director. I take care of a development department.&lt;/p&gt; &lt;p&gt;When I was first offered the role it was an exciting opportunity that I craved. It was the chance to prove to myself what I was really able to accomplish if I had the reigns. I had worked in positions in smaller workplaces that carried similar responsibilities, but they were never officially recognized as such; being the guy in charge. It was an opportunity for me to take everything I had seen go wrong in a development department, and try and correct it little by little.&lt;/p&gt; &lt;p&gt;I was very aware while taking the position that in order to be successful in my new role I would have to give up a huge part of what made working in software my career for so long so that I could concentrate on my new place in the world entirely.&lt;/p&gt; &lt;p&gt;I had to step away from day-to-day development.&lt;/p&gt; &lt;p&gt;Step away from the tools. Close my IDE, and watch from afar (albeit only a few metres). I can’t lie and say this wasn’t hard. I have thought about it most days. At work if I'm talking development or tooling I’m talking architecture and application design. I still write a lot of code, I just often write most of it at home late at night – I’m “keeping the dream alive” so to speak. I’d never stop doing it completely, as apart from keeping current being important to my role, I think I'd actually go mad if I didn’t. I must state that I do really enjoy my new role though; it both challenging and rewarding. I still solve problems, just different types. &lt;/p&gt; &lt;p&gt;The level of recognition I have received has definitely risen though.&lt;/p&gt; &lt;p&gt;After promotion to my current position my life changed considerably. I won awards both for my department’s work and also personally from magazines and industry bodies for being “a guy on the rise”. I am asked to give my opinion on matters and more recently speak at a number of industry events. I’ve also been lucky enough to garner a higher salary. In some way, it’s almost as if I've been rewarded for stepping away.&lt;/p&gt; &lt;p&gt;Our industry isn’t the only one in which this situation occurs. You see it in many industries where people produce something.&lt;/p&gt; &lt;p&gt;And the whole experience has left me with a lasting question;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“Why does the world often only start to measure success, the minute you begin to step away?”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I understand there is a million reasons as to why this occurs, and I've definitely over simplified the issue; in some ways the question seems silly, but it still runs through my mind a lot.&lt;/p&gt;&lt;p&gt;Senior technical roles actually consist largely of responsibilities that are non-technical.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=IFmay2_mP_c:j5bB8U9b5V0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=IFmay2_mP_c:j5bB8U9b5V0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=IFmay2_mP_c:j5bB8U9b5V0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=IFmay2_mP_c:j5bB8U9b5V0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/JpHcfQFqxLo" height="1" width="1"/&gt;</description><pubDate>9/6/2012 8:25:18 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/09/06/the-senior-position-fallacy</feedburner:origLink></item><item><title>Microsoft TechEd Australia 2012</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/5sRBtNRCUwo/microsoft-teched-australia-2012</link><description>&lt;p&gt;Today marks the official start to Microsoft’s &lt;a href="https://australia.msteched.com/" target="_blank"&gt;TechEd Australia Conference&lt;/a&gt; on the sunny Queensland Gold Coast. With over 4 days of talks, product launch education, hands-on labs along with device and software manufacturers spruiking their wares, it is sure to be a great week – if you are around shoot me a &lt;a href="http://twitter.com/dougrathbone" target="_blank"&gt;tweet&lt;/a&gt; so that we can try and cross paths during the week.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/51cc3ee6-fe77-451b-84c0-5252c49e4c06_MicrosoftFlagsTechEd_2.jpg"&gt;&lt;img title="MicrosoftFlagsTechEd" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 15px 0px 15px 15px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="MicrosoftFlagsTechEd" align="right" src="http://www.diaryofaninja.com/asset/blogimages/10c33a82-2883-4ec8-be4f-b3660ef995e0_MicrosoftFlagsTechEd_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt;I did say today is the official launch as today is the day the majority of delegates arrive - nearly 200 sleepy souls started their conference early yesterday by making it through the 24 hour straight &lt;a href="https://australia.msteched.com/app-fest/"&gt;Windows 8 AppFest&lt;/a&gt; for the chance to win a $1000 Windows 8 device. Finishing up at 11am this morning most are probably back at their hotels catching up on some much deserved sleep.&lt;/p&gt; &lt;p&gt;Today is a big year for Microsoft as it releases a whole bunch of updates to products that many developers and IT admins alike spend most of their days with. Their will be the new server line releases with Windows Server 2012, a big push towards Microsoft’s Cloud services platform Azure, much talk of their new IDE Visual Studio 2012, as well as a ramp up towards the release of Windows Phone 8 plus much, much more. There are so many different things going on that the program for the week feels more like a music festival guide than a IT industry conference timesheet, with thoughts running through my head like “Which stage are we going to next?” and “Why did they have to book these two things at the same time…!”.&lt;/p&gt; &lt;h3&gt;Swag time&lt;/h3&gt; &lt;p&gt;When the tickets to Microsoft’s Build 2012 event &lt;a href="http://www.zdnet.com/microsofts-build-2012-developer-conference-sells-out-in-an-hour-7000002350/" target="_blank"&gt;sold out in 2 hours&lt;/a&gt;, many said it was the chance that they’d be handing out Microsoft Surfaces as part of the ticket. TechEd has a history of handing out the obligatory &lt;a href="http://www.zdnet.com/photos/microsoft-teched-conference-bags-down-the-years/6366517" target="_blank"&gt;Tech Ed Bag&lt;/a&gt; and a few associated deals packed in, they have sometimes also included devices along the way (such as the &lt;a href="http://hardforum.com/showthread.php?t=1431579" target="_blank"&gt;HP Mininote&lt;/a&gt; in 2009). This year the inclusion of a pretty epic Targus bag is no exception. This bag rivals “&lt;a href="http://www.thinkgeek.com/product/aaa5/" target="_blank"&gt;The bag of holding&lt;/a&gt;” with the amount of pockets included (I counted 12 zip pockets. Someone even thought they could get an extra one on the product sheet by including a zip pocket on the bottom of the bag?).&lt;/p&gt; &lt;p&gt;The inclusion of a water bottle to hydrate after any 24 hackathons along with a padded laptop section for yours truly to cart around my ThinkPad are definitely appreciated.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/3f609db5-033e-4342-9d6b-2a6187883d64_SwagBag_2.jpg"&gt;&lt;img title="SwagBag" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="SwagBag" src="http://www.diaryofaninja.com/asset/blogimages/3c46d3ad-31ee-4679-869d-25d484c2b239_SwagBag_thumb.jpg" width="454" height="342"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The TechEd 2012 “Swag bag”&lt;/p&gt; &lt;h3&gt;On with the show&lt;/h3&gt;   &lt;p&gt;All in all I'm pretty excited about what is to come. I’m also looking forward to touching base with a number of others in the tech community and sharing ideas – if you follow me on twitter, or subscribe to my blog, shoot me a &lt;a href="http://twitter.com/dougrathbone" target="_blank"&gt;tweet&lt;/a&gt; or &lt;a href="/me" target="_blank"&gt;email&lt;/a&gt; and come say hello.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=PCup66d7C6Y:n6CWJnSmkv4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=PCup66d7C6Y:n6CWJnSmkv4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=PCup66d7C6Y:n6CWJnSmkv4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=PCup66d7C6Y:n6CWJnSmkv4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/5sRBtNRCUwo" height="1" width="1"/&gt;</description><pubDate>9/10/2012 11:55:47 PM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/09/10/microsoft-teched-australia-2012</feedburner:origLink></item><item><title>Setting up a VPN server on Windows 7 or Windows 8 – Secure your Internet use while away</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/ibkm8O8FY3k/setting-up-a-vpn-server-on-windows-7-or-windows-8-ndash-secure-your-internet-use-while-away</link><description>&lt;p&gt;These days we’re lucky. SSL is becoming pretty pervasive. Facebook uses it. Twitter uses it. Most modern start ups now use it. Sadly there are still other sites or services that you may be accessing on the internet that are still insecure allowing others to listen in on your internet usage, and for these your want an encrypted VPN link to route your traffic through. VPN’s can be expensive though if all you have is a home PC and a laptop on the road – lucky for us this can be a magic combination that is all you need and saves the day.&lt;/p&gt; &lt;p&gt;This week I’m in TechEd Australia. Microsoft make the fact that using the shared Wi-Fi could be fraught with peril:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/f5417b5d-334a-4018-805e-9ba8d68da71c_WifiSecurityIsAnIssue_2.jpg"&gt;&lt;img title="Beware the #firesheep amongst us at #AuTechEd" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Beware the #firesheep amongst us at #AuTechEd" src="http://www.diaryofaninja.com/asset/blogimages/a59dcac6-6dda-40b5-8904-276ea1c5c25c_WifiSecurityIsAnIssue_thumb.jpg" width="354" height="266"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;The Australian TechEd program guide on Wi-fi usage.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;The above statement didn’t worry me though. Why? Because I have a VPN to connect to when using third party internetzes while I'm on the road.&lt;/p&gt; &lt;p&gt;A few people I spoke to on the day seemed to think this was a lot harder than it is to setup. You don’t need to be a network engineer, and you don’t need Windows Server or a remote Amazon instance, or really much of a clue. All you need is a Windows 7 or Windows 8 PC to host your VPN (i.e. at PC at home), a Windows PC to dial in from (from XP right through to Win 8) and port forwarding support in your router.&lt;/p&gt; &lt;h3&gt;How is this possible?&lt;/h3&gt; &lt;p&gt;From Windows 7 onwards there is native support for hosting an incoming PPTP VPN service.&lt;/p&gt; &lt;p&gt;This allows you to setup a remote Windows 7 or Windows 8 machine as a VPN server for you dial in to while you are on the road, so that you can route your internet traffic through this remote machine’s internet connection in an encrypted fashion.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/5e28b06e-f77e-457c-8cb6-48522b9d3df7_image_18.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/55a9d4cc-318a-4c1a-8781-ea0a9abf84b5_image_thumb_8.png" width="454" height="139"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This allows you to cut the&amp;nbsp; complicated setup of a whole bunch of services such as DHCP, VPN, and routing into a simple step by step walk through that can take you 5 minutes.&lt;/p&gt; &lt;h3&gt;What you’ll need&lt;/h3&gt; &lt;ul&gt; &lt;li&gt;Windows 7 or Windows 8 remote machine for hosting the VPN connection.&lt;/li&gt; &lt;li&gt;The ability to route internet ports directly to this machine (i.e. port forwarding support in your router or a PC connected directly to the internet).&lt;/li&gt;&lt;/ul&gt; &lt;h3&gt;On with it then…&lt;/h3&gt; &lt;p&gt;At home I have a Windows 7 PC used as a media pc that is on &lt;em&gt;all the time&lt;/em&gt; for media sharing and TV watching duties. This is perfect for me as it gives me a remote PC that is on all the time and is&amp;nbsp; connected to an internet connection I trust. If you have such a PC and control the port forwarding to said machine, this is all you need.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 1: setup the VPN server (on your host machine).&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The following works on both a Windows 8 and a Windows 7 machine (I've tested both successfully and the interface is exactly the same with just different “chrome” on the windows).&lt;/p&gt; &lt;p&gt;Open&lt;em&gt; Network Connections&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Hit the ALT Key to show the file menu, and then select &lt;em&gt;New Incoming Connection.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/19c7b23d-97c0-4ff3-9c66-becd90bcaa51_image_4.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/def94dd0-1c2b-42df-b332-54e4dbbc9b61_image_thumb_1.png" width="454" height="295"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;At this point you can either select one of the current local machine users and grant them access to your new VPN link, or take my suggestion and create a new user &lt;em&gt;just for VPN access&lt;/em&gt; and give it a really strong password. This will ensure that even if an evil doer gets into your VPN link, they don't necessarily have any of your other account files with the same account. Don’t make it any easier for them.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/db43e204-1f15-4c97-9c7e-92bf6dbf28cd_image_6.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/50dc2cba-77b4-442d-b11f-3e3cbc27a7bf_image_thumb_2.png" width="454" height="338"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Then on the next page, tick the box that mentions that users will be connecting “&lt;em&gt;through the internet”.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/9e67acf7-0492-4632-a08f-43d6f6529400_image_10.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/f02861a3-1b56-43d7-9837-d70ff5255aa9_image_thumb_4.png" width="454" height="338"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;On the next page tick the network protocols you would like them to have access to. I’ve left mine “as is” as I only need IPv4.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/4ec4e1a5-3a4d-4af5-845f-66762b4df889_image_12.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/14b8ba3e-7b90-471a-840a-ea6a94ba96b9_image_thumb_5.png" width="454" height="338"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Then click “&lt;em&gt;Allow access&lt;/em&gt;”.&lt;/p&gt; &lt;p&gt;This has finished the setup of your server.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 2: Setup port forwarding.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Next you need to allow “the internet” to talk to your host PC on TCP port 1723.&lt;/p&gt; &lt;p&gt;First setup a static IP address for your host PC on your local network.&lt;/p&gt; &lt;p&gt;Take a look at &lt;a href="http://portforward.com/" target="_blank"&gt;Port Forward&lt;/a&gt; to find your router and instructions for how to forward TCP port 1723 to your machine’s IP address from the internet.&lt;/p&gt; &lt;p&gt;This will allow your host PC to be contactable from the internet, but unless you are lucky enough to have a static internet IP address from your ISP, or you don’t mind having to remember IP addresses, you’ll want to give your host machine a nicer address.&lt;/p&gt; &lt;p&gt;To help with making your host PC easier to connect to, take a look at &lt;a href="http://itknowledgeexchange.techtarget.com/itanswers/setting-up-dyndns-with-windows-7/" target="_blank"&gt;setting up DynDNS&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 3: Your client PC.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Now that you have your home host PC all setup, you simply need to setup your client PC to connect.&lt;/p&gt; &lt;p&gt;This is just as simple.&lt;/p&gt; &lt;p&gt;Open the network control panel item &lt;em&gt;Setup a VPN Connection&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;Enter the remote hostname for your PC. If you’ve setup DynDNS this is your DynDNS host address (ie [yourhostname].dyndns.org.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/dad67d90-dd6f-4165-8b19-054a08a6b742_image_16.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/fa0c8b39-855a-409b-a93b-d17d60e1e0d9_image_thumb_7.png" width="454" height="338"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Click &lt;em&gt;Create&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;Now when you attempt to connection, simply enter the username and password you created earlier (the one with the really strong password) and connect.&lt;/p&gt; &lt;p&gt;Now enjoy the security of having a remote VPN setup without all the server management hassle.&lt;/p&gt; &lt;h3&gt;You have been warned&lt;/h3&gt; &lt;p&gt;Using 3rd party Wi-Fi at your local cafe or in my case conference centre is a bad idea. Any website you visit while connected to these Wi-Fi access points risks anyone else on the network sniffing your traffic and stealing your session using something like &lt;a href="http://codebutler.github.com/firesheep/" target="_blank"&gt;Firesheep&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;However there is another risk in setting up a VPN by following the above:&lt;/p&gt; &lt;p&gt;By following the above you are directly placing your PC “on the internet”. This means the evil doers can have just as much access as you. Be sure to place a really strong password on any accounts you setup, and change it regularly. You can also look at using a different TCP port for your VPN so that there is a bit more obscurity for anyone just trying to brute force port 1723.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=78o3xhP0s7o:qFGgZuTCpS4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=78o3xhP0s7o:qFGgZuTCpS4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=78o3xhP0s7o:qFGgZuTCpS4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=78o3xhP0s7o:qFGgZuTCpS4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/ibkm8O8FY3k" height="1" width="1"/&gt;</description><pubDate>9/11/2012 9:52:04 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/09/11/setting-up-a-vpn-server-on-windows-7-or-windows-8-ndash-secure-your-internet-use-while-away</feedburner:origLink></item><item><title>Problems with .Net 2.0 Mixed Mode Assemblies inside Visual Studio .Net 4.5 Test Projects</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/KsjB-LHzz_I/net-20-mixed-mode-assemblies-in-visual-studio-net-45-test-projects</link><description>&lt;p&gt;When you include .Net 2.0 mixed mode assemblies in .Net 4.0 or .Net 4.5 projects you often have to add some &lt;a href="http://www.marklio.com/marklio/PermaLink,guid,ecc34c3c-be44-4422-86b7-900900e451f9.aspx" target="_blank"&gt;start up options&lt;/a&gt; to your project’s config file to get it all to play nice when your app starts up. This backwards compatibility feature is great as it allow you to use older/non supported projects in your recent work.When when using Visual Studio 2012’s new unit testing tools this magical piece of app.config code doesn’t seem to help though, and the solution is pretty simple.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/24b47c8f-badf-4b3c-ba85-09c81cef0999_image_4.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 15px 0px 15px 15px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/a68c6d83-e478-4a91-99ed-633ae0fce37c_image_thumb_1.png" width="244" height="170"&gt;&lt;/a&gt;Recently I’ve had great fun working on some green field .Net 4.5 projects. While Unit Testing some of the code in these projects using Visual Studio’s “super sweet” async testing tools I’ve come across a niggling little issue that breaks with normal convention when it comes to testing code that depends on older assemblies.&lt;/p&gt; &lt;h3&gt;The Problem&lt;/h3&gt; &lt;p&gt;Normally when you are loading .Net 2.0 assemblies as a reference into a .Net 4.0 or 4.5 project you have to tell .Net that it should run in a compatibility mode so that your old assembly will load properly.&lt;/p&gt; &lt;p&gt;This is because .Net 2, 3.0 and 3.5 assemblies are all built against the .net 2.0 CLR.&lt;/p&gt; &lt;p&gt;.Net 4.0 and 4.5 assemblies are built against different CLR’s and therefore startup differently.&lt;/p&gt; &lt;p&gt;For backwards compatibility the Microsoft .Net teams kindly allowed you the add the following to your web.config or app.config to make this all still work:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="background: white; color: red"&gt;version&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;1.0&lt;/span&gt;&lt;span style="background: white; color: black"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red"&gt;encoding&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;utf-8&lt;/span&gt;&lt;span style="background: white; color: black"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;startup &lt;/span&gt;&lt;span style="background: white; color: red"&gt;useLegacyV2RuntimeActivationPolicy&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;true&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;supportedRuntime &lt;/span&gt;&lt;span style="background: white; color: red"&gt;version&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;v4.0&lt;/span&gt;&lt;span style="background: white; color: black"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red"&gt;sku&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;.NETFramework,Version=v4.5&lt;/span&gt;&lt;span style="background: white; color: black"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;supportedRuntime &lt;/span&gt;&lt;span style="background: white; color: red"&gt;version&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;v2.0.50727&lt;/span&gt;&lt;span style="background: white; color: black"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;supportedRuntime&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;startup&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;The above will make your application run fine when placed into the app’s config file.&lt;/p&gt;
&lt;p&gt;When writing unit tests against a .Net 4.0 or 4.5 assembly and running these unit tests inside Visual Studio 2012 this fix sadly doesn’t work.&lt;/p&gt;
&lt;p&gt;Case in point with my SharpSVN “bang my head against a brick wall” exception below which worked when running in my app, but failed under unit test (the be fair this is an &lt;em&gt;integration test&lt;/em&gt; – apologies to the unit testing elitists out there…):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/0bcefe45-7803-48e8-ade2-011734943527_image_2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/e83032e3-f6d2-4fb4-a7bb-fae87cac13bb_image_thumb.png" width="454" height="143"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;The Solution&lt;/h3&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;The reason the normal app.config fix doesn’t work when using the Microsoft Test runner built into Visual Studio 2012 is that the test runner’s environment &lt;strong&gt;isn’t inside your test project’s bin folder&lt;/strong&gt;. It’s running somewhere else.&lt;/p&gt;
&lt;p&gt;The file you need to place your compatibility config settings in is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.executionengine86.exe.config&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If you open the above file using your favourite notepad (running as Administrator) and place the same “startup” section mentioned higher in this post inside this file, all your problems resolve themselves.&lt;/p&gt;
&lt;p&gt;Hopefully the above post can save you the time it took me to find it.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=1yNskqyPzp0:RWDomhV_qfQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=1yNskqyPzp0:RWDomhV_qfQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=1yNskqyPzp0:RWDomhV_qfQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=1yNskqyPzp0:RWDomhV_qfQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/KsjB-LHzz_I" height="1" width="1"/&gt;</description><pubDate>9/13/2012 12:22:50 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/09/13/net-20-mixed-mode-assemblies-in-visual-studio-net-45-test-projects</feedburner:origLink></item><item><title>Integration Testing FTP Connections in .Net</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/65MJZmCBEXI/integration-testing-ftp-connections-in-net</link><description>&lt;p&gt;When writing testable code your first port of call is often to abstract any dependencies and make them easy to mock. This is the same for any of your codebase that talks to FTP servers. Testing the way your code behaves under real world conditions makes integration tests important regardless of abstraction though. Here’s a simple trick to test FTP code in the wild.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/3539f315-43bd-48b5-b6c2-92eb31c4b486_image_4.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 15px 0px 15px 15px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/43e8dd92-bc9f-45d3-89c8-d5bc2941a704_image_thumb_1.png" width="244" height="196"&gt;&lt;/a&gt;A recent project of mine has involved writing code that talks to FTP servers with the goal of adding additional continuous integration automation to a project. Although all of my main methods are easily abstracted and injectable, my project still needs to actually &lt;em&gt;talk&lt;/em&gt; to FTP servers at the end of the day, and I need to test that these very methods do the right thing when they are met with different conditions; be they bad credentials, lack of read/write permissions etc.&lt;/p&gt; &lt;h3&gt;The Challenge&lt;/h3&gt; &lt;p&gt;Integration tests can be brittle at the best of times, so ensuring that they are repeatable and can be setup and torn down can often be almost as much of a challenge as writing your actual code itself.&lt;/p&gt; &lt;p&gt;An FTP server is usually a static service that is installed on a server. You might think that running one and ensuring it stays up and doesn’t get hacked just so that all your integration tests work is a necessary evil, but there is an easier way.&lt;/p&gt; &lt;h3&gt;Run local. Run often.&lt;/h3&gt; &lt;p&gt;I was running an FTP server on my build server just so that it was “always around” for my tests until i stumbled across an interesting project over on &lt;a href="https://github.com/Buthrakaur/FtpIntegrationTesting" target="_blank"&gt;GitHub to do just this&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The approach I'm about to show you doesn’t need you to go to the effort of running a dedicated server at all. All you need to do is add a &lt;em&gt;single executable&lt;/em&gt; to your unit test project and wrap your unit test in a using statement.&lt;/p&gt; &lt;p&gt;The FTP server executable is a single file FTP server called &lt;a href="http://www.sentex.net/~mwandel/ftpdmin/" target="_blank"&gt;FTPDMIN&lt;/a&gt; which offers a read/write FTP server that can be fired up from the command line with a minimum feature set and only a few command line parameters to make it all tick.&lt;/p&gt; &lt;p&gt;By implementing &lt;a href="http://msdn.microsoft.com/en-us/library/system.idisposable.aspx" target="_blank"&gt;IDisposable&lt;/a&gt; the helper class that wraps around this command line exe allows you to take advantage of the &lt;em&gt;using()&lt;/em&gt; pattern to take care of your executable’s lifetime and have it die when your code is done testing.&lt;/p&gt; &lt;h3&gt;Steps to make it happen&lt;/h3&gt; &lt;p&gt;Download FTPDMIN from &lt;a href="http://www.sentex.net/~mwandel/ftpdmin/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Add the exe to the root of your test project (you can put this anywhere, but you’ll have to update the helper class below).&lt;/p&gt; &lt;p&gt;Now add the exe to your project (i.e “view all items” in your test project’s solution explorer, and add the exe).&lt;/p&gt; &lt;p&gt;Set the EXE to “Copy always” in it’s solution properties.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/775c601a-fa29-453f-acf2-ce2c024f1031_image_2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/5784481d-9a80-4b4e-be01-ba16a158777e_image_thumb.png" width="244" height="200"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Add the following code to a helper class in your Test Project:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: blue"&gt;public class &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;FtpTestServer&lt;/span&gt;&lt;span style="background: white; color: black"&gt;: &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;IDisposable
&lt;/span&gt;&lt;span style="background: white; color: black"&gt;{
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;private readonly &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;Process &lt;/span&gt;&lt;span style="background: white; color: black"&gt;ftpProcess;

    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;public &lt;/span&gt;&lt;span style="background: white; color: black"&gt;FtpTestServer(&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;string &lt;/span&gt;&lt;span style="background: white; color: black"&gt;rootDirectory, &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;int &lt;/span&gt;&lt;span style="background: white; color: black"&gt;port = 21, &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;bool &lt;/span&gt;&lt;span style="background: white; color: black"&gt;allowUploads = &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;true&lt;/span&gt;&lt;span style="background: white; color: black"&gt;)
    {
        &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;psInfo = &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;new &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;ProcessStartInfo
            &lt;/span&gt;&lt;span style="background: white; color: black"&gt;{
                FileName = &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;AppDomain&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.CurrentDomain.BaseDirectory + &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"\\ftpdmin.exe"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;,
                Arguments = &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;String&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.Format(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"-p &lt;/span&gt;&lt;span style="background: white; color: #3cb371"&gt;{0} &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;-ha 127.0.0.1 \"&lt;/span&gt;&lt;span style="background: white; color: #3cb371"&gt;{1}&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;\" &lt;/span&gt;&lt;span style="background: white; color: #3cb371"&gt;{2}&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;, port, rootDirectory, allowUploads ? &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;string&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.Empty : &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"-g"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;),
                WindowStyle = &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;ProcessWindowStyle&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.Hidden
            };
        ftpProcess = &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;Process&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.Start(psInfo);
    }

    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;public void &lt;/span&gt;&lt;span style="background: white; color: black"&gt;Dispose()
    {
        &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black"&gt;(ftpProcess.HasExited) &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;return&lt;/span&gt;&lt;span style="background: white; color: black"&gt;;
        ftpProcess.Kill();
        ftpProcess.WaitForExit();
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Now you can enjoy being able to write really clean integration testing code that starts and FTP server every time you run your tests and then tear it down when your test is done.&lt;/p&gt;
&lt;p&gt;An example integration test showing connecting to “127.0.0.1”:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: black"&gt;[&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;TestMethod&lt;/span&gt;&lt;span style="background: white; color: black"&gt;]
&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;public void &lt;/span&gt;&lt;span style="background: white; color: black"&gt;FtpCode_Upload_CanConnect()
{
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;try
    &lt;/span&gt;&lt;span style="background: white; color: black"&gt;{
        &lt;/span&gt;&lt;span style="background: white; color: green"&gt;// Fire up a new Ftp server instance
        &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black"&gt;(&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;new &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;FtpTestServer&lt;/span&gt;&lt;span style="background: white; color: black"&gt;(rootDirectory: &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"./"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;))
        {
            &lt;/span&gt;&lt;span style="background: white; color: green"&gt;// code that talks to an FTP server on 127.0.0.1
        &lt;/span&gt;&lt;span style="background: white; color: black"&gt;}
    }
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;catch &lt;/span&gt;&lt;span style="background: white; color: black"&gt;(&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;WebException &lt;/span&gt;&lt;span style="background: white; color: black"&gt;e)
    {
        &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;Assert&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.Fail(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"Failed to connect to our FTP server"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;);
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;How awesome is that?&lt;/p&gt;
&lt;p&gt;The power of using FTPDMIN is that it can be told to deny write permissions to simulate bad user permissions as well:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: black"&gt;[&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;TestMethod&lt;/span&gt;&lt;span style="background: white; color: black"&gt;]
&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;public void &lt;/span&gt;&lt;span style="background: white; color: black"&gt;FtpCode_Upload_ThrowsWebException()
{
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;try
    &lt;/span&gt;&lt;span style="background: white; color: black"&gt;{
        &lt;/span&gt;&lt;span style="background: white; color: green"&gt;// Fire up a new Ftp server instance
        &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black"&gt;(&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;new &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;FtpTestServer&lt;/span&gt;&lt;span style="background: white; color: black"&gt;(rootDirectory: &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"./"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;, allowUploads: &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;false&lt;/span&gt;&lt;span style="background: white; color: black"&gt;))
        {
            &lt;/span&gt;&lt;span style="background: white; color: green"&gt;// code that talks to an FTP server on 127.0.0.1
        &lt;/span&gt;&lt;span style="background: white; color: black"&gt;}
    }
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;catch &lt;/span&gt;&lt;span style="background: white; color: black"&gt;(&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;WebException &lt;/span&gt;&lt;span style="background: white; color: black"&gt;e)
    {
        &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;Assert&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.Fail(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"Our code failed to upload a file because of invalid permissions"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;);
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;All in all the above has been a complete life saver when it comes to making my integration test projects portable – if a new developer joins my project, they instantly get access to my FTP test harness just by pulling down my project’s source code.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=1pt2LEuJPW8:UMHOIhYzVjs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=1pt2LEuJPW8:UMHOIhYzVjs:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=1pt2LEuJPW8:UMHOIhYzVjs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=1pt2LEuJPW8:UMHOIhYzVjs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/65MJZmCBEXI" height="1" width="1"/&gt;</description><pubDate>9/26/2012 7:16:32 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/09/26/integration-testing-ftp-connections-in-net</feedburner:origLink></item><item><title>The Pitfalls of Cut and Paste Coding</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/8HvxTn-XtnA/the-pitfalls-of-cut-and-paste-coding</link><description>&lt;p&gt;We’ve all been guilty of it in our development careers at one time or another. When starting out using a language or framework that you’ve never used before you often have no choice but to. What I’m talking about is the act of “copy paste coding”, and it’s as common in the programming world as chewing gum under seats. When you copy and paste other developer’s code into your application it’s important to fully understand what the code does before you continue; or risk joining the many fools that have gone before you.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/01b35d21-6804-456d-a3aa-7a2e036f5ee6_image_4.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 15px 0px 15px 15px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/9b09cac8-f059-41e8-b2ae-4b42d5795798_image_thumb_1.png" width="244" height="234"&gt;&lt;/a&gt;When I was in primary school there was a really smart kid in our class; let’s call him Joshua. He got top marks pretty much all the time. My class also had a not-so-smart kid called David; to be fair there were a few Davids in my year group in primary school. David was the kind of kid who’d do anything for a shortcut, so he used to sit horizontally behind Joshua and take notes from his test sheets every time we had a Maths test. Primary school obviously seemed a lot harder when you were 10.&lt;/p&gt; &lt;p&gt;This went on for a couple of months; remember that I mentioned that Joshua was a pretty switched on kid and hadn’t missed the gist of what was going on. So one day we had another test and we all sat down and got stuff in. Joshua smashed the test in only 10 of the 60 minutes we had been given – to say he made us all feel inferior when he put his pencil down was an understatement.&lt;/p&gt; &lt;p&gt;After a slight pause, he then preceded to pull out a second test sheet and &lt;em&gt;really &lt;/em&gt;start his test. Joshua had taken two test sheets and written fake answers to &lt;em&gt;all&lt;/em&gt; the questions in the test. &lt;/p&gt; &lt;p&gt;The look of shock on David’s face was priceless.&lt;/p&gt; &lt;h3&gt;Time to go on Safari&lt;/h3&gt; &lt;p&gt;Recently a lot of the sites that I look after have been receiving some &lt;em&gt;serious &lt;a href="http://code.google.com/p/elmah/" target="_blank"&gt;ELMAH&lt;/a&gt;&lt;/em&gt; spam. So much so that I've had to &lt;a href="http://www.diaryofaninja.com/blog/2011/09/20/adding-filters-to-your-elmah-installation" target="_blank"&gt;implement ELMAH filters&lt;/a&gt; just to get the Signal-to-noise ratio of my application’s exceptions back to a manageable threshold.&lt;/p&gt; &lt;p&gt;The offending exception that I've continually seen:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;i&gt;System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client (:).&lt;/i&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So someone is making bad requests to my web applications.&lt;/p&gt; &lt;p&gt;From looking at my ELMAH logs over time this is from a number of &lt;em&gt;different&lt;/em&gt; sources ion different IP address ranges around the globe.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;All of them have the same pattern to their exception.&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Request Path Info: ”https:/mywebsite.com/” &lt;br&gt;User agent: ”Test Certificate Info”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;They are all missing the second “/” in the https:// of my SSL site’s addresses.&lt;/p&gt; &lt;p&gt;So I think to myself:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“Why the hell does every site that I manage that uses SSL seem to be getting the same exceptions?”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;My exceptions where all for &lt;em&gt;different &lt;/em&gt;websites on a number of &lt;em&gt;different &lt;/em&gt;servers.&lt;/p&gt; &lt;p&gt;So someone out there is scanning websites with a piece of code that puts bad paths into URLs, and uses the user-agent string “&lt;strong&gt;Test Certificate Info&lt;/strong&gt;”.&lt;/p&gt; &lt;h3&gt;Following the paper trail&lt;/h3&gt; &lt;p&gt;So I set out on the interwebs in search of answers.&lt;/p&gt; &lt;p&gt;I can’t be the only one experiencing this?&lt;/p&gt; &lt;p&gt;And It turns out that &lt;em&gt;I’m not&lt;/em&gt;. It seems that more than a few of us are &lt;a href="http://stackoverflow.com/questions/3097248/what-software-is-sending-user-agent-test-certificate-info" target="_blank"&gt;experiencing the same thing&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;One of the responses to the above linked StackOverflow post seems to nail what has happened:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“… &lt;br&gt;My guess someone read &lt;a href="http://blogs.msdn.com/b/jpsanders/archive/2009/04/17/how-to-get-certificate-information-using-wininet-apis.aspx"&gt;this&lt;/a&gt; and didn't end up changing the example code.&lt;br&gt;…”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The link in the quote above is to an MSDN C++ article that walks through making an SSL request – but until recently the code sample on the MSDN post had an error that wrote an invalid Http header while making its request.&lt;/p&gt; &lt;p&gt;And therein lies the problem.&lt;/p&gt; &lt;h3&gt;A copy of a copy, of a copy, of a copy&lt;/h3&gt; &lt;p&gt;Just like my not-so-intelligent primary schoolmate David mentioned earlier, when whoever wrote the piece of software that’s been visiting my sites was cranking out code in a haze of Doritos and Pepsi, they copied someone else’s work – and with it they copied a bug.&lt;/p&gt; &lt;p&gt;Unlike David however when you’re a developer this is pretty normal behaviour and wouldn’t be considered unsavoury at all – hell, open source breeds on the act of copying.&lt;/p&gt; &lt;p&gt;However there is one thing that &lt;em&gt;like David&lt;/em&gt; we all have to be careful of, as copying other developers code from the internet does have it’s own set risks that you need to be aware of.&lt;/p&gt; &lt;p&gt;If you copy someone else’s code and you &lt;em&gt;don’t fully understand what it is doing&lt;/em&gt;, then you probably aren’t in a place to use it in a production environment. &lt;/p&gt; &lt;p&gt;Whoever wrote the web spider that is out there indexing all my SSL website’s and causing my ELMAH error spam obviously didn’t note the issue in the code sample they copied from. Like them if you do the same, you might end up with a piece of code in your application that simply makes you look like an amateur.&lt;/p&gt; &lt;p&gt;And it doesn’t have to be that way.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.codinghorror.com/blog/2007/03/the-works-on-my-machine-certification-program.html" target="_blank"&gt;Jeff Atwood&lt;/a&gt; and &lt;a href="http://weblogs.asp.net/jgalloway/" target="_blank"&gt;John Galloway&lt;/a&gt; started adding the following badge of certification to code samples nearly 5 years ago:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/d923bde7-b882-46b1-9121-e3d05f04d778_image_2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/18d972de-b210-4eb4-a1df-4a187b78dfd5_image_thumb.png" width="198" height="192"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The above image was basically a sarcastic joke at the fact that a lot of code in world has simply &lt;em&gt;not really been properly tested&lt;/em&gt;. And I don’t meant test-driven, test-first level tested – I mean the level of testing where it hasn’t really ever been used outside of simply knocking together a proof of concept sample for a blog post.&lt;/p&gt; &lt;p&gt;I’ve been guilty of this before when I’ve posted things on this very blog that have needed an update after the fact.&lt;/p&gt; &lt;p&gt;So if you’re out there copying code from other developers, open source projects or blog posts – make sure you read the logic you borrow thoroughly, take the time to understand it, and for your own sake make sure you test anything that spiders websites all over the internet before you hit the launch button.&lt;/p&gt; &lt;p&gt;My event logs will thank you.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=FpQNt0jekFE:9bdVipWjhqs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=FpQNt0jekFE:9bdVipWjhqs:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=FpQNt0jekFE:9bdVipWjhqs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=FpQNt0jekFE:9bdVipWjhqs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/8HvxTn-XtnA" height="1" width="1"/&gt;</description><pubDate>10/2/2012 7:51:49 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/10/02/the-pitfalls-of-cut-and-paste-coding</feedburner:origLink></item><item><title>Teaching Your Application to Read</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/1fVrwps9N6U/teaching-your-application-to-read</link><description>&lt;p&gt;Geeky salesman have spent decades selling us a pipedream of the end of “Tree based communication”. To date not much has changed and I’m not holding my breath. In the mean time, what do we do with all this paper? If like me you are dabbling with ways to get your code to convert the physical to the digital, I’ve got news for you: Smarter people have already solved the problem for you and it’s simply a matter of plug and play.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/45a6d94d-3847-40bb-b1c0-7edfb012e7c3_image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 15px 0px 15px 15px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/91c5987e-5818-4c7a-99ca-77a6d8b995d3_image_thumb_1.png" width="160" height="240"&gt;&lt;/a&gt;There is part of the world that us computer nerds often tend to hate. Hard copy. A physical information format you can actually hold in your non-&lt;a href="http://en.wikipedia.org/wiki/Neo_(The_Matrix)" target="_blank"&gt;Neo&lt;/a&gt; physical hands, Paper. I haven’t just gone out and become a print/paper guy overnight, but I have been playing with a project that takes paper in and gives digital goodness out, because whether you subscribe to reality or not, the plain and simple fact is this medium isn’t going anywhere soon.&lt;/p&gt; &lt;h3&gt;Let me get my glasses&lt;/h3&gt; &lt;p&gt;Building apps that &lt;em&gt;behave&lt;/em&gt; like humans is hard. Building ones that &lt;em&gt;see the world and interpret it like we do&lt;/em&gt; is even harder – it’s because of this that developers at Google, Microsoft and many other large companies have invested so heavily in projects like &lt;a href="http://www.google.com/recaptcha" target="_blank"&gt;reCAPTCHA&lt;/a&gt; so that they can try and teach computers to read the way humans do.&lt;/p&gt; &lt;p&gt;But what if you happen to not have millions in research funding, computer scientists filling your development teams, and still want to add the ability for your app to &lt;em&gt;read&lt;/em&gt; documents and structured handwriting?&lt;/p&gt; &lt;p&gt;This is where OCR software comes in, and more directly for us developers, OCR software that offers an easy to use API for plugging your app into its 20/20 vision. A great tool for achieving this is the &lt;a href="http://www.abbyy.com.au/flexicapture_engine/" target="_blank"&gt;ABBYY FlexiCapture SDK&lt;/a&gt; which allows you to quickly add both document OCR, and even more interestingly document recognition and categorization to your apps. This means not only does your app quickly gain the ability to read documents, invoices and printed handwriting, but also the ability to act like a mail clerk and categorize any of your documents for later storage and review.&lt;/p&gt; &lt;h3&gt;Standing on the Shoulders of Giants&lt;/h3&gt; &lt;p&gt;Whenever you plug in a third party API into your project you get a pretty good view of how much they’ve thought about how us lowly code monkeys will consume their product/service. To put a point on it, less is more, I want to get up and using a product with as little friction as possible. The chaps at ABBYY have ticked the box here and you can get a feel for their API by taking a look at what is involved in converting the following image into machine readable XML. All I have to do is scan the image once to create a &lt;a href="http://www.abbyy.com.au/flexicapture_engine/data_capture_stages/document_analysis/" target="_blank"&gt;Document Definition&lt;/a&gt; with parts of the document I’d like to capture and its off to the races. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/106004be-214c-49dd-a16b-75519c975009_image_6.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/7d759d99-3c4d-499e-962d-96ab3b2dff01_image_thumb_2.png" width="240" height="152"&gt;&lt;/a&gt;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: black"&gt;&lt;/span&gt;&lt;span style="color: black"&gt;[&lt;/span&gt;&lt;span style="color: #2b91af"&gt;DllImport&lt;/span&gt;&lt;span style="color: black"&gt;(&lt;/span&gt;&lt;span style="color: #a31515"&gt;"FCEngine.dll"&lt;/span&gt;&lt;span style="color: black"&gt;, CharSet = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CharSet&lt;/span&gt;&lt;span style="color: black"&gt;.Unicode), &lt;/span&gt;&lt;span style="color: #2b91af"&gt;PreserveSig&lt;/span&gt;&lt;span style="color: black"&gt;]
&lt;/span&gt;&lt;span style="color: blue"&gt;private static extern int &lt;/span&gt;&lt;span style="color: black"&gt;InitializeEngine(&lt;/span&gt;&lt;span style="color: blue"&gt;string &lt;/span&gt;&lt;span style="color: black"&gt;devSN, &lt;/span&gt;&lt;span style="color: blue"&gt;string &lt;/span&gt;&lt;span style="color: black"&gt;reserved1, &lt;/span&gt;&lt;span style="color: blue"&gt;string &lt;/span&gt;&lt;span style="color: black"&gt;reserved2, &lt;/span&gt;&lt;span style="color: blue"&gt;out &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IEngine &lt;/span&gt;&lt;span style="color: black"&gt;engine);
[&lt;/span&gt;&lt;span style="color: #2b91af"&gt;DllImport&lt;/span&gt;&lt;span style="color: black"&gt;(&lt;/span&gt;&lt;span style="color: #a31515"&gt;"FCEngine.dll"&lt;/span&gt;&lt;span style="color: black"&gt;, CharSet = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CharSet&lt;/span&gt;&lt;span style="color: black"&gt;.Unicode), &lt;/span&gt;&lt;span style="color: #2b91af"&gt;PreserveSig&lt;/span&gt;&lt;span style="color: black"&gt;]
&lt;/span&gt;&lt;span style="color: blue"&gt;private static extern int &lt;/span&gt;&lt;span style="color: black"&gt;DeinitializeEngine();

&lt;/span&gt;&lt;span style="color: blue"&gt;void &lt;/span&gt;&lt;span style="color: black"&gt;ProcessImage()
{
    &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IEngine &lt;/span&gt;&lt;span style="color: black"&gt;engine = &lt;/span&gt;&lt;span style="color: blue"&gt;null&lt;/span&gt;&lt;span style="color: black"&gt;;
    InitializeEngine(&lt;span style="color: #a31515"&gt;"SWAT1000000000000000&lt;span style="color: #a31515"&gt;"&lt;/span&gt;&lt;/span&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;null&lt;/span&gt;&lt;span style="color: black"&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;null&lt;/span&gt;&lt;span style="color: black"&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;out &lt;/span&gt;&lt;span style="color: black"&gt;engine);

    &lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;&lt;span style="color: black"&gt;processor = engine.CreateFlexiCaptureProcessor();
&lt;br&gt;&lt;br&gt;&lt;br&gt;    &lt;/span&gt;&lt;span style="color: green"&gt;//Add our definition file
    &lt;/span&gt;&lt;span style="color: black"&gt;processor.AddDocumentDefinitionFile(&lt;/span&gt;&lt;span style="color: #a31515"&gt;"LicenceseDefinition.fcdot"&lt;/span&gt;&lt;span style="color: black"&gt;);

    &lt;/span&gt;&lt;span style="color: green"&gt;//Add an image to scan
    &lt;/span&gt;&lt;span style="color: black"&gt;processor.AddImageFile(&lt;/span&gt;&lt;span style="color: #a31515"&gt;"license.jpg"&lt;/span&gt;&lt;span style="color: black"&gt;);
    &lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;&lt;span style="color: black"&gt;document = processor.RecognizeNextDocument();

    &lt;/span&gt;&lt;span style="color: green"&gt;//output a file "LicenseOutput.xml" with the results of the scan
    &lt;/span&gt;&lt;span style="color: black"&gt;processor.ExportDocumentEx(document, &lt;/span&gt;&lt;span style="color: #a31515"&gt;"MyOutputFolder"&lt;/span&gt;&lt;span style="color: black"&gt;, &lt;/span&gt;&lt;span style="color: #a31515"&gt;"LicenseOutput.xml"&lt;/span&gt;&lt;span style="color: black"&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;null&lt;/span&gt;&lt;span style="color: black"&gt;);
    DeinitializeEngine();
}&lt;/span&gt;&lt;span style="color: black"&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Output:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&lt;span style="color: black"&gt;" &lt;/span&gt;&lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;UTF-8&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;form:Documents &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:form&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;http://www.abbyy.com/FlexiCapture/Schemas/Export/FormData.xsd&lt;/span&gt;&lt;span style="color: black"&gt;"
                &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:addData&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;http://www.abbyy.com/FlexiCapture/Schemas/Export/AdditionalFormData.xsd&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;_License:_License &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:_License&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;http://www.abbyy.com/FlexiCapture/Schemas/Export/License.xsd&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;_License&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;_Name&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: black"&gt;McLOVIN&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;_Name&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;_DriversLicenseNumber&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: black"&gt;01-47-87441&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;_DriversLicenseNumber&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;_AddressLine1&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: black"&gt;892 MOMONAST&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;_AddressLine1&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;_AddressLine2&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: black"&gt;HONOLULU, HI 96820&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;_AddressLine2&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;_IssueDate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: black"&gt;06/18/1998&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;_IssueDate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;_License&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;_License:_License&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;form:Documents&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;As a Web Developer by trade I don’t spend much of my time close to the bare metal, so although the use of calls to unmanaged code shown above makes me feel a little dirty,&amp;nbsp; the fact that I only need such a tiny amount of code to get me to a working solution makes it even more worth my while. &lt;/p&gt;
&lt;p&gt;And before you go thinking I’ve spent hours and hours with the product, luckily for me ABBYY has been nice enough to provide a huge bunch of working code samples in their SDK pack. Code Samples are the commercial equivalent of providing access to their unit tests so you can see how to &lt;em&gt;actually build stuff&lt;/em&gt;. Less than 10 minutes in, and I have my app scanning fake Hawaiian drivers licenses – Awesome!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/7fd6adf4-1dbc-45fc-8692-1ec18846798b_image_8.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/3358c894-14b8-48f6-8c6c-a1eb97bd0793_image_thumb.png" width="454" height="165"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Although I won’t be covering it in this blog post, one of the more exciting features that comes along with the FlexiCapture SDK, is the ability to &lt;em&gt;&lt;a href="http://www.abbyy.com.au/flexicapture/what_is_new/" target="_blank"&gt;self learn&lt;/a&gt;&lt;/em&gt; documents that you feed it. As if all those warnings &lt;a href="http://en.wikipedia.org/wiki/Sarah_Connor_(Terminator)" target="_blank"&gt;Sarah Connor&lt;/a&gt; gave us had fallen on deaf ears…&lt;/p&gt;
&lt;h3&gt;Input/Output&lt;/h3&gt;
&lt;p&gt;You’ll note that in my code above I load a JPEG image into the FlexiCapture SDK as a source, but if you’re scanning documents, screenshots, video frames, or even a blurry smart phone photo the FlexiCapture SDK can take in a feast of formats in all sorts of quality and DPI:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PDF 
&lt;li&gt;Bitmap 
&lt;li&gt;PCX 
&lt;li&gt;JPEG Black and white 
&lt;li&gt;JPEG 2000 (12 subformats) 
&lt;li&gt;TIFF (10 subformats) 
&lt;li&gt;GIF (Because we all take high rez photos/scans as GIF these days) 
&lt;li&gt;PNG 
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/DjVu" target="_blank"&gt;DjVu&lt;/a&gt; 
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/JBIG2" target="_blank"&gt;JBIG2&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;This means you can easily write applications that take all sorts of image or scanner data in and give you easy to read data out – you can easily see how receiving faxed, emailed or uploaded images from disparate sources becomes a lot easier for your application to make sense of. Once its taken a peak at your incoming data sources it can then pump data out in a whole bunch of &lt;em&gt;other&lt;/em&gt; formats that support structure data. Take a look at my &lt;a href="https://www.facebook.com/mclovinr0" target="_blank"&gt;McLovin&lt;/a&gt; output in a bunch of formats:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CSV Text File&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/04f1fc68-412b-4725-9004-59d7208850d0_image_10.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/312b52c1-1f30-464a-905e-484a4f32a2a5_image_thumb_3.png" width="454" height="68"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Excel File&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/cf869b9b-bd3e-479f-8c2f-1f8f1e58ba65_image_12.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/0e415d31-7f9f-4edd-8dd2-feec835af76e_image_thumb_4.png" width="454" height="176"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A full dBase Database&lt;/strong&gt; (thanks to &lt;a href="http://www.alexnolan.net/software/dbf.htm" target="_blank"&gt;DBF Viewer Plus&lt;/a&gt; for allowing me to even see this!)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/3ad5caea-e7b1-4f69-8f19-9246dbf00ec9_image_14.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/d20624b5-dfdc-45a9-a449-71dd4adc927d_image_thumb_5.png" width="454" height="231"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It also allows export to XML (shown in my initial classy sample), and a whole heap of image formats as well – although seeing you’ve just imported an image this might not come in overly handy unless for archival.&lt;/p&gt;
&lt;p&gt;You do get the picture though – ABBYY FlexiCapture isn’t just a one trick pony, but more a Swiss Army knife for character recognition and image to text scanning.&lt;/p&gt;
&lt;p&gt;What makes this even more powerful is that it does all of the above recognition input/output trickery in &lt;strong&gt;&lt;a href="http://www.abbyy.com.au/flexicapture_engine/technical_specifications/" target="_blank"&gt;198 languages.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;That’s right, I said:&lt;/p&gt;
&lt;h1&gt;&lt;/h1&gt;
&lt;blockquote&gt;
&lt;h2&gt;198 languages!!!!&lt;/h2&gt;&lt;/blockquote&gt;
&lt;p&gt;This is priceless when you consider that &lt;a href="http://news.nationalgeographic.com/news/2004/02/0226_040226_language.html" target="_blank"&gt;91% of the world&lt;/a&gt; doesn’t speak (and therefore write) in English so I'm blown away by this number.&lt;/p&gt;
&lt;h3&gt;Included Tooling&lt;/h3&gt;
&lt;p&gt;We really should have listened to &lt;a href="http://en.wikipedia.org/wiki/Sarah_Connor_(Terminator)" target="_blank"&gt;Sarah Connor&lt;/a&gt;, as one of the coolest features of the ABBYY FlexiCapture SDK is that it &lt;em&gt;auto learns&lt;/em&gt; documents for later classification. If you are scanning large amounts of documents, it can learn to read and classify new types of documents simply by you feeding them through the API – handy for times when a supplier or client changes the design of their invoicing.&lt;/p&gt;
&lt;p&gt;For everything else there is a great set of included tooling, with apps for classifying documents, defining new document definitions, and as a reviewer making changes to captured text that might not have the best confidence level; They even have a form designer in case you would like to create new forms for later scanning.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/b1ead048-87fd-4d98-b7b3-87d6d74291ef_image_20.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/7d6bf091-8241-4294-b27a-aab4cc0ed604_image_thumb_8.png" width="244" height="112"&gt;&lt;/a&gt;&lt;br&gt;&lt;em&gt;The review console&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/8d847f6d-c9b3-43c1-b08e-618345df37f2_image_22.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/a01f6597-cf06-45d5-a5e3-ce1c1dee8c26_image_thumb_9.png" width="244" height="193"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The document definition studio for defining fields&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/9f2932ef-003c-4c11-8828-911c936d7d70_image_28.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/4336251b-ee09-499c-b70b-79541001b8dd_image_thumb_12.png" width="244" height="185"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Form designer in action&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;If you’re working on a .Net project that needs to consume paper data sources such as forms, invoices, or emailed ID information for later review, the ABBYY FlexiCapture SDK is definitely worth taking a look at for your next OCR project. I know that the speed to get up and running really did make my life easier, and all of the tooling that comes along with it made the product feel like a very complete solution. As a c# guy the only negative I would say about the whole experience is the fact that the c# API requires the use of non-native code, although when considering the amount of image processing and &lt;em&gt;heavy grunt work&lt;/em&gt; that the API must be doing in the background to pull off it’s magic I understand why this decision was made. &lt;/p&gt;
&lt;p&gt;Now we just need to figure out a way to stop &lt;a href="http://terminator.wikia.com/wiki/Judgment_Day" target="_blank"&gt;Judgement Day&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr&gt;
I received the product mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the &lt;a href="http://www.access.gpo.gov/nara/cfr/waisidx_03/16cfr255_03.html"&gt;Federal Trade Commission's 16 CFR, Part 255: "Guides Concerning the Use of Endorsements and Testimonials in Advertising."&lt;/a&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=ggTpCR_8n84:wMruKw1ROo8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=ggTpCR_8n84:wMruKw1ROo8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=ggTpCR_8n84:wMruKw1ROo8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=ggTpCR_8n84:wMruKw1ROo8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/1fVrwps9N6U" height="1" width="1"/&gt;</description><pubDate>11/28/2012 4:03:06 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/11/28/teaching-your-application-to-read</feedburner:origLink></item><item><title>Reaching The Internet Event Horizon</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/sehsNGfLJZQ/reaching-the-internet-event-horizon</link><description>&lt;p&gt;For the last 15 odd years we have continually expanded the amount of information available at our finger tips year on year exponentially. Thank you Internet for all your glorious contributions to our lives. Only recently has staying connected to the internet on a Mobile really started to take this to a level where I can truly say that I really am "connected on the go" and as far as technological achievements go that is a pretty amazing achievement to witness in our lifetimes.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/6fea0654-60c1-45cd-a624-9ecadc9bffab_image_13.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/4b501b1f-5b76-4fa6-a9fb-2472b199f6a3_image_thumb_5.png" width="240" height="60"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;When I first connected to the internet I did so by walking down to my local computer store down the street and purchasing prepaid vouchers from a local ISP called Microplex. It was one of those small hole in the wall white box stores of the late 90’s. As a teenager obsessed with computing this local PC store was my own little technological Mecca. For the value price of $39.95 my pocket money unlocked 10 hours of unlimited #EFNET IRC chats and late night school assignment “assistance”.&lt;/p&gt; &lt;p&gt;All at the break neck speed of 28.8kbp/s.&lt;/p&gt; &lt;p&gt;I needed a helmet for safety.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/e56e9698-e184-45c0-885d-8f3e8e6c03f4_image_4.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/adcf4f32-ee58-4f7b-bce9-4dc4a9df34cd_image_thumb_1.png" width="354" height="230"&gt;&lt;/a&gt;The world didn’t stand still though, and I definitely wasn’t going to intervene, so incrementally over the next very short few years I found myself taking up the past time of buying modems like they were fashion accessories.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;33kbp/s.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;56kbp/s.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;56kbps/s V.90.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;K56kbp/s.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;128kbp/s ISDN.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;1.5mbp/s ADSL.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;5mb/s Cable.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;24mb/s ADSL 2+.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;It was an ever exciting race to take part in. I’d research ways to test and ensure my phone line had the least amount of noise possible, and learnt all about things like central filters, and ISP’s had dedicated lines for different types of modems to help you squeeze as much juice as possible out of your 56kbp/s. The most interesting thing I noticed in hindsight was that somewhere between the excitement of Cable internet and ADSL 2+ something funny happened. &lt;em&gt;The Internet stopped mattering&lt;/em&gt;. In the is-it-a-busy-time-of-day, am-I-waiting-for-a-page-to-load, Im-so-angry-someone-else-got-that-e-bay-item,&amp;nbsp; always connected frame of mind it simply faded into the background. The Internet was so fast that you stopped even thinking about connectivity, let alone whether anyone else in your house was about to pick up the phone.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“…&lt;/p&gt; &lt;p&gt;Mum! &lt;/p&gt; &lt;p&gt;Get off the phone, I’m in the middle of a game of MechWarrior against some British n00bs!&lt;/p&gt; &lt;p&gt;…”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I didn’t take any notice at the time but a glorious thing had occurred. &lt;/p&gt; &lt;p&gt;I had won the internet.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/b8b14198-9da5-47e0-b102-504ffd85565d_image_2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/c2ca18ea-1100-496d-a375-7c03c10249bf_image_thumb.png" width="244" height="164"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Or so I thought.&lt;/p&gt; &lt;h3&gt;Welcome to the Future&lt;/h3&gt; &lt;p&gt;In a similar but more recent time frame another speed race has also been taking place in pockets and hand bags everyone. The race for Mobile Internet speed.&lt;/p&gt; &lt;p&gt;In the past 5 years or so, Internet access on the go has moved from being a useless add-on to sell you expensive Telco plans, to being a serious value add for anyone. Staying obsessed with your friends, family, and sad-to-say work email&amp;nbsp; around the clock would never be possible without Mobile Internet. &lt;/p&gt; &lt;p&gt;As &lt;a href="http://www.hanselman.com/blog/" target="_blank"&gt;Scott Hanselman&lt;/a&gt; so eloquently put it we’ve become infatuated with the idea of it:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“…&lt;/p&gt; &lt;p&gt;&lt;a href="http://vimeo.com/39020426#t=13m30s" target="_blank"&gt;Just pull to refresh&lt;/a&gt;&lt;/p&gt; &lt;p&gt;…”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;It has become so popular to surf the Internet on your Mobile that society is becoming all too familiar with any number of new social faux pas that surround smart phone usage. Companies are even doing interesting studies to uncover meaningful nuggets like the fact that &lt;a href="http://news.cnet.com/8301-17852_3-20081595-71/study-19-percent-of-people-drop-phones-down-toilet/" target="_blank"&gt;19% of people drop their phone down the toilet&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;But I’ve still found Mobile Internet awareness to consistently be front of mind for me. Having built a number of data centric mobile apps over the last few years I’ve found that whether building apps or consuming them, the mobile internet offered by GPRS, 3G, and HSDPA+ has always made me critically aware that I was “using the Internet on my mobile”. My brain was always coming up with more questions than mobile Google could begin to answer fast enough for me on my morning commute.&lt;/p&gt; &lt;p&gt;Until today.&lt;/p&gt; &lt;p&gt;I give you: &lt;strong&gt;4G LTE&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/6b7bc73b-cd4b-4cab-a982-caea89bf1628_image_9.png" width="454" height="343"&gt;&lt;/p&gt; &lt;p&gt;After firing up my new Nokia Lumia 920 for the first time the other day I experienced something I’ve never felt since using the Internet on a mobile, I stopped being even aware of the internet. I’ve spent the last 3 days downloading, streaming, Google’ing, Skyping and generally just &lt;em&gt;getting stuff done&lt;/em&gt; on the internet&lt;em&gt;.&lt;/em&gt; And it’s all been flawless. Obviously being on my Island nation’s fastest Telco and sticking to built up areas has helped a lot with this (thanks 90’s anti-competitive Telstra monopolism), but I simply couldn’t care less. I now have faster internet on the go than I do at home and living across the road from the local phone exchange has made my ADSL 2+ connection nothing to snicker at.&lt;/p&gt; &lt;p&gt;My new Lumia 920 now downloads at an average of about 39-40&lt;strong&gt;&lt;u&gt;mb/s&lt;/u&gt;&lt;/strong&gt; (from Doug’s oober thorough testings). &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;That’s 1,388 x faster than when I first started using the Internet.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This is not only summarised as fast when compared to my home internet connection, but in human terms this is revolutionary. It means my main daily input source for information is actually able to give it to my faster than my poor little evolved brain can consume it. I am able to trigger a human &lt;a href="http://en.wikipedia.org/wiki/IOPS" target="_blank"&gt;IOPS&lt;/a&gt; issue anytime day or night on command.&lt;/p&gt; &lt;p&gt;I’m pretty sure Science would define this as meaning I have reached the Internet Event Horizon. &lt;/p&gt; &lt;p&gt;And as &lt;a href="http://www.imdb.com/title/tt0119081/" target="_blank"&gt;Sam Neill&lt;/a&gt; taught us all, when this happens there is simply &lt;a href="http://en.wikipedia.org/wiki/Event_horizon" target="_blank"&gt;no turning back.&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=n66WNr9V6Cw:s3Znal4T7N0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=n66WNr9V6Cw:s3Znal4T7N0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=n66WNr9V6Cw:s3Znal4T7N0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=n66WNr9V6Cw:s3Znal4T7N0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/sehsNGfLJZQ" height="1" width="1"/&gt;</description><pubDate>11/29/2012 2:57:16 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/11/29/reaching-the-internet-event-horizon</feedburner:origLink></item><item><title>Entity Framework Code First Migrations in Teams</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/jFRJNFQsTxA/fun-with-code-first-migrations-in-teams</link><description>&lt;p&gt;Migrating to a Code-First or Model-First approach to database development can be very liberating. At the end of the day your database is just a way of storing state, so getting away from the implementation details can really help speed up development and allow you to focus your efforts. Code First’s awesomeness aside, when you try and implement this kind of paradigm shift within a team you unlock a different set of problems. Here are two potential ways to alleviate some of the headaches.&lt;/p&gt;&lt;p&gt;Entity Framework has had a Code First approach for a little over 2 years. In that time if you’ve been surfing the net and read all the posts and reviews covering peoples experiences, you’ll come away with the view that it has become quite popular with developers everywhere. One thing you don’t see many people talking about however is how it works to use it in teams of &lt;em&gt;more than one&lt;/em&gt;. It isn’t suited to all projects that is clear, but when used correctly it can really speed up development.&lt;/p&gt;&lt;h3&gt;Implementation Details – Removed or Replaced?&lt;/h3&gt; &lt;p&gt;Entity Framework &lt;a href="http://msdn.microsoft.com/en-US/data/jj591621" target="_blank"&gt;Code First Migrations&lt;/a&gt; force you to think about your database model differently. Instead of thinking tables and columns, you simply think about your domain objects as they are - the rest will “sort itself out".&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/c9e7d9cc-bf65-47f6-8177-69c669c9cd1d_image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/9f542179-5050-49b8-beea-607695c6c6f9_image_thumb.png" width="450" height="274"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;The “old school” database first approach&lt;/em&gt;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;namespace &lt;/span&gt;&lt;span style="color: black"&gt;Blog.Data
{
    &lt;/span&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;BlogContext &lt;/span&gt;&lt;span style="color: black"&gt;: DbContext
    {
        &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: black"&gt;ICollection&amp;lt;&lt;span style="color: #2b91af"&gt;Author&lt;/span&gt;&amp;gt; Authors { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
        &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: black"&gt;ICollection&amp;lt;&lt;span style="color: #2b91af"&gt;Blog&lt;/span&gt;&amp;gt; Blogs { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
        &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: black"&gt;ICollection&amp;lt;&lt;span style="color: #2b91af"&gt;Category&lt;/span&gt;&amp;gt; Categories { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
    }
    &lt;/span&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Author
    &lt;/span&gt;&lt;span style="color: black"&gt;{
        &lt;/span&gt;&lt;span style="color: blue"&gt;public string &lt;/span&gt;&lt;span style="color: black"&gt;Name { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
        &lt;/span&gt;&lt;span style="color: blue"&gt;public virtual &lt;/span&gt;&lt;span style="color: black"&gt;ICollection&amp;lt;Blog&amp;gt; Blogs { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
    }
    &lt;/span&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Blog
    &lt;/span&gt;&lt;span style="color: black"&gt;{
        &lt;/span&gt;&lt;span style="color: blue"&gt;public string &lt;/span&gt;&lt;span style="color: black"&gt;Title { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
        &lt;/span&gt;&lt;span style="color: blue"&gt;public string &lt;/span&gt;&lt;span style="color: black"&gt;Content { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
        &lt;/span&gt;&lt;span style="color: blue"&gt;public string &lt;/span&gt;&lt;span style="color: black"&gt;Url { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
        &lt;/span&gt;&lt;span style="color: blue"&gt;public virtual &lt;/span&gt;&lt;span style="color: black"&gt;&lt;span style="color: #2b91af"&gt;Author &lt;/span&gt;Author { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
        &lt;/span&gt;&lt;span style="color: blue"&gt;public virtual &lt;/span&gt;&lt;span style="color: black"&gt;&lt;span style="color: #2b91af"&gt;Category &lt;/span&gt;Category{ &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
    }
    &lt;/span&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Category
    &lt;/span&gt;&lt;span style="color: black"&gt;{
        &lt;/span&gt;&lt;span style="color: blue"&gt;public string &lt;/span&gt;&lt;span style="color: black"&gt;Name { &lt;/span&gt;&lt;span style="color: blue"&gt;get&lt;/span&gt;&lt;span style="color: black"&gt;; &lt;/span&gt;&lt;span style="color: blue"&gt;set&lt;/span&gt;&lt;span style="color: black"&gt;; }
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;The “new” sexiness/“Domain model is all I care for” approach&lt;/em&gt; &lt;/p&gt;
&lt;p&gt;As you can see from the second approach allows you to simply stop caring for how the data is even stored, and just concentrate on your app and the model of your data as classes and properties. You create your domain objects and Entity Framework takes care of the rest. Like a lot of the additions to .Net over the past few years, this is not new, but rather borrowed from other frameworks like Ruby On Rails.&amp;nbsp; &lt;/p&gt;&lt;h3&gt;What it’s likes when working alone&lt;/h3&gt;
&lt;p&gt;When working with Code First Migrations, your work flow reeks of awesome simplicity: &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/5f567b62-853b-4d1d-bc08-e5718301d3de_image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/a04e84b3-921d-46f2-89a3-02faadb26625_image_thumb_1.png" width="350" height="248"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a dream to work with, and when you go to push between staging and production the roll up is all taken care of for you, and you simply get on with better things. This is the magic of Code First Migrations!&amp;nbsp; &lt;p&gt;The problems only begin to appear when you have more than one developer working with in a team. This is even more of a problem if your team aren’t within close enough proximity or contact to talk all the time as they can’t communicate of segregate who is updating the domain model and migrations at a time. In fact if you are using anything more than a rudimentary approach to source control this is next to impossible as you’ll always be merging codebases that started in a shared previous state. &lt;/p&gt;
&lt;p&gt;This then looks more like: &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/9336ca03-42a3-41af-a2a3-97d70e51191f_image_10.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/99fbca35-39c8-4c51-8f8c-c6a4ca736c67_image_thumb_4.png" width="600" height="468"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Did I mention that Code First Migrations does some magic behind the scenes that makes each migration aware of its “previous state” making it next to impossible to “merge” in the way you would have previously? &lt;/p&gt;
&lt;p&gt;When these migrations are then played out against your database, developer B (or whoever checks in last) and their migrations always fail as his/her migration comes from a parent domain model state that no longer exists, as the current version of the model has changed since checkout or branch. &lt;/p&gt;
&lt;p&gt;Unlike Ruby on Rails migrations, the code migrations generated by the PowerShell helper in EF Code First add an additional field that make them database state aware. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We’ve replaced one set of implementation details with another.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Magical voodoo in each of the migrations:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;string &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IMigrationMetadata&lt;/span&gt;&lt;span style="color: black"&gt;.Target
{
    &lt;/span&gt;&lt;span style="color: blue"&gt;get &lt;/span&gt;&lt;span style="color: black"&gt;{ &lt;/span&gt;&lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #a31515"&gt;"XiSR4t76Fv...G2vKGQAAA=="&lt;/span&gt;&lt;span style="color: black"&gt;; }
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;This field contains an encoded string representing the EDMX XML model of the domain model at time of migration. Entity Framework checks your database before applying every migration to ensure that the database is in the state that it thinks it was from the previous migration classes &lt;em&gt;Target&lt;/em&gt; property. This then stops migrations from occurring on a database that has changed since checkout, to avoid any data loss or confusion over elements that may have changed in both migrations. It then stores a copy of this serialised model in the system table &lt;em&gt;__MigrationHistory&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;Code First Migrations in a Team&lt;/h3&gt;
&lt;p&gt;The following two methods are process solutions to this problem. They aren’t perfect, but they do seem to make the workflow a little less frustrating at times if everyone in your team is aware of the steps and follows them – very similar to some of the workflows for branching and rebasing used in Git or Mercurial these days, after a while these steps can second nature. &lt;/p&gt;
&lt;p&gt;Both methods rely on local development databases being used by each developer separately. This approach therefore also requires &lt;a href="http://www.codeproject.com/Articles/315708/Entity-Framework-Code-First-Data-Initializers" target="_blank"&gt;seeding any testing data or 3rd party data&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Action Plan A - Automatic Migrations &lt;/h3&gt;
&lt;p&gt;The first method is based around the use of Automatic migrations while working on your local changes, and then pulling your repo down, merging any domain model changes and creating a new manual migration. &lt;/p&gt;
&lt;p&gt;This method works like:&lt;/p&gt; 
&lt;ol&gt;
&lt;li&gt;Pull down the latest Domain Model into a branch. 
&lt;li&gt;Turn on Automatic Migrations. 
&lt;li&gt;Develop, Develop, Develop. 
&lt;li&gt;Blow away your Development Database (and with it your __MigrationHistory table, and it’s state) 
&lt;li&gt;Turn automatic migrations off 
&lt;li&gt;Pull the latest trunk/master Domain Model from your Source Control repo up into your branch. 
&lt;li&gt;Merge the latest Domain Model with your local changes. 
&lt;li&gt;Add a new migration of “the difference” between the repo and your domain model. 
&lt;li&gt;Test a migration “up” on your local DB. 
&lt;li&gt;Merge your branch back into your mainline.&lt;/li&gt;&lt;/ol&gt;
&lt;h3&gt;Action Plan B - Manual Migrations &lt;/h3&gt;
&lt;p&gt;This approach is quite similar but works to allow local code first migrations during any given modification period. &lt;/p&gt;
&lt;p&gt;This method looks like: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Pull down the latest Domain Model into a branch. 
&lt;li&gt;Develop, Develop, Develop - adding as many migrations along the way. 
&lt;li&gt;Blow away your local database (and with it your __MigrationHistory table, and it’s state) 
&lt;li&gt;Delete all of your local migrations. 
&lt;li&gt;Pull the latest trunk/master Domain Model from your Source Control repo up into your branch. 
&lt;li&gt;Merge the latest Domain Model with your local changes. 
&lt;li&gt;Add single migration of “the difference” between the repo and your domain model. 
&lt;li&gt;Test a migration “up” on your local DB. 
&lt;li&gt;Merge your branch back into your mainline.&lt;/li&gt;&lt;/ol&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;The main differences between these two workflows is that the first method saves you a little bit of time between small domain model changes. This can be really handy if you have remote teams where some members are working together in the same room on the same branch/head, as it reduces a bit of friction while they are working. This also tries to bring the problem back to being just what it should be: a code merging one with your domain classes.&amp;nbsp; &lt;p&gt;I am still a big fan of Code First Migrations, and when you work with others in a team that uses them you can make some huge performance gains if you take the time to make your human processes play nicely with them. With a bit of practice the pay off is definitely worth it.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=mOPfPA2a7lc:JILsQ3oGlbE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=mOPfPA2a7lc:JILsQ3oGlbE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=mOPfPA2a7lc:JILsQ3oGlbE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=mOPfPA2a7lc:JILsQ3oGlbE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/jFRJNFQsTxA" height="1" width="1"/&gt;</description><pubDate>12/4/2012 6:09:08 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2012/12/04/fun-with-code-first-migrations-in-teams</feedburner:origLink></item><item><title>SimpleDeploy.Net - An FTP Style Wrapper for the MS Deploy API</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/PoRqP_k0TF0/simpledeploynet--an-ftp-style-wrapper-for-the-ms-deploy-api</link><description>&lt;p&gt;MS Deploy is such a powerful tool when used to keep your applications and services up to date. What is even more awesome is that the API for MS Deploy is available for you to write applications that utilise this power from within your own applications. As most people who’ve played with MS Deploy can report though, whether you’re using MSBUILD, PowerShell or the .Net API; The MS Deploy API sucks when it comes to simplicity. So after trial and error and much head banging I’ve created a wrapper for MS Deploy’s API to help you complete simple tasks with less friction.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/39ad6de8-3f0b-476f-b0bf-8a947462d561_image_4.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 10px 0px 10px 10px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/10ad1ce2-18f5-4435-8756-117969abded8_image_thumb_1.png" width="244" height="198"&gt;&lt;/a&gt;I've spent a fair bit of my personal time working on a personal project that I'll be releasing in the next few months. It involves the use of the MS Deploy API for deployment. I’ve had to get very close to the API that MS Deploy makes available, and in doing so have come to have a love/hate relationship with how it has been written.&lt;/p&gt; &lt;p&gt;MS Deploy contains a very powerful toolset but file upload and download is definitely only the tip of iceberg of this functionality. This is my problem. The team who wrote the API appears to have been so involved with the bigger problems, that the act of simply uploading a file to a remote server is a painfully long winded and hard to understand task:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Ms Deploy API Upload Example:&lt;/strong&gt;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;destinationOptions = &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;new &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DeploymentBaseOptions
&lt;/span&gt;&lt;span style="background: white; color: black"&gt;{
    ComputerName = &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"https://myserver.com:8172/msdeploy.axd?site=[MyIISWebSiteName]"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;,
    UserName = &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"myUsername"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;,
    Password = &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"myOoberSecurePassword"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;,
    UseDelegation = &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;true&lt;/span&gt;&lt;span style="background: white; color: black"&gt;,
    AuthenticationType = &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"Basic"
&lt;/span&gt;&lt;span style="background: white; color: black"&gt;};

&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;syncOptions = &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;new &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DeploymentSyncOptions &lt;/span&gt;&lt;span style="background: white; color: black"&gt;{ DoNotDelete = &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;true &lt;/span&gt;&lt;span style="background: white; color: black"&gt;};

&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;remotePath = &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;String&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.Format(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"&lt;/span&gt;&lt;span style="background: white; color: #3cb371"&gt;{0}&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;/&lt;/span&gt;&lt;span style="background: white; color: #3cb371"&gt;{1}&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;, &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"[MyIISWebsiteName"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;, &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"theRemoteFilePathToSaveTo.txt"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;);

&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black"&gt;(&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;localFile = &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DeploymentManager&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.CreateObject(&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DeploymentWellKnownProvider&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.ContentPath, &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;@"C:\temp\fileToUpload.txt"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;))
{
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;result = localFile.SyncTo(&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DeploymentWellKnownProvider&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.ContentPath, remotePath, destinationOptions, syncOptions);
    &lt;/span&gt;&lt;span style="background: white; color: green"&gt;//if (result.ObjectsAdded == 1 || result.ObjectsUpdated == 1) everything has worked
&lt;/span&gt;&lt;span style="background: white; color: black"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;h3&gt;Welcome SimpleDeploy.Net&lt;/h3&gt;
&lt;p&gt;So I took the liberty of making it easier for people like me who just want to &lt;em&gt;freekin-upload-some-files&lt;/em&gt;. I haven’t looked back.&lt;/p&gt;
&lt;p&gt;SimplyDeploy.Net is a very simply library with 4 simple methods:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: blue"&gt;public &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DeploymentObjectList &lt;/span&gt;&lt;span style="background: white; color: black"&gt;FetchFileList(&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;ConnectionProperties &lt;/span&gt;&lt;span style="background: white; color: black"&gt;properties)
&lt;span style="background: white; color: blue"&gt;public bool &lt;/span&gt;&lt;span style="background: white; color: black"&gt;DownloadFile(&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;ConnectionProperties &lt;/span&gt;&lt;span style="background: white; color: black"&gt;properties, &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;string &lt;/span&gt;&lt;span style="background: white; color: black"&gt;relativeRemoteFileName, &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;string &lt;/span&gt;&lt;span style="background: white; color: black"&gt;fullLocalFilePathToSave)
&lt;span style="background: white; color: blue"&gt;public bool &lt;/span&gt;&lt;span style="background: white; color: black"&gt;UploadFile(&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;ConnectionProperties &lt;/span&gt;&lt;span style="background: white; color: black"&gt;properties, &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;string &lt;/span&gt;&lt;span style="background: white; color: black"&gt;relativeDestinationFileName, &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;string &lt;/span&gt;&lt;span style="background: white; color: black"&gt;fullLocalFilePath)
&lt;span style="background: white; color: blue"&gt;public bool &lt;/span&gt;&lt;span style="background: white; color: black"&gt;DeleteFile(&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;ConnectionProperties &lt;/span&gt;&lt;span style="background: white; color: black"&gt;properties, &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;string &lt;/span&gt;&lt;span style="background: white; color: black"&gt;relativeRemoteFileName)
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;It uses the &lt;em&gt;ContentPath &lt;/em&gt;WebDeploy provider to make all of its remote calls in keeping with Visual Studio 2012’s Web Deploy Publishing Profile support. Hopefully this will allow for the most coverage from servers/sites that already support this.&lt;/p&gt;&lt;h3&gt;Getting it&lt;/h3&gt;&lt;p&gt;It is released under MS-PL so is fine for commercial use.&lt;/p&gt;&lt;p&gt;Either download the source from GitHub - &lt;a title="https://github.com/dougrathbone/simpledeploynet" href="https://github.com/dougrathbone/simpledeploynet"&gt;https://github.com/dougrathbone/simpledeploynet&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Or install using NuGet:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/c3fd23bd-a9e5-4b26-9cdc-7d1fc48ededc_image_2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/b7cfbfae-3e15-4265-89e6-fc0f623af2f3_image_thumb.png" width="481" height="78"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=fZJNjsURs0o:N8HYlLMP3qU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=fZJNjsURs0o:N8HYlLMP3qU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=fZJNjsURs0o:N8HYlLMP3qU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=fZJNjsURs0o:N8HYlLMP3qU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/PoRqP_k0TF0" height="1" width="1"/&gt;</description><pubDate>1/5/2013 11:36:59 PM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2013/01/05/simpledeploynet--an-ftp-style-wrapper-for-the-ms-deploy-api</feedburner:origLink></item><item><title>Mobile, Tablet and Desktop Development All at The Same Time</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/AjR9sglBSMw/mobile-tablet-and-desktop-development-all-at-the-same-time</link><description>&lt;p&gt;When you go to create a mobile app for each major platform you quickly realise that it’s a mind boggling task with many languages and tools out there to learn along the way. A number of products have arrived over the last few years that enable you the freedom of only having to care about one language and toolset, with the dream being that they take care of the rest. Does this type of approach work? DXTREME does a pretty good job of making the answer to this question Yes.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/5789dc70-a21c-42ac-9ce7-67185cb37c4c_image_26.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 15px 15px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/39966e5b-c4d4-42f5-b1a4-029086f6fab9_image_thumb_12.png" width="244" height="184"&gt;&lt;/a&gt;A recent product I've been playing with is called &lt;a href="http://www.devexpress.com/Subscriptions/DXperience/dxtreme.xml" target="_blank"&gt;DXTREME&lt;/a&gt; from DevExpress. For US$899, it sells itself as enabling you to create hybrid apps for iOS, Android, Windows 8 and the web all in one toolset with a single codebase. While this is not necessarily something new, DevExpress does more than just cross compilation taking it further by also augmenting your app’s design so that you can create native &lt;em&gt;looking&lt;/em&gt; apps for each platform without having to do so much heavy lifting. One codebase, but your iOS app look like a cocoa-touch interface, and your Android app follows similar modern droid device specific design patterns. &lt;/p&gt; &lt;h3&gt;Developing for the Web, when it’s not developing for the Web.&lt;/h3&gt; &lt;p&gt;When I first set out on my cross-platform adventure, I did a lot of reading on the DXTREME tooling from DevExpress. I soon came to realise that it is really a framework and tooling package for writing mobile apps by wrapping itself around &lt;a href="http://phonegap.com/" target="_blank"&gt;Apache Cordova (PhoneGap)&lt;/a&gt;, and then adding Visual Studio support for build, design and emulation. And this is a &lt;em&gt;good thing&lt;/em&gt;. PhoneGap has been around for a considerable amount of time. It’s stable and accepted as a robust solution for mobile development. What has been &lt;em&gt;extremely lacking&lt;/em&gt; with PhoneGap on Windows to date is that there hasn’t really been any good IDE support for it – and this is where DXTREME knocks it out of the park. So much so that even if it did nothing else I’d buy it just for this: it adds PhoneGap support to Visual Studio, including when using Visual Studio’s Designer and Script Debugging features.&lt;/p&gt; &lt;p&gt;Because the apps that DXTREME produces are really hybrid HTML and JavaScript apps, in essence you’re writing a single page HTML/JavaScript application (SPA). I’d hazard a guess that these two languages are the most well known in the world, making it easy for developers of all skill levels to get in and have a go at app development. Like Microsoft did with ASP.Net MVC, DevExpress have also used technology that is already commonplace in your web development toolbox, with the apps created by DXTREME using a number of common JavaScript frameworks like jQuery, Knockout and jQuery Globalize.&lt;/p&gt; &lt;p&gt;Another area where DXTREME stops being just PhoneGap is where, as I mentioned above, it adds a hell of a lot of custom CSS and JavaScript magic to make your app’s view pages look &lt;em&gt;platform specific&lt;/em&gt; so that your users will never know that you didn’t write separate applications for each platform. It does all of this without you lifting a finger – this in itself is a very nifty trick.&lt;/p&gt; &lt;p&gt;An example page and it’s code:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: maroon"&gt;div &lt;/span&gt;&lt;span style="background: white; color: red"&gt;data-dx-role&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;="view" &lt;/span&gt;&lt;span style="background: white; color: red"&gt;data-dx-name&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;="Index" &lt;/span&gt;&lt;span style="background: white; color: red"&gt;data-dx-title&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;="Home"&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: maroon"&gt;div &lt;/span&gt;&lt;span style="background: white; color: red"&gt;data-dx-target-placeholder&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;="content"&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: maroon"&gt;p &lt;/span&gt;&lt;span style="background: white; color: red"&gt;style&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;="&lt;/span&gt;&lt;span style="background: white; color: red"&gt;padding&lt;/span&gt;&lt;span style="background: white; color: black"&gt;: &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;5px&lt;/span&gt;&lt;span style="background: white; color: black"&gt;;&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;"&amp;gt;
            &lt;/span&gt;&lt;span style="background: white; color: black"&gt;My First DXTREME mobile app.       
        &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: maroon"&gt;p&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: maroon"&gt;p &lt;/span&gt;&lt;span style="background: white; color: red"&gt;style&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;="&lt;/span&gt;&lt;span style="background: white; color: red"&gt;padding&lt;/span&gt;&lt;span style="background: white; color: black"&gt;: &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;5px&lt;/span&gt;&lt;span style="background: white; color: black"&gt;;&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;"&amp;gt;
            &lt;/span&gt;&lt;span style="background: white; color: black"&gt;Cross device development is off-the-chain!
        &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: maroon"&gt;p&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: maroon"&gt;div&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: maroon"&gt;div&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;What this looks like when exported to iPhone, iPad, Android Phone, and Microsoft Surface. &lt;em&gt;Note the platform specific look and feel&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/4b517c4f-4e99-47a2-8d4a-7c29f11fb950_image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/d59016f6-828f-431c-a635-421a0c2a305b_image_thumb.png" width="172" height="240"&gt;&lt;/a&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/9dac23a4-243a-4664-adf3-3f69d3943f25_image_6.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/f541a541-fb91-4685-a729-687f2baec832_image_thumb_2.png" width="187" height="240"&gt;&lt;/a&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/3553e305-732c-403f-93e5-b9b92b4c2709_image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/570bad01-9ce5-435a-9aaa-3bb3bd50b172_image_thumb_1.png" width="173" height="240"&gt;&lt;/a&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/905ae3dd-1a0d-43b3-af4d-8562d0dd3828_image_8.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/66954d06-664a-4961-8e1b-f4b0de3dacca_image_thumb_3.png" width="240" height="184"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On top of the cross device design features. The built in Visual Studio Emulator that the above screens have come from supports an impressive list of devices to help you get a better feel for how your app will look:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;iPhone 4 
&lt;li&gt;iPhone 5 
&lt;li&gt;iPad 
&lt;li&gt;iPad mini 
&lt;li&gt;iPad 3 
&lt;li&gt;Nexus Galaxy 
&lt;li&gt;Galaxy Tab 
&lt;li&gt;Nexus 7 
&lt;li&gt;MS Surface&lt;!--EndFragment--&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;You have to admit, this is a huge list of emulation devices when you’re only having to maintain a &lt;em&gt;single codebase.&lt;/em&gt; &lt;/p&gt;
&lt;h3&gt;Hello World.&lt;/h3&gt;
&lt;p&gt;Taking a look at when you first fire up Visual Studio after installing DXTREME, if you go to create a new project you are met with a few new project templates:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/1b17ddc8-5ad4-498e-afd1-5883bc8a03e0_image_10.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/576dd4c0-b271-4284-b01d-d9cdde29ac9b_image_thumb_4.png" width="604" height="374"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The first two are cross platform applications, the first being a basic template that has a single project that cross compiles to multiple devices and the second is a template that helps you scaffold your application based on an OData domain model from a remote (or local) web service. &lt;/p&gt;
&lt;p&gt;This is an interesting choice of approach for a scaffolding data source, and when I first played with it I tested with the &lt;a href="http://data.stackexchange.com/" target="_blank"&gt;Stack Exchange public OData sources&lt;/a&gt; as I didn’t have any OData services on my speed dial list.&amp;nbsp; Although I understand that OData is a great way to plug in a web-accessible data source, the fact that there is no other data source supported by the scaffolding tool feels a little limiting, especially if you require any form of more advanced authentication support for your remote data.&lt;/p&gt;
&lt;p&gt;The second two templates are actually the solution to the above short-coming in that they are scaffolding project templates for WCF web services that allow you to serve out OData. These templates themselves are scaffolded from an Entity Framework data source. This means that even if you don't have an OData service today, the tooling tries hard to make sure this doesn’t slow you down too much.&lt;/p&gt;
&lt;h3&gt;Getting Answers&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/2bef42c7-f98c-4baf-aeaf-e92f1359688a_image_12.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 15px 15px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/da94f931-d0c3-41b1-8757-117ae8f6f665_image_thumb_5.png" width="244" height="163"&gt;&lt;/a&gt;When you learn any new tool or framework I often get a little worried when it comes to how fast you can get up and writing application code. While DXTREME is off to a good start with the very fact that they use HTML and JavaScript for their language support, the auto-magical cross-device CSS and JavaScript components where still new to me. It worried me that I would be spending time learning (banging my head against a wall?) an abstraction when I really could be learning the real thing by spending time using Objective-C or Java – but I was in luck because there appears to&amp;nbsp; a fair bit of official &lt;a href="http://help.devexpress.com/HTML/#!Overview" target="_blank"&gt;documentation&lt;/a&gt; for their framework items.&lt;/p&gt;
&lt;p&gt;The rest of the components used are in their original states. jQuery is the real thing, using Knockout for MVVM model binding is also the exact same as can be downloaded from their &lt;a href="http://knockoutjs.com/" target="_blank"&gt;website&lt;/a&gt;. You can also upgrade these files out-of-band by downloading the latest versions of them, although one feature that I missed was being able to use Nuget to add Knockout and jQuery as packages for easy upgrading (Visual Studio wouldn’t let me open the package manager for the DXTREME project type) – I hope they add this support in a later version.&lt;/p&gt;
&lt;p&gt;There are documentation posts and examples of using jQuery and Knockout literally everywhere over the internet; This was a great move in choosing to use common frameworks.&lt;/p&gt;
&lt;p&gt;The same goes for any of the device specific hardware calls, as these are completed by the PhoneGap/Apache Cordova wrapper so documentation can also found easily &lt;a href="http://phonegap.com/developer" target="_blank"&gt;all over the place&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Hardware Interaction&lt;/h3&gt;
&lt;p&gt;Modern smart phones often require you to get a bit closer to the metal when you’re planning on writing code that talks to the hardware on the device. Maybe you want to use the device camera to take a photo, or ask the location services on the device for your current GPS co-ordinates. How do you do this when you’re just writing an HTML app though? HTML and JavaScript don’t have support for hardware interaction at this level yet, and device specific APIs for iPhone, Android and Surface are all different, so how does a DXTREME app allow you to take a photo?&lt;/p&gt;
&lt;p&gt;Luckily the heavy lifting is done elsewhere thanks to the PhoneGap framework which has had long running support for this already: &lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: blue"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black"&gt;takePhoto() {
    navigator.camera.getPicture(onSuccess, onFail, { quality: 50 });
}

&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black"&gt;onSuccess(imageData) {
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;image = document.getElementById(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;'photo'&lt;/span&gt;&lt;span style="background: white; color: black"&gt;);
    image.src = &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"data:image/jpeg;base64," &lt;/span&gt;&lt;span style="background: white; color: black"&gt;+ imageData;
}

&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black"&gt;onFail(message) {
    alert(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;'Failed because: ' &lt;/span&gt;&lt;span style="background: white; color: black"&gt;+ message);
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Local storage is taken care of by a similar augmented JavaScript connection to the database technology SQLite, which runs the only slightly cut down &lt;a href="http://www.sqlite.org/lang.html" target="_blank"&gt;SQLite SQL spec&lt;/a&gt;:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;db = window.openDatabase(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"Database"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;, &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"1.0"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;, &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"My App"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;, 200000);
&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black"&gt;queryDB(tx) {
    db.executeSql(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;'SELECT * FROM MYCONTACTSTABLE'&lt;/span&gt;&lt;span style="background: white; color: black"&gt;, [], querySuccess, errorCB);
}

&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black"&gt;querySuccess(tx, results) {
    alert(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"Contacts found in DB: " &lt;/span&gt;&lt;span style="background: white; color: black"&gt;+ results.rows.length);
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Of all the hardware devices that DXTREME supports through use of PhoneGap, the only thing that lets this down a little is support for these technologies in the Emulator. It would be great for there to be support for each of the device hardware wrappers inside the emulator to make it easier to test and debug without deploying to a device. Being JavaScript this can easily been bootstrapped for testing.&lt;/p&gt;
&lt;h3&gt;Squashing Bugs&lt;/h3&gt;
&lt;p&gt;While talking about testing and debugging hardware it’s worth taking a look at how debugging works for a DXTREME app, as they’ve created a pretty innovative approach to this mundane task.&lt;/p&gt;
&lt;p&gt;Debugging a DXTREME app works very similarly to a normal Single Page Application you develop for the Web. You start your app inside Visual Studio, which fires up your favourite browser, but instead of looking at your app directly, it gives you a very cool abstracted emulator view that allows you to switch between devices (and therefore DXTREME hybrid views):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/0c71fbfc-551e-481e-8864-1075d95da1ee_image_14.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/51d514f2-f86c-4d57-a786-7721796476e5_image_thumb_6.png" width="304" height="173"&gt;&lt;/a&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/1af51bd2-bff5-4b96-9dd5-c69c34b6aa59_image_16.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/01014022-aed3-48cb-b587-b294521e3c7f_image_thumb_7.png" width="304" height="173"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Navigating your app, and debugging it’s JavaScript operates just as if you were debugging a JavaScript app. As I use a combination of Firefox or Chrome’s debugging tools this works perfectly for me, but if you use Internet Explorer this means that you have full support for the &lt;a href="http://msdn.microsoft.com/en-us/library/7seh8d72.aspx" target="_blank"&gt;Visual Studio Script debugging&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Another interesting thing to note is if you look at my screen shots you’ll see a QR Code in the emulator (bottom left):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/39c8db63-007d-46f5-8130-aa4463a6bf0e_image_18.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/f6bc2be1-4cff-4ea2-866b-9f5143fd8b46_image_thumb_8.png" width="187" height="203"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you scan this with your device you’ll be able to play with the app using a slick Reverse Proxy technology that routes requests to your local IDE/dev environment through DevExpress’s website, and although you can’t test device specific functions such as camera and location services this way, if you download the &lt;a href="http://community.devexpress.com/blogs/aspnet/archive/2012/09/17/dxtreme-courier-app-free-ios-app-helps-you-deploy-and-test-mobile-apps.aspx" target="_blank"&gt;iPhone “Courier” app&lt;/a&gt; from DevExpress, you can test all of this native functionality in the same way by scanning the QR Code (apparently an Android app is on the way soon, no word on Surface or Windows Phone support yet).&lt;/p&gt;
&lt;h3&gt;Getting it on a Device&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/5d1e0ed4-387c-442f-93fe-081bb0dcbc8e_image_20.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 15px 15px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/a3ebe7be-3cbd-40f6-b515-2525b4189ad5_image_thumb_9.png" width="244" height="127"&gt;&lt;/a&gt;Once you’ve developed your app, whittled away your bugs, and are ready to actually try your app on a device DXTREME also appears to have you covered with Integrated Application packaging built into Visual Studio. From your application’s properties page you can assign App icons, add your Android signing certificate and iOS Publishing Profile and actually build an iOS IPA or Android APK package.&lt;/p&gt;
&lt;p&gt;This blew me away. In the past I didn’t know there was any way to build iOS apps &lt;em&gt;on Windows&lt;/em&gt;. Regrettably you still can’t actually test publish your app to an iOS device without a Mac, but as with many Apple development traditions, this is an Apple-dictated hurdle rather than a DXTREME shortcoming.&lt;/p&gt;
&lt;p&gt;Also, because you are really developing an app that sits on top of PhoneGap, you can also leverage a service like &lt;a href="https://build.phonegap.com/" target="_blank"&gt;PhoneGap Build&lt;/a&gt; to take some of the hassle out of bundling your application. For Android this can be handy: PhoneGap Build allows you to download the app onto your device from the Web once it's finished."&lt;/p&gt;
&lt;h3&gt;In the End&lt;/h3&gt;
&lt;p&gt;If I was to dream up my own cross-platform development tool tomorrow it wouldn’t be anywhere near as good, or as feature-rich, as the product that DevExpress has created in DXTREME. The thoughtful way in which the framework has been designed to use common languages and JS frameworks makes it a breeze to pick up, and the heavy Visual Studio integration alone makes it worth looking at purchasing just to help speed up any current PhoneGap development you might be doing.&lt;/p&gt;
&lt;p&gt;When developing cross platform apps learning a hybrid development framework raises questions: Does this approach really work? Does it &lt;em&gt;actually &lt;/em&gt;make you more productive? Is it worth learning a language that is native? After spending a few weeks with DXTREME, I believe strongly &lt;em&gt;my answer &lt;/em&gt;to these questions is a resounding Yes. As it’s easy for you to try it for yourself, why not go check out the &lt;a href="http://www.devexpress.com/Home/try.xml" target="_blank"&gt;free trial&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr&gt;
I received the product mentioned above for free in the hope that I would mention it on my blog. Regardless of this, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the &lt;a href="http://www.access.gpo.gov/nara/cfr/waisidx_03/16cfr255_03.html"&gt;Federal Trade Commission's 16 CFR, Part 255: "Guides Concerning the Use of Endorsements and Testimonials in Advertising."&lt;/a&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=XIzR05YaCkU:dVBSN5cn9AM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=XIzR05YaCkU:dVBSN5cn9AM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=XIzR05YaCkU:dVBSN5cn9AM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=XIzR05YaCkU:dVBSN5cn9AM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/AjR9sglBSMw" height="1" width="1"/&gt;</description><pubDate>1/16/2013 3:55:43 PM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2013/01/16/mobile-tablet-and-desktop-development-all-at-the-same-time</feedburner:origLink></item><item><title>Why Nuget Package Restore’s Not For Me</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/UeeuZfzncZI/why-nuget-package-restorersquos-not-for-me</link><description>&lt;p&gt;Nuget has become such a valuable part of the .Net ecosystem it's any wonder how we got the job done with 3rd party packages without it. When working on projects in a team many developers turn on Nuget Package Restore to save them having to check their packages into Source Control. This allows them to have their packages download whenever a new developer goes to build. It’s also quite popular with project teams that have Continuous Integration setup. I recommend against Nuget Package Restore, as I’m simply not a fan.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/35249c25-e7b5-40ab-b024-12489d21f15e_image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 15px 15px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/72b6b333-fff7-4c3a-b386-91330da9ccb2_image_thumb.png" width="244" height="164"&gt;&lt;/a&gt;"Awesome Sauce on Every Build"&lt;/h3&gt;
&lt;p&gt;When Nuget was first released the majority developers in .Net land rejoiced. No longer would we have to download, checkout, test and build third party open source libraries. We also didn’t have to worry about keeping them up to date. More importantly it also put a number of .Net developer’s minds at ease, as the next time they struck up conversation with someone they knew from the land of Ruby on Rails they finally had a response when the topic turned to discussions about their mystical "&lt;a href="http://rubygems.org/" target="_blank"&gt;Gems&lt;/a&gt;"!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages" target="_blank"&gt;Nuget Package Restore&lt;/a&gt; soon followed Nuget and allowed us to easily have our packages downloaded on every build without having to store your package binaries in your source control. This makes it easier to share projects with fellow developers as you only need to send &lt;em&gt;your code&lt;/em&gt;. With Nuget Package Restore your build server can also happily "fill in the blanks" for any packages that it was missing every time it went to build a new release for you.&lt;/p&gt;
&lt;p&gt;I argue that not all of this glittery stuff that comes with Nuget Package Restore is gold, and I actually think it teaches bad habits and causes any number of issues that didn’t exist before it graced our developer bat belts. As I haven’t heard anyone raise much comment in line with my line of thinking I thought I'd vent the only way a guy from the internet like me can. A whingey Blog post.&lt;/p&gt;
&lt;h3&gt;Faster Builds&lt;/h3&gt;
&lt;p&gt;The first and simplest reason I’m not a fan of Nuget Package Restore is how it affects build times in teams where you’re using Continuous Integration (i.e really any team that understands the value that CI brings; if you haven’t taken a look, &lt;a href="/blog/2010/05/09/automated-site-deployments-with-teamcity-deployment-projects-amp-svn"&gt;now is the time&lt;/a&gt;). When using a build server, large projects take time to finish building. Your build server has to download your source, build your binaries, run your unit tests, any integration tests and optionally deploy your application. Every second counts.&lt;/p&gt;
&lt;p&gt;A large solution may take many minutes to finish building and testing. If your build server has to download packages on every build you’re simply stealing valuable time away from yourself, as you are just extending the time it takes to have your unit tests fail, and therefore give you less time to troubleshoot any bugs you’ve introduced from your last check in. By removing the need to download your Nuget Packages you instantly speed up your build to the breakneck speed of…&lt;/p&gt;
&lt;p&gt;Wait for it…&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The speed you had in the dark old ages you checked in your binaries (&lt;em&gt;shock horror!&lt;/em&gt;).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The only time adding binaries to your source control doesn’t speed you up dramatically is in certain situations where you are using DVCS like as Git or Mercurial. Over time it may slow down your clones on large repositories. But like most things, this is just an excuse to not dig deeper. There &lt;em&gt;are&lt;/em&gt; ways to work around these issues by using techniques such as using &lt;a href="http://git-scm.com/book/en/Git-Tools-Submodules" target="_blank"&gt;Git submodules&lt;/a&gt; to store binaries in another repo.&lt;/p&gt;
&lt;h3&gt;Reliability&lt;/h3&gt;
&lt;p&gt;This is actually my number one reason for steering clear of Nuget Package Restore. If Nuget.org is down, your builds are down.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“… As if that’ll ever happen, the gains are worth the risk…”&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;But my opinion is you’d be wrong. Case in point is the fact that there has been 2 periods where Nuget.org has been down for a few hours each just this month alone (January 2012):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/nuget/status/289888268852531200"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/9811727b-aa43-4b47-83b2-b58b1d722dfa_image_13.png" width="244" height="70"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/nuget/status/296041685958422528"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/3dbe0bcb-a172-4fa8-9a76-94d2914dee0f_image_10.png" width="244" height="85"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and it gets worse:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/nuget/status/296048739494273024"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/3144225f-8676-4f57-a215-2aa584210c4e_image_7.png" width="244" height="100"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So if I interpret this for you: If you share your project with anyone or try and do an automated build on your build server and Nuget.org is down, you’re &lt;em&gt;fresh out of luck!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Peter Newhook summarises this well:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/p337er/status/289904989038579713"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/9f832786-7c3e-4f29-aad3-a93518fbb9af_image_16.png" width="244" height="102"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This isn’t a reflection of Nuget.org – we don’t pay for the service. After I experienced this for the first time, I realised that using Nuget.org as a build dependency wasn’t something I could put my team or clients up against. And the solution was simple: I checked in my Nuget packages, avoided Nuget Package Restore and never thought about it again.&lt;/p&gt;
&lt;h3&gt;Control Over Dependency Versioning&lt;/h3&gt;
&lt;p&gt;Another thing with Nuget Package Restore that I’m not the biggest fan of is the way it effects your ability to ensure your QA teams they don't need to take another look after a build.&lt;br&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/1eed5a0f-e704-4ae6-9f9c-282bf7d56d14_image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 15px 15px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/caef66bc-6be2-430b-87d6-f44fc91100a5_image_thumb_1.png" width="203" height="207"&gt;&lt;/a&gt;&lt;br&gt;When you’re working with a set of binaries on your local environment and then check your code in without the packages you were using, my gut feeling is that there is no absolute way of knowing that the very same binaries will be used by your team mates or the packages downloaded by your continuous integration environment. You are ceding control of this to the Nuget gods. If one day Nuget just happened to serve a different package to your team mate or build server bugs may be introduced. At this point you've unnecessarily introduced a roadblock.&lt;/p&gt;
&lt;p&gt;Like my other complaints, this problem is one that’s easily avoided if you just check your packages in, and turn off Nuget package restore.&lt;/p&gt;
&lt;p&gt;Ask yourself, what happens if the next time you open an old project and you no longer can download the package because it’s been removed from Nuget? Or if there is a technical difficulty at Nuget that stops you from getting it.&lt;/p&gt;
&lt;h3&gt;Laws of Continuous Integration&lt;/h3&gt;
&lt;p&gt;This brings me to my final and probably most passionate reason for wanting to avoid Nuget Package Restore: I feel that having your solution depend on remote dependencies breaks one of the elementary rules of Continuous Integration/Deployment and Source Control usage. To me this rule is one of the most important rules I try to live and die by as a developer:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“… Source control is number one in both configuration and logic storage. A new developer needs to be able to have everything in a state where they can load it up in 1 command, and deploy it with another…”&lt;/p&gt;
&lt;p&gt;-&lt;a href="/blog/2011/03/07/another-look-at-continuous-deliverycontinuous-deployment"&gt;Evan Bottcher&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Living by this thinking dictates that what is in your source control is more than just &lt;em&gt;your code&lt;/em&gt;. Your application is code, configurations, dependencies, and &lt;em&gt;anything needed to build your application&lt;/em&gt;. I’ve heard some people even say that they suggest placing their IDE and any tooling they use &lt;em&gt;in their source control&lt;/em&gt;. This kind of thinking definitely includes your packages. If a new team member can’t get the folder for your solution and be ready to roll, I get the feeling I’ve divided by zero with the universe. This may just be a personal thing for me, but it feels pretty sacrilegious to do it any other way.&lt;/p&gt;
&lt;h3&gt;Rewind the Clock, and Check-in&lt;/h3&gt;
&lt;p&gt;If you’re like me and consider any of the above to not sit right with you, and any of the annoyances or inconveniences that using Nuget package Restore can bring along for the ride when you use it doesn’t feel like it’s worth it, then I’d suggest you follow my lead and avoid using Nuget Package Restore in a production environment. Check in your packages, it’s that easy.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Update 3rd February 2013.&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;I’ve received a fair few messages on Twitter about this post. So I thought I’d take the time to clarify a few things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This post is about &lt;strong&gt;Nuget Package Restore&lt;/strong&gt; – not Nuget.&lt;br&gt;I love Nuget, and have very little else to say about it; even though Nuget does go down from time to time, it’s acceptable. On the other hand, I strongly feel that you should be checking in your packages instead of having Nuget Package Restore download them on your build server or when new developers start using your project. 
&lt;li&gt;I understand there are a few ways you can make the situation a little better. This doesn’t change my view.&lt;br&gt;You can install a package server locally. You could cache or backup your Nuget cache folder. None of these solve the biggest issue I have in that you don’t have everything your project needs to build included in Source Control. 
&lt;li&gt;I mention that the speed on your build is important, and that Nuget Package Restore slows this down slightly. I didn’t back this up with data – If I wanted to make a big point out of it I should have. This wasn’t my main concern though. I mentioned you’d get faster builds if you check in your packages. This should be the case if you have 1 package, 10 packages, slow internet, fast internet etc – so I didn’t really feel the need to go into too much detail. If I have more time I will take the time to write about it soon.
&lt;li&gt;As with everything I blog about, this post is my opinion. You may feel differently about the topic. This is OK. It doesn’t mean that I’m saying that “If you use Nuget Package Restore, you’re an idiot”, but it does mean that I think you might either not be fully aware of what using Nuget Package Restore means for your project, or you do and are OK with it. Keep on!&lt;/li&gt;&lt;/ul&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=GVgj6HQOX0k:wgE6NEYuAEY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=GVgj6HQOX0k:wgE6NEYuAEY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=GVgj6HQOX0k:wgE6NEYuAEY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=GVgj6HQOX0k:wgE6NEYuAEY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/UeeuZfzncZI" height="1" width="1"/&gt;</description><pubDate>1/31/2013 5:41:14 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2013/01/31/why-nuget-package-restorersquos-not-for-me</feedburner:origLink></item><item><title>All Bugs Are Not Created Equal</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/31K0W3NEgfI/all-bugs-are-not-created-equal</link><description>&lt;p&gt;You’re close to shipping and you receive a shopping list of bugs and changes. Some are tiny and un-eventful, some are show stoppers, some let the bad guys in, and some are simply scope creep trying to sneak through the door. It’s hard to know where to start without reclassifying them because the majority of them are all labelled &lt;font color="#ff0000"&gt;C&lt;strong&gt;ritical&lt;/strong&gt;&lt;/font&gt;. It’s time to sit down with whoever documented your bugs and do some talking…&lt;/p&gt; &lt;h3&gt;Listening to The Little Things&lt;/h3&gt; &lt;p&gt;&lt;a href="http://addictedtohumans.deviantart.com/art/The-world-is-too-loud-305641550"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 15px 15px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/01e7541b-9a6c-43ac-8198-427e2650c605_image_8.png" width="354" height="201"&gt;&lt;/a&gt;I’ve got a secret to share that might make you snicker at me: I used to be a DJ. I played in clubs, and spent large amounts of time and money on music. I still have gear at home to keep the dream alive whenever I feel like playing some &lt;em&gt;&lt;a href="http://www.youtube.com/watch?v=J02-BtZ1bxE" target="_blank"&gt;Electro&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;One of the things you might &lt;em&gt;not&lt;/em&gt; have thought about when it comes to DJ’ing is what it’s like to be in a pumping club &lt;em&gt;in the booth&lt;/em&gt;. &lt;/p&gt; &lt;p&gt;You have all of the club’s sound system in front of you playing towards the back wall. Loudly.&lt;/p&gt; &lt;p&gt;You have your booth monitor (speaker) turned up louder than the club music so you can hear it “in time” without you mistakenly thinking it’s playing 1 second later because it’s bounced off the back wall. &lt;/p&gt; &lt;p&gt;You also have your head phones on with the next song playing in time, again &lt;em&gt;slightly louder than the booth monitor&lt;/em&gt;. &lt;/p&gt; &lt;p&gt;It gets loud. &lt;/p&gt; &lt;p&gt;As the night goes on and your ears get tired, you fight yourself to &lt;strong&gt;not&lt;/strong&gt; turn everything up louder so that you can still hear everything clearly. This is why DJ’s commonly get &lt;a href="http://en.wikipedia.org/wiki/Tinnitus"&gt;Tinnitus&lt;/a&gt; – everything gets so loud that you struggle to tell the difference between different sounds as you start to go deaf.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Badly prioritised Bugs have the same effect.&lt;/p&gt;&lt;/blockquote&gt; &lt;h3&gt;Signal/Noise Ratio&lt;/h3&gt; &lt;p&gt;Humans are amazing at prioritising if given relevant context information, however when we’re under pressure both project managers, clients and developers alike often fall into the trap of miss-prioritisation with the end result being a wall of “must have” fixes.&lt;/p&gt; &lt;p&gt;When looking back on these situations it’s understandable to see why some of us respond this way. We’re often dealing with a set of &lt;em&gt;not so good&lt;/em&gt; circumstances such as:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;The application needs to go into production a day from now.&lt;/li&gt; &lt;li&gt;There are still things you’re working with your testers on that are fundamental. Maybe you don’t even &lt;em&gt;have&lt;/em&gt; testers…&lt;/li&gt; &lt;li&gt;Maybe the design or BA team decided a week ago that part of the site needs to change in functionality before it ships.&lt;/li&gt; &lt;li&gt;But: Everything still &lt;em&gt;needs &lt;/em&gt;to be complete in around 24 hours.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;In the above situation anyone without any formal guidance, training or experience may easily class “The menu has to be blue before launch” at the same priority as “there is a bug that stop some users from completing the checkout process”.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“…I mean; you understand. This &lt;em&gt;must &lt;/em&gt;be completed before we go live…”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;To most of us who’ve been here before this seems ridiculous. But in hindsight these situations always look 20/20 – experience simply means you’ve had this 20/20 vision a few times before.&lt;/p&gt; &lt;p&gt;Whatever side of these situations you sit on, classifying bugs and any of the stress or lack of clarity around doing so subsides if your team agrees up front to classifications for bugs.&lt;/p&gt; &lt;blockquote&gt; &lt;h3&gt;Get Your Priorities Straight&lt;/h3&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://leanagilechange.com/leanagilewiki/index.php?title=File:Emergency.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 15px 15px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/f03cd084-0805-40cf-bfc0-4e6c025431a5_image_5.png" width="244" height="205"&gt;&lt;/a&gt;Every company and software product is different and because of this you should look within your own team and work to not only define the labels for bugs, but how you come to these decisions. Something everyone can agree on. &lt;/p&gt; &lt;p&gt;A common way of doing this is called &lt;a href="http://leanagilechange.com/leanagilewiki/index.php?title=Cost_of_Delay" target="_blank"&gt;Cost Of Delay&lt;/a&gt; (COD for short), and basically it outlines a framework to asses how important a bug is to the business’s bottom line. &lt;/p&gt; &lt;p&gt;If I use my original example of “The menu has to be blue before launch, a web design agency that has a strong design focus probably has a much higher COD for implementing such a fix than a back-of-office internal developer team. They sell a service of being pixel and colour perfect every time. For context though the same web design agency still probably classify this bug as having a lower COD than “the site doesn’t load at all on a major browser”. It’s not rocket science, but when you think about it using this approach it takes the emotion away. Your designer should understand this just as well as your CEO.&lt;/p&gt; &lt;p&gt;Another good place to look for inspiration on how you classify bugs in your team is by looking towards what others are doing in this space.&lt;/p&gt; &lt;p&gt;If you want to see how some of the big guys do it, take a look at &lt;a href="http://www.mediawiki.org/wiki/Bugzilla/Fields" target="_blank"&gt;Bugzilla&lt;/a&gt;. This system take care of bugs for Firefox, the Linux Kernel, Gnome, Apache and Open Office.&lt;/p&gt; &lt;p&gt;While they classify bugs into similar simple categories, they also work hard to define how they come about these decisions – this kind of straight forward classification should be agreed up front in every team before you start a project.&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2" width="600" border="1"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="300"&gt;&lt;strong&gt;Severity&lt;/strong&gt;&lt;/td&gt; &lt;td valign="top" width="300"&gt;&lt;strong&gt;Meaning&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="300"&gt;Blocker&lt;/td&gt; &lt;td valign="top" width="300"&gt;Blocks further development and/or testing work.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="300"&gt;Critical&lt;/td&gt; &lt;td valign="top" width="300"&gt;Crashes, loss of data (internally, not your edit preview!) in a widely used and important component.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="300"&gt;Major&lt;/td&gt; &lt;td valign="top" width="300"&gt;Major loss of function in an important area.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="300"&gt;Normal&lt;/td&gt; &lt;td valign="top" width="300"&gt;Default/average.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="300"&gt;Minor&lt;/td&gt; &lt;td valign="top" width="300"&gt;Minor loss of function, or other problem that does not affect many people or where an easy workaround is present.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="300"&gt;Trivial&lt;/td&gt; &lt;td valign="top" width="300"&gt;Cosmetic problem like misspelled words or misaligned text which does not really cause problems.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="300"&gt;Enhancement&lt;/td&gt; &lt;td valign="top" width="300"&gt;Request for a new feature or change in functionality for an existing feature.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;h3&gt;I Doug, do solemnly swear…&lt;/h3&gt; &lt;p&gt;Before my next project kicks off I’m going to set out a standard for how my team plans to classify bugs – and more importantly agree on a definition on what falls into these classifications. &lt;/p&gt; &lt;p&gt;When next entering bugs into your bug tracking system stop and ask yourself “Is it stopping my application working?”, “How does this compare to other blocking bugs” and other reasonable questions before hitting submit. Work to keep your bug list’s Signal/Noise ratio in a state where everyone can still prioritise correctly.&lt;/p&gt; &lt;p&gt;Your other team members will all thank you for it – Probably because they’ll all be able to still hear at the end of the project.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=Iy_z4JJOQFg:y7pRj2KXmFM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=Iy_z4JJOQFg:y7pRj2KXmFM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=Iy_z4JJOQFg:y7pRj2KXmFM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=Iy_z4JJOQFg:y7pRj2KXmFM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/31K0W3NEgfI" height="1" width="1"/&gt;</description><pubDate>2/7/2013 5:30:30 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2013/02/07/all-bugs-are-not-created-equal</feedburner:origLink></item><item><title>Get Your Thinking Caps On –# AppFest Sydney</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/qvsrnk2hmqo/get-your-thinking-caps-on-ndash-appfest-sydney</link><description>&lt;p&gt;This weekend a bunch of like minded people are getting together to hack on Windows 8 and Windows Phone to create some awesome applications and win sweet sweet prizes. You can be one of them – so why don’t you come rock out with Microsoft, eat and drink on the house and create some app awesomeness.&lt;/p&gt; &lt;p&gt;&lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032542904&amp;amp;Culture=en-AU&amp;amp;community=0"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/9695d3f3-5c39-4c5f-a82a-0496429ec60b_image_3.png" width="604" height="292"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Price&lt;/strong&gt;: Free &lt;p&gt;&lt;strong&gt;When&lt;/strong&gt;: 9:00am – 9:00pm on Saturday 16 February 2013 and 10:00am – 5:00pm on Sunday 17 February 2012 &lt;p&gt;&lt;strong&gt;Where&lt;/strong&gt;: UNSW Kensington Campus – Scientia Conference &amp;amp; Events Centre in the Tyree Room &lt;p&gt;The plan for the weekend:&lt;/p&gt; &lt;h5&gt;&lt;strong&gt;Saturday 16th February&lt;/strong&gt;&lt;/h5&gt; &lt;p&gt;09:30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Doors open / Registration &lt;p&gt;10:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Welcome &lt;p&gt;10:15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Design Keynote – Shane Morris, Automatic Studios &lt;p&gt;11:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hacking and Design prototyping &lt;p&gt;13:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lunch &lt;p&gt;18:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dinner &lt;p&gt;21:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Doors close &lt;h5&gt;&lt;strong&gt;Sunday 17th February&lt;/strong&gt;&lt;/h5&gt; &lt;p&gt;09:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Doors open &lt;p&gt;12:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BBQ Lunch &lt;p&gt;13:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Demonstrators prepare &lt;p&gt;14:30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; App demos &lt;p&gt;16:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Success keynote – Vaughan Knight, Nokia &lt;p&gt;16:30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Prizes announced &lt;p&gt;17:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Doors close &lt;p&gt;As a Windows Phone developer I’m really excited to see what apps come from this weekends inspiration and hard work. If you’re a start up, have an idea but no idea on how to create it or just want to come check it out register and come along.&lt;/p&gt; &lt;p&gt;I have the privilege of being a Microsoft Invited mentor over the weekend and will be wandering around helping out where I can, so If you see me please come say hi.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=XKqIVN7dZ98:DpGiIxJO2vQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=XKqIVN7dZ98:DpGiIxJO2vQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=XKqIVN7dZ98:DpGiIxJO2vQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=XKqIVN7dZ98:DpGiIxJO2vQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/qvsrnk2hmqo" height="1" width="1"/&gt;</description><pubDate>2/11/2013 5:19:36 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2013/02/11/get-your-thinking-caps-on-ndash-appfest-sydney</feedburner:origLink></item><item><title>Music to Your Ears - Fixing the Win 8 Music App</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/Cbe3fY5JurA/music-to-your-ears--fixing-the-win-8-music-app</link><description>&lt;p&gt;Windows 8 comes with some pretty awesome new toys, one of these for me is the Music app. As a Windows phone user for many years now I’ve fallen in love with the all-you-can-eat music subscription service that Microsoft has on offer. Sadly for me when I installed Windows 8 the app simply crashed every time I tried to play music. I searched for months and months, and now have the answer – in the hope that I save someone else the heart ache I’m happy to share what I discovered.&lt;/p&gt; &lt;p&gt;It appears that the very issue has a lot to do with your audio drivers and whether they are signed or not. Microsoft assumes that if the drivers are unsigned, then protected audio or music and video that has been protected with DRM should not be playable – you might be an evil doer after all.&lt;/p&gt; &lt;p&gt;When Windows 8 came out to developers last August I backed everything up and jumped into the deep end. I have a Lenovo x220 and at the time only beta drivers were available – I took the risk, and flew in blind. After going around the world and back it appears that these drivers and more importantly the fact that they were unsigned, meant that I simply couldn’t play or watch content from Xbox Music.&lt;/p&gt; &lt;h3&gt;The Error&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/78b133d2-c5d7-4e5f-b1fa-1c3594d21965_image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/5d2ca2cb-2067-49d3-be48-c16a65ad12e0_image_thumb.png" width="604" height="242"&gt;&lt;/a&gt;&lt;/p&gt;&lt;pre class="code"&gt;Can’t play.
Please try again. If the problem continues, visitor &lt;a href="http://www.xbox.com/support"&gt;www.xbox.com/support&lt;/a&gt; to check for guidance.
0xc00d11cd (0x8000ffff)&lt;/pre&gt;
&lt;p&gt;It was driving me up the wall. Searches of Google simply showed many happy people talking about how awesome Xbox Music on Windows 8 was…&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;oh, the irony…&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3&gt;Solution Time&lt;/h3&gt;
&lt;p&gt;Then one day I was reading a post that someone wrote about issues they were facing with Netflix and Windows 8. The Netflix support staff mentioned something about the DRM features in Windows 8. Something clicked in my mind. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/af1c40ea-032e-4296-9765-b980ad3f42a1_image_6.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/fb93bc69-b5b5-4396-8adc-fc1cfa7aa6d9_image_thumb_2.png" width="604" height="479"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Some more Googling and a few minutes later I came across &lt;a href="http://answers.microsoft.com/en-us/surface/forum/surfwinrt-surfgetstart/xbox-music-error-0xc00d11cd-0x8000ffff/75e0b818-2a44-4e1f-99d1-7d33b7bb143b"&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The important part:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Open regedit and navigate to&lt;strong&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Audio&lt;/strong&gt;. 
&lt;li&gt;Change the &lt;strong&gt;DisableProtectedAudioDG&lt;/strong&gt; value &lt;strong&gt;from 1 to 0&lt;/strong&gt; and reboot.&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;
&lt;p&gt;So now’s your chance. Follow the bouncing ball and retrieve you DRM-less glory, however as you are making a change to your registry&lt;strong&gt; I highly recommend that you back up your registry before implementing the change&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/d14066d9-1d39-4f3b-bccb-de4352aa7a82_image_4.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/b3771e1b-520f-45a1-91dc-164f64ff31cb_image_thumb_1.png" width="200" height="196"&gt;&lt;/a&gt;
&lt;p&gt;Happy content consumption.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=zMs84s5owQ4:ZpxPf3aDlok:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=zMs84s5owQ4:ZpxPf3aDlok:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=zMs84s5owQ4:ZpxPf3aDlok:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=zMs84s5owQ4:ZpxPf3aDlok:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/Cbe3fY5JurA" height="1" width="1"/&gt;</description><pubDate>2/19/2013 6:22:29 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2013/02/19/music-to-your-ears--fixing-the-win-8-music-app</feedburner:origLink></item><item><title>Preparing Your Windows Phone 8 App For Submission to the Windows Phone Store</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/u9K3y-eCmq4/preparing-your-windows-phone-8-app-for-the-marketplace</link><description>&lt;p&gt;Finishing your Windows Phone 8 application isn’t the end of your Windows Phone journey. You’ve now got to get it into everyone’s hot little hands – by submitting it to the Store. Having developed for the Windows Phone platform now for a number of years, I can attest that just uploading&amp;nbsp; your XAP file isn’t the only thing required to make this happen. Similar to my post on “&lt;a href="/blog/2012/01/23/8-musthave-tools-for-windows-phone-7-development"&gt;Must have tools for Windows Phone&lt;/a&gt;” I'll try and fill you in on a few things I wish I'd known before I submitted.&lt;/p&gt;
&lt;p&gt;Last weekend I was lucky enough to have been asked to spend the weekend acting as a mentor for Microsoft’s &lt;a href="/blog/2013/02/11/get-your-thinking-caps-on-ndash-appfest-sydney"&gt;#AppFest Windows Phone and Windows 8&lt;/a&gt; hack weekend. As developers came closer to finishing the first version of their apps, many started asking the same thing: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What do I need to know next?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;So below I’ll fill you in on things you need to get ready, maybe do ahead of time and generally start running through your head before you push your XAP file to Microsoft.&lt;/p&gt;
&lt;h3&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/482a72a5-f713-40e6-bc97-19aaa270499c_image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 15px 15px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/0f5608a2-6f1f-4d03-8885-2916bb32b4ea_image_thumb_1.png" width="244" height="244"&gt;&lt;/a&gt;Get a Developer Account&lt;/h3&gt;
&lt;p&gt;The first thing I’d do right now, is &lt;a href="https://dev.windowsphone.com/"&gt;register for the Store&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;It seems obvious, but doing this ahead of time will help you understand any further requirements, and give you a feel of what's to come. It’ll also help you prepare your US tax status if you want to charge cold hard cash for your app. Microsoft doesn't need a US ITIN if you’re outside the US anymore but you still need to submit tax info. If you’re wanting to submit under a business name that doesn’t yet exist, you’ll need to get this information on the way as well.&lt;/p&gt;
&lt;p&gt;You can check out the “&lt;a href="http://msdn.microsoft.com/en-us/library/windowsphone/help/jj206722(v=vs.105).aspx"&gt;getting paid&lt;/a&gt;” page on MSDN for more info. They say if you’re a US citizen you’ll need to provide either:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Social Security Number (SSN): 9 numbers in the format of 123-45-6789&lt;/p&gt;
&lt;li&gt;
&lt;p&gt;Employer Identification Number (EIN): 9 numbers in the format of 12-3456789&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;
&lt;p&gt;Also, it’s worth noting that only the &lt;a href="http://msdn.microsoft.com/en-us/library/windowsphone/help/jj215599(v=vs.105).aspx"&gt;following countries’&lt;/a&gt; bank accounts are supported to receive payouts. If you’re outside this list, you might want to rethink your monetisation strategy – maybe ads instead?&lt;/p&gt;
&lt;h3&gt;Review the UX guidelines&lt;/h3&gt;
&lt;p&gt;There are a few &lt;a href="http://tinyurl.com/wpstoreguidelines"&gt;UX guidelines&lt;/a&gt; Microsoft has prepared for the Store that your app &lt;em&gt;must&lt;/em&gt; adhere to before it’ll get approved. Knowing these ahead of time could save you some serious time and frustration. &lt;/p&gt;
&lt;p&gt;The guide: &lt;a href="http://tinyurl.com/wpstoreguidelines"&gt;http://tinyurl.com/wpstoreguidelines&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What this means in “human terms”:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Backstack navigation - the back button must exit your application when it first loads. Elsewhere, it must &lt;em&gt;always&lt;/em&gt; go to the last visible page. If you’re redirecting to a “login” page or settings page on first load, remember to remove it from the backstack. 
&lt;li&gt;You must allow users to turn off location services – if you use location information on load, throw a message box asking for permission before doing so. 
&lt;li&gt;Always ask users for permission before turning on toast notifications. Don’t simply set the default to “on” and think having a settings page to turn them off is enough. 
&lt;li&gt;If your app plays audio, it must be able to play non-step for more than 6 hours. Use the Visual Studio Store Performance Tools to verify the battery usage. 
&lt;li&gt;Make sure you test you app using the 720p emulator to optimise the viewing experience for everyone.&lt;/li&gt;&lt;/ul&gt;
&lt;h3&gt;Contact Information&lt;/h3&gt;
&lt;p&gt;You need to have a support page on the web for your app and a valid email address or about section in your app. Microsoft test this web page during app testing and will fail your app if the page, the version number and “a way to contact you” isn’t listed. I know first hand because my app &lt;a href="http://intheknowapp.com"&gt;InTheKnow&lt;/a&gt; failed once because of this.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You must list your app’s version somewhere in your app. Think about an “About” page. 
&lt;li&gt;You must list a way to get in contact with you. Again an “About” page will fix this.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The venerable &lt;a href="https://twitter.com/jeffwilcox"&gt;Jeff Wilcox&lt;/a&gt; has written a great &lt;a href="http://www.jeff.wilcox.name/2011/07/my-app-about-page/"&gt;about page helper blog post&lt;/a&gt;&amp;nbsp; to get you started.&lt;/p&gt;
&lt;h3&gt;App Description&lt;/h3&gt;
&lt;p&gt;Start thinking about how to describe your app in the Store. Keep it simple and to the point. Metro guru Shane Morris talked about defining your app’s “best app statement” at #appfest, and this summarises it well.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p align="left"&gt;"my app is the best app for..."&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Make sure to mention things that set your app apart or are Windows Phone specific advantages.&lt;/p&gt;
&lt;p&gt;Take a surf of the &lt;a href="http://www.windowsphone.com/en-au/store"&gt;Store&lt;/a&gt; and start having a think about what category you think your app sits in – observe how similar apps are priced, and whether they support “Trial Mode”.&lt;/p&gt;
&lt;h3&gt;Your App’s Art&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/0bda1f2f-b49d-4528-922e-78f70b5473a1_image_6.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 0px 0px 15px 15px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/93697430-4a6c-4644-a130-2264045c1f53_image_thumb_2.png" width="244" height="174"&gt;&lt;/a&gt;If you want your app to be a success, you’ve got to leave people with a good impression from the moment you open your app. &lt;/p&gt;
&lt;p&gt;Start towards this by ensuring you have a decent loading screen and icon.&lt;/p&gt;
&lt;p&gt;If you’re looking for inspiration check out: &lt;a href="http://thenounproject.com"&gt;http://thenounproject.com&lt;/a&gt;. They have a metro style icon for everything.&lt;/p&gt;
&lt;p&gt;Take some interesting screen shots of your app within the emulator. Make it look “real” - have a think about the sample data you enter in your app before taking screen shots to make them more appealing. A ToDo app looks just like every other ToDo app unless the screen shots show content that is interesting.&lt;/p&gt;
&lt;p&gt;Also, remember to take extra screenshots for 720p and 400x800 screens.&lt;/p&gt;
&lt;h3&gt;Run The Store Test Kit&lt;/h3&gt;
&lt;p&gt;From Windows Phone 7.1 onwards Microsoft has included a great little store test kit full with automated tests to run against your app before you submit it. A large number of these tests are the same as those used&amp;nbsp; by the Store testers when reviewing your app. To run these tests, simply right click your Windows Phone 8 project and select "&lt;strong&gt;Open Store Test Kit&lt;/strong&gt;". Don’t proceed with submitting your app without running this tool.&lt;/p&gt;
&lt;p&gt;Consider also using the manual profiling tools included to ensure your app doesn't "do evil".&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/e393d7f4-6b65-481a-b435-1f3da8270b3b_image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/faaba6eb-8c9d-45c7-9a7e-0f2f9cb8e234_image_thumb.png" width="304" height="130"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;XAP File Submission&lt;/h3&gt;
&lt;p&gt;Before you hit submit, make sure the XAP file you submit is a &lt;strong&gt;RELEASE&lt;/strong&gt; build. Sounds simple, but it’s pretty critical. &lt;/p&gt;
&lt;p&gt;Also consider obfuscating your app using Dotfuscator Community Edition. At the end of the day, your XAP is a zip file of your binaries. The security of your codebase on the Windows Phone platform has been known to not be airtight (&lt;a href="/blog/2012/04/25/cause-for-concern--piracy-on-windows-phone-7"&gt;I blogged about this last year&lt;/a&gt;) and while I haven’t looked at the situation on the Windows Phone 8 platform yet, you can never be too safe. So do what you can and at least make it harder to extract your source code if anyone gets a hold of your XAP.&lt;/p&gt;
&lt;h3&gt;Let 'er rip.&lt;/h3&gt;
&lt;p&gt;Once you’ve run through the above, you should be ready.&lt;/p&gt;
&lt;p&gt;After submitting apps for myself and friends, I know the excitement that builds as you press play on something you’ve been working hard on for days/weeks/months – good luck!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=_LlhLxenhMM:2_fyJptbwKs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=_LlhLxenhMM:2_fyJptbwKs:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=_LlhLxenhMM:2_fyJptbwKs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=_LlhLxenhMM:2_fyJptbwKs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/u9K3y-eCmq4" height="1" width="1"/&gt;</description><pubDate>2/26/2013 5:55:26 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2013/02/26/preparing-your-windows-phone-8-app-for-the-marketplace</feedburner:origLink></item><item><title>Testing the Untestable with Microsoft Fakes and Visual Studio 2012 Update 2</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/H-o0W6Rh-Ro/make-testing-the-untestable-easy-with-visual-studio-2012-update-2-and-the-microsoft-fakes-framework</link><description>&lt;p&gt;When maintaining applications built in ways that make unit testing them high friction, difficult or down right impossible, we often turn to integration tests or no tests at all. Poking around the outside of your logic to see that the outcomes our code produces is often fiddly, brittle and in most cases so time consuming it just doesn’t happen. Lucky for us all, if there has been a case in the past where we’ve been unable to test part of our business logic, Visual Studio 2012 Update 2 is here to offer an answer to your prayers which you just might not be aware of.&lt;/p&gt; &lt;p&gt;Recently I changed jobs from working for external clients on creative driven work to running an internal development team. This has been the other side of the universe in more than one way for sure.&lt;/p&gt; &lt;p&gt;With this change in scenery, so changed the types of projects I’ve been working on, with a change to more brownfield work. Out with the new and in with the old… or something.&lt;/p&gt; &lt;p&gt;My old role consisted of about 10% legacy project and 90% new. Often the 10% brownfield projects were themselves only less than 2 years old. A common attitude this bread within my team whenever they had to go back to an older project was something along the lines of:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;“…&lt;/p&gt; &lt;p&gt;Oh No!&lt;/p&gt; &lt;p&gt;You mean I have to work in .Net 3.5…!&lt;/p&gt; &lt;p&gt;”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/8c3f86fe-b43b-4871-aeb2-453aa5a60aa7_image_4.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 15px 0px 15px 15px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/2c7924ef-f18f-4aea-b582-77b99c2e998e_image_thumb_1.png" width="244" height="244"&gt;&lt;/a&gt;Us poor Gen-Y developer equivalents…&lt;/p&gt; &lt;p&gt;My new role, and this change to supporting a number of older applications has brought with it a need to look at ways of addressing untested, untestable or black box legacy code to increase our confidence in refactoring it.&lt;/p&gt; &lt;h3&gt;The Problem&lt;/h3&gt; &lt;p&gt;Writing unit testable code has been an ever growing trend in .Net, but 5-6 years ago it was still growing mass acceptance in our part of the world – partially lead by Microsoft themselves; Visual Studio 2008 Pro was the first IDE to have unit test support built in outside of the “team suite”, “ultimate” or “architect” editions. This gave the impression that “Unit tests were only for the rich”.&lt;/p&gt; &lt;p&gt;What I’ve seen in many workplaces over the years is that this lack of unit test penetration lead to a lot of .Net developers simply not learning good practices when it comes to separation of concerns and modular coding practices that lead to testable code. This isn’t a complaint. We were all there once; just a statement that I saw the effects of this in a lot of legacy projects that all suffered from:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Wide spread usage of static classes and methods (i.e. no interfaces, virtual methods etc).  &lt;li&gt;A lack of dependency injection (no way to easily replace functionality with a mock or a stub).  &lt;li&gt;Tightly coupled code (a domain class that talks to the database, or a business layer method that refers to HttpContext.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;This lead to scenarios that meant that when developers on .Net started out unit testing, they often were forced into doing end-to-end integration tests to get around their tightly coupled architecture.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: black"&gt;[&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;TestMethod&lt;/span&gt;&lt;span style="background: white; color: black"&gt;]
&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;public void &lt;/span&gt;&lt;span style="background: white; color: black"&gt;UserSignup_ValidFormSubmission_UserIsCreated()
{
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;testHelper = loadApplicationOverHttp(&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;Configuration&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.LocalSiteUrl);
    testHelper.SubmitSignupDataOverHttp(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"username"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;, &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"password"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;);

    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;dbEntry = &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DataLayer&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.GetUser(&lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"username"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;);

    &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;Assert&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.IsNotNull(dbEntry, &lt;/span&gt;&lt;span style="background: white; color: #a31515"&gt;"No user was created in the database"&lt;/span&gt;&lt;span style="background: white; color: black"&gt;);
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;From a build and automation perspective, this type of testing is expensive as it takes a long time to build and run tests. To start with you need to have a database server online just to run your tests. You often need a clean database. It needs to be kept in synch with production or a known state. When working with CI it’s harder to automate, and hell when you’re &lt;em&gt;just a new developer on the team&lt;/em&gt; you’ve got to work hard to get your workspace into a happy place to even run these kinds of integration tests&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This lack of smooth experience only leads to one thing: less testing.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;While Integration tests are useful to know that your application works end-to-end, obviously the fiddly and brittle nature of them is why Unit tests are such a preferred method of testing code path functionality across your entire codebase. But Unit Testing takes architecture choices from day 1 to make your applications easily testable, so brownfield projects caught out with a lack of good architecture with little budget for refactoring work often flounder in a unit testing no mans land.&lt;/p&gt;
&lt;p&gt;That was until &lt;a href="http://research.microsoft.com/en-us/projects/moles/"&gt;Microsoft Moles&lt;/a&gt; came along.&lt;/p&gt;
&lt;p&gt;With Moles came a huge power of interception that was originally a free piece of framework/tooling from Microsoft Research that worked with Visual Studio 2010, albeit lacking some polish.&lt;/p&gt;
&lt;p&gt;Sadly Microsoft took Moles away from us with the launch of Visual Studio 2012. In a similar turn to how they approached VS 2005&amp;nbsp; they opted to only include support for Moles in the Ultimate edition.&lt;/p&gt;
&lt;p&gt;That was &lt;em&gt;until&lt;/em&gt; the &lt;a href="http://blogs.msdn.com/b/visualstudioalm/archive/2013/02/08/february-ctp-for-visual-studio-update-2.aspx#fakes"&gt;Update 2 &lt;/a&gt; for Visual Studio 2012 released last week, which if you download today has all of the &lt;strike&gt;moles&lt;/strike&gt; fakes magic (they changed the name), but now with Visual Studio 2012 support and awesome IDE integration.&lt;/p&gt;
&lt;h3&gt;Microsoft Moles/Fakes&lt;/h3&gt;
&lt;p&gt;One of the greatest things about unit testing in other more dynamic languages like Ruby or Python is that testing logic is inherently easier because you can simply replace functionality at runtime as they’re dynamic languages. Mocking is almost a non-event just because of this dynamic nature.&lt;/p&gt;
&lt;p&gt;Thanks to Fakes some of this power is yours to tap into with VS 2012 just as it was when they first released Moles in 2010. &lt;/p&gt;
&lt;p&gt;Moles has grown into what we know now as &lt;strong&gt;Microsoft Fakes &lt;/strong&gt;and is an incredibly powerful bit of kit for allowing you to replace functionality for your application at runtime. This power then allows you to intercept legacy code and make it testable.&lt;/p&gt;
&lt;p&gt;A good example of this power is in the example below of a shim of &lt;strong&gt;System.DateTime.Now&lt;/strong&gt; and its &lt;strong&gt;Get&lt;/strong&gt; accessor. Microsoft Fakes allows me to test a static method or anything that depends on it with ease; in this case changing the date to 1st January 1970:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background: white; color: black"&gt;[&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;TestMethod&lt;/span&gt;&lt;span style="background: white; color: black"&gt;]
&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;public void &lt;/span&gt;&lt;span style="background: white; color: black"&gt;MyDateProvider_ShouldReturnDateAsJanFirst1970()
{
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black"&gt;(Microsoft.QualityTools.Testing.Fakes.&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;ShimsContext&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.Create())
    {
        &lt;/span&gt;&lt;span style="background: white; color: green"&gt;// Arrange:
        &lt;/span&gt;&lt;span style="background: white; color: black"&gt;System.Fakes.&lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;ShimDateTime&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.NowGet = () =&amp;gt; &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;new &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DateTime&lt;/span&gt;&lt;span style="background: white; color: black"&gt;(1970, 1, 1);

        &lt;/span&gt;&lt;span style="background: white; color: green"&gt;//Act:
        &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black"&gt;curentDate = &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;MyDateTimeProvider&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.GetTheCurrentDate();

        &lt;/span&gt;&lt;span style="background: white; color: green"&gt;//Assert:
        &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;Assert&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.IsTrue(curentDate == &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;new &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DateTime&lt;/span&gt;&lt;span style="background: white; color: black"&gt;(1970, 1, 1));
    }
}
&lt;/span&gt;&lt;span style="background: white; color: blue"&gt;public class &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;MyDateTimeProvider
&lt;/span&gt;&lt;span style="background: white; color: black"&gt;{
    &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;public static &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DateTime &lt;/span&gt;&lt;span style="background: white; color: black"&gt;GetTheCurrentDate()
    {
        &lt;/span&gt;&lt;span style="background: white; color: blue"&gt;return &lt;/span&gt;&lt;span style="background: white; color: #2b91af"&gt;DateTime&lt;/span&gt;&lt;span style="background: white; color: black"&gt;.Now;
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Pretty cool!?&lt;/p&gt;
&lt;p&gt;And to get this level of interception all you need to do to get this is download &lt;a href="http://www.microsoft.com/en-au/download/details.aspx?id=38188"&gt;Visual Studio 2012 Update 2&lt;/a&gt;, then &lt;strong&gt;Right click on a Reference in your Unit Test Project &lt;/strong&gt;and add a Fakes Assembly (a shimmed copy of your binary).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/0a046e62-e980-44cc-8d3f-477a0a202e24_image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/1519f4af-8052-4ba2-8423-c212a9f4f5ea_image_thumb.png" width="581" height="354"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then all you need to do is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wrap your logic in a &lt;strong&gt;ShimsContext.&lt;/strong&gt;
&lt;li&gt;Use the new convention based syntax “&lt;strong&gt;Shim[Classname]” &lt;/strong&gt;class and “&lt;strong&gt;PropertyName[Get/Set]”&lt;/strong&gt; syntax to define what your shim will do.
&lt;li&gt;Go grab a &amp;lt;insert tasty beverage of your choosing/&amp;gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;And you’re off and away!&lt;/p&gt;
&lt;h3&gt;Stop reading – Start testing the untestable!&lt;/h3&gt;
&lt;p&gt;With the power of Microsoft Fakes offered in Visual Studio 2012 Update 2 there is now no excuse not to test that old .Net project you and your team members are afraid to refactor. Get to it.&lt;/p&gt;
&lt;p&gt;MSDN: &lt;a href="http://msdn.microsoft.com/en-au/library/hh549175.aspx"&gt;http://msdn.microsoft.com/en-au/library/hh549175.aspx&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=KbuUE7JWNAI:EKOhPlJYb1I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=KbuUE7JWNAI:EKOhPlJYb1I:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=KbuUE7JWNAI:EKOhPlJYb1I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=KbuUE7JWNAI:EKOhPlJYb1I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/H-o0W6Rh-Ro" height="1" width="1"/&gt;</description><pubDate>4/10/2013 6:42:10 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2013/04/10/make-testing-the-untestable-easy-with-visual-studio-2012-update-2-and-the-microsoft-fakes-framework</feedburner:origLink></item><item><title>Introducing My Cloud Deployment Service, OnCheckin.com</title><link>http://feedproxy.google.com/~r/DiaryOfANinja/~3/1no-uWPXpT8/introducing-my-cloud-deployment-service-oncheckincom</link><description>&lt;p&gt;Constantly over the past few years I’ve thanked my lucky stars that I’ve had continuous integration and deployment setup for the web sites I’ve been working on. It is one of the few development opinions where I break the “religion and politics” laws of social etiquette. I feel incredibly strongly about the benefits that having a good Continuous Integration and Deployment story can bring to a project and it’s team. Sadly, not everyone has been able to experience the awesome sauce of CI/CD. I’ve been working hard to change that.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/43659287-6e81-4ef0-8cb1-ef2cee6b8095_image_10.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 15px 0px 15px 15px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.diaryofaninja.com/asset/blogimages/c233e1d7-fc5f-4c6b-ac2a-10ecc5927901_image_thumb_4.png" width="244" height="193"&gt;&lt;/a&gt;Teams using Continuous Deployment know that the cost savings, safety and reliability that comes with deploying many times before going into production are priceless. Awesomeness aside those of us lucky enough to be putting it into action daily all found out quite early on that unless you’ve done it many times before, starting out with continuous integration can appear to add overhead to your timelines that you may simply not have time for.&lt;/p&gt; &lt;p&gt;I’ve used many different approaches over the years, I’ve setup Continuous Deployment starter packs for others to use to get started, I’ve blogged about it &lt;a href="http://www.diaryofaninja.com/tag/continuous-integration"&gt;many times&lt;/a&gt; to try and spread the good word, but it still felt like the level of friction for newcomers was too high.&lt;/p&gt; &lt;p&gt;After all, you need to;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Setup a build server such as TeamCity, Bamboo or CruiseControl.  &lt;li&gt;Create build scripts for your projects (MSBuild, Nant, Rake).  &lt;li&gt;The trial and error over-and-over of getting the final deployment story to work end-to-end.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Until now.&lt;/p&gt; &lt;h3&gt;Welcome to &lt;a href="https://oncheckin.com"&gt;OnCheckin.com&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/b8dee0b3-1ec3-477a-867e-7f679fa3e350_image_2.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/c4c4f2ed-2f23-4c7e-adea-24ddc5ddc4af_image_thumb.png" width="504" height="300"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://oncheckin.com"&gt;OnCheckin&lt;/a&gt; is a cloud powered Continuous Deployment service. Plug in your source control and webserver just the way you use them now, and let the service take care of the rest.&lt;/p&gt; &lt;p&gt;I created &lt;a href="https://oncheckin.com"&gt;OnCheckin.com&lt;/a&gt; with the aim of bringing all of the power, reliability and repeatability of a build and deployment server to you and your team without any of the setup time, ongoing management, or cost. The operating cost in both man hours, and capital expense of outlaying for software and hardware.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;I want to make it so easy to use Continuous Deployment for your next project, that you’d simply be silly not to jump on in.&lt;/p&gt;&lt;/blockquote&gt; &lt;h3&gt;What OnCheckin does&lt;/h3&gt; &lt;p&gt;The gist of it is:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1. You setup a FREE account (no cost) that allows you to do continuous deployment for 1 website.&lt;br&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2. Give less than 5 minutes of your time to setup a project (depending on project configuration, less than 10 form fields!).&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/916b3d6b-c90b-4ca0-b7cc-667b7cbddd54_image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/d19099f0-26fc-4d5a-9748-71e8cb316f57_image_thumb_1.png" width="324" height="194"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;3. OnCheckin.com watches your source control for any changes, and if so it queues a deployment.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/21a74d4f-96cc-4805-a3ce-69d10f1e16cb_image_6.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/3aa8204d-55ef-4965-8f31-45ef0e57ad91_image_thumb_2.png" width="324" height="194"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;4. OnCheckin downloads your source, builds it, runs your unit tests, takes your site offline with a holding page that you configure and then deploys to your servers before starting up your website again.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;5. Afterwards OnCheckin allows you to easily review build logs and unit test results online.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.diaryofaninja.com/asset/blogimages/e398cbf7-5e8d-47e2-beab-9072d312a5aa_image_8.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.diaryofaninja.com/asset/blogimages/17e1ecf8-cf31-48fd-ae37-a924af52596d_image_thumb_3.png" width="324" height="194"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;And I’d like to think the awesomeness from &lt;a href="https://oncheckin.com"&gt;OnCheckin&lt;/a&gt; is just getting started - I’ve also got a bunch of new features on the way and I want you to have a say, so get in and let me know how you’d like the service to grow by voting on the &lt;a href="https://trello.com/b/aUmkAboN"&gt;Trello board&lt;/a&gt;.&lt;/p&gt; &lt;h3&gt;And it works for you right now&lt;/h3&gt; &lt;p&gt;Continuous Deployment shouldn’t be limited to enterprise or open source developers alike. &lt;/p&gt; &lt;p&gt;When building OnCheckin I’ve tried hard to make the service agnostic to developers of all kinds. Whether you like using Github or TFS, MSTest or nUnit, FTP or WebDeploy.&lt;/p&gt; &lt;p&gt;With this comes the need to have OnCheckin.com work for teams using all types of tooling:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Source Control Providers:&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Github.com  &lt;li&gt;Bitbucket.org  &lt;li&gt;Privately hosted Git  &lt;li&gt;SVN  &lt;li&gt;Team Foundation Server&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;(Mercurial hopefully coming soon!)&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Unit Test Frameworks:&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;MSTest  &lt;li&gt;nUnit  &lt;li&gt;xUnit  &lt;li&gt;MbUnit&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Ways to Deploy:&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;FTP  &lt;li&gt;FTPS  &lt;li&gt;SFTP  &lt;li&gt;WebDeploy&lt;/li&gt;&lt;/ul&gt; &lt;h3&gt;Where OnCheckin fits in&lt;/h3&gt; &lt;p&gt;Having spent many years working in software shops, web development houses, digital and advertising agencies, I know that it isn’t uncommon when working for a client to be forced to deliver great work while low on budget, short on resources, and often pushed for time.&lt;/p&gt; &lt;p&gt;Regardless of your situation, the mantra still sticks:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Deploy Early and Deploy Often&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I created &lt;a href="https://oncheckin.com"&gt;OnCheckin&lt;/a&gt; to help people building ASP.Net websites all over the world by giving them all the power of Continuous Deployment, without all the hard work or learning curve.&lt;/p&gt; &lt;p&gt;The cost of an account starts at $0.00. The time it takes to&amp;nbsp; get setup and give it a try should be just minutes. I’ve worked hard to try and simplify the setup. If you don’t use continuous integration and deployment yet,&amp;nbsp; I hope you’ll want to try OnCheckin for your next project.&lt;/p&gt; &lt;h3&gt;It’s early days though – OnCheckin is in Beta&lt;/h3&gt; &lt;p&gt;While the service has handled thousands of builds already (this blog itself is deployed using OnCheckin) and the service is setup to scale, mass varied usage is still going to be a relatively new thing for the service. As with most services like this that are just launching, I don’t expect it to be entirely kink free.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;A ton of user testing has taught me that every person is a unique, special kind of annoying, unpredictable snowflake.&lt;br&gt;- &lt;a href="https://twitter.com/mutgoff/status/311247203354177537"&gt;Maggie Utgoff&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;There may be some projects types that won’t build yet. Any project type out of the box in VS2008-2012 should build fine though (see F# below thought) – outside of this, your mileage may vary.&lt;/p&gt; &lt;p&gt;There may be some types of source control repository products it may not fully support yet – there are a lots of different SVN servers, Git servers and TFS configuration's out in the wild, and I definitely don’t profess to have had access to them all during testing.&lt;/p&gt; &lt;p&gt;Third party project types won’t work – neither will F# projects just yet. If demand is high it’s definitely an option in the future though.&lt;/p&gt; &lt;p&gt;If you experience issues with anything, I’d love to help you get OnCheckin working for your setup – simply reach out by email (doug[at]oncheckin.com) or twitter &lt;a href="https://twitter.com/oncheckinapp"&gt;@OnCheckinApp&lt;/a&gt;.&lt;/p&gt; &lt;h3&gt;Technology stack&lt;/h3&gt; &lt;p&gt;For those of you interested in knowing what's behind the scenes, I can happily share that I built OnCheckin using the following technology stack:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;.Net 4.5  &lt;li&gt;Entity Framework 5 Code First Migrations.  &lt;li&gt;ASP.Net MVC 4  &lt;li&gt;DotNetOAuth  &lt;li&gt;SQL Server 2012  &lt;li&gt;Windows Server 2012  &lt;li&gt;MSBuild  &lt;li&gt;SignalR  &lt;li&gt;TopShelf  &lt;li&gt;WebDeploy  &lt;li&gt;BouncyCastle.Crypto  &lt;li&gt;ELMAHR  &lt;li&gt;Munq IOC Container (&lt;a href="http://www.palmmedia.de/blog/2011/8/30/ioc-container-benchmark-performance-comparison"&gt;fast&lt;/a&gt;)  &lt;li&gt;Moq  &lt;li&gt;xUnit  &lt;li&gt;Azure Service Bus&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Serving duties are spread across a number of cloud based servers with SQL, Web, Build and Source Control spread into separate roles.&lt;/p&gt; &lt;p&gt;&lt;a href="https://oncheckin.com"&gt;Head on over and signup for a free account&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Special Thanks&lt;/h3&gt; &lt;p&gt;I can’t take all of the credit for what I believe to be the awesomeness that is OnCheckin.com.&lt;/p&gt; &lt;p&gt;Over the past 6 months while I've been putting the service together, I've had to moral support of many great people. Some have given me feedback, some helped steer me on the right path. Others have just been great support whether you’ve actively known about it or not. Thank you to everyone who offered words of wisdom, or just shared a beer with me for support over the past few months, there are too many to mention but you know who you are. &lt;/p&gt; &lt;p&gt;Some special mentions I will make though (you may notice a trend):&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Sayed I Hashimi&lt;/strong&gt; &lt;br&gt;&lt;a href="https://twitter.com/sayedihashimi"&gt;@sayedihashimi&lt;/a&gt;&lt;br&gt;&lt;a href="http://sedodream.com"&gt;http://sedodream.com&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I cannot say enough about the awesomeness that Sayed gives to the ASP.Net community – he literally &lt;a href="http://www.amazon.com/Inside-Microsoft%C2%AE-Build-Engine-Pro-Developer/dp/0735626286"&gt;wrote the book on MSBuild&lt;/a&gt;. While working by day on the Visual Studio web team, he also puts in a huge amount of effort working with the community. Everywhere I’ve visited on the web relating to Visual Studio Build, MSBuild, TFS, you name it he’s written a blog post about it, answered a StackOverflow question about it, or replied by email or Twitter. Sayed personally took the time, more than a few times, to help me by replying to emails, Stack Overflow questions and tweets. Thanks Sayed!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Paul Stovell&lt;/strong&gt;&lt;br&gt;&lt;a href="mailto:h@paulstovell"&gt;@paulstovell&lt;/a&gt;&lt;br&gt;&lt;a href="http://paulstovell.com"&gt;http://paulstovell.com&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Paul needs no introduction, having brought Octopus Deploy into the world. Paul also took the time to sign up, take a look at OnCheckin and give me his thoughts. The input I really valued from Paul wasn’t just his feedback though – his “from the road” start-up&amp;nbsp; advice and words of support were really what helped me keep putting in the hard yards. All of the months of less blogging, more coding, and obsessively long hours wear on you. Pauls advice motivated me to push on. Thanks Paul!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Daniel Nolan&lt;/strong&gt;&lt;br&gt;&lt;a href="mailto:h@dan3r3"&gt;@dan3r3&lt;/a&gt;&lt;br&gt;&lt;a href="http://ready-roll.com/"&gt;http://ready-roll.com/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Dan is probably another name you’re familiar with. Dan brought Ready-roll into the world and with it the awesomeness of automated SQL versioning and source control support. Dan offered some great advice, took the time to review the service and generally put my mind at ease about what I might be doing wrong, right or what was just plain crazy. I recently found out he also lives two blocks from my home, so me shouting him the odd pint or two should definitely allow me to tease out more golden nuggets. Thanks Dan!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=1aAvFDfnBFc:UjTzwxdn_BI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=1aAvFDfnBFc:UjTzwxdn_BI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DiaryOfANinja?a=1aAvFDfnBFc:UjTzwxdn_BI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DiaryOfANinja?i=1aAvFDfnBFc:UjTzwxdn_BI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DiaryOfANinja/~4/1no-uWPXpT8" height="1" width="1"/&gt;</description><pubDate>5/21/2013 7:07:52 AM</pubDate><feedburner:origLink>http://www.diaryofaninja.com/blog/2013/05/21/introducing-my-cloud-deployment-service-oncheckincom</feedburner:origLink></item></channel></rss>
