<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Den by default</title><link>http://www.dennisdel.com:80/blog/</link><description>Den by default</description><item><title>Beem 1.1 Update Pushed To The Marketplace</title><link>http://www.dennisdel.com:80/blog/beem-one</link><description>&lt;p&gt;I just released pushed an update to the Windows Phone Marketplace for my &lt;a href="http://beem.dennisdel.com/" target="_blank"&gt;Beem application&lt;/a&gt; &amp;ndash; a DI.FM client that I&amp;rsquo;ve been working on as a hobby. The new update includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A bug fix that now allows you to re-pin a tile even if it disappears (apparently an OS bug, but there is now a workaround).&lt;/li&gt;
&lt;li&gt;UI tweaks.&lt;/li&gt;
&lt;li&gt;Ability to search for played songs in the Zune Marketplace.&lt;/li&gt;
&lt;li&gt;Ability to record the stream and store it locally for playback (consider this a DVR implementation for DI.FM).&lt;/li&gt;
&lt;li&gt;Ability to set short recorded music as a ringtone.&lt;/li&gt;
&lt;li&gt;There is now a "Now Playing&amp;rdquo; option that allows users to easily jump to the currently playing station.&lt;/li&gt;
&lt;li&gt;Added the ability to clear the music player (in case you don&amp;rsquo;t want to see the last played content even though it is paused).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The update is currently pending certification. It might be a couple of days before you will get it, if you already have the application installed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Beem-1.1-Pushed-To-The-Marketplace--_B6D1/Screen%20Capture%20(58)_2.jpg"&gt;&lt;img width="250" height="417" title="Screen Capture (58)" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="Screen Capture (58)" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Beem-1.1-Pushed-To-The-Marketplace--_B6D1/Screen%20Capture%20(58)_thumb.jpg" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Beem-1.1-Pushed-To-The-Marketplace--_B6D1/Screen%20Capture%20(59)_2.jpg"&gt;&lt;img width="250" height="417" title="Screen Capture (59)" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="Screen Capture (59)" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Beem-1.1-Pushed-To-The-Marketplace--_B6D1/Screen%20Capture%20(59)_thumb.jpg" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Beem-1.1-Pushed-To-The-Marketplace--_B6D1/Screen%20Capture%20(64)_2.jpg"&gt;&lt;img width="250" height="417" title="Screen Capture (64)" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="Screen Capture (64)" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Beem-1.1-Pushed-To-The-Marketplace--_B6D1/Screen%20Capture%20(64)_thumb.jpg" border="0" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Beem-1.1-Pushed-To-The-Marketplace--_B6D1/Screen%20Capture%20(60)_2.jpg"&gt;&lt;img width="250" height="417" title="Screen Capture (60)" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="Screen Capture (60)" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Beem-1.1-Pushed-To-The-Marketplace--_B6D1/Screen%20Capture%20(60)_thumb.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;FAQ&lt;/h1&gt;
&lt;h3&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Why I can record the stream but cannot upload or back it up anywhere?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; I am currently in the United States. The application is developed in the United States and as a law-abiding individual, I have to follow the &lt;a href="http://en.wikipedia.org/wiki/FAIR_USE_Act" target="_blank"&gt;US legislation&lt;/a&gt;. Under the &lt;a href="http://thomas.loc.gov/cgi-bin/query/z?c110:H.R.1201:" target="_blank"&gt;Fair Use DMCA exception&lt;/a&gt;, you are allowed to record the radio stream for personal use, but not for public distribution. Due to the fact that I do not know where exactly the user will upload the recorded MP3 file (e.g. it might be a publicly accessible SkyDrive or Dropbox account) , I cannot allow the files to leave the premises of the Beem storage.&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-weight: bold;"&gt;Q:&lt;/span&gt; The volume is too low. What&amp;rsquo;s up with that?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; I was not able to reproduce this issue with Beem, but I&amp;rsquo;ve seen it happen with other audio streams, particularly those coming from HTML5-based pages. To get the volume back to normal, try lowering it and it should get back to normal. I notified the Windows Phone Dev team about this issue.&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;I am trying to set a recorded file as a ringtone, but it never shows up.&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; That is because the file is too long (time-wise) or is too large (size-wise). Try recording a shorter fragment.&lt;/p&gt;</description><pubDate>Fri, 11 May 2012 22:27:57 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/beem-one</guid></item><item><title>"It's expensive getting hardware to test on" is not an excuse for web devs on a Mac to avoid IE testing</title><link>http://www.dennisdel.com:80/blog/mac-ie</link><description>&lt;p&gt;&lt;a href="http://bartvanzon.com/blog/2012/05/09/supporting-ie-is-too-much-work/" target="_blank"&gt;Bart van Zon put together a short blog post&lt;/a&gt; describing why some web developers, who chose Mac as their development platform, might attempt to avoid testing their product in Internet Explorer.&lt;/p&gt;
&lt;p&gt;Here is one of them:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;It&amp;rsquo;s expensive getting hardware to test on, taking time to test it, making sure you have a Windows installation&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Really? Let&amp;rsquo;s break down the costs.&lt;/p&gt;
&lt;p&gt;To invest in a Mac system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MacBook Pro &amp;ndash; starts at &lt;strong&gt;$1199&lt;/strong&gt; for 13-inch. (&lt;a href="http://www.apple.com/macbookpro/" target="_blank"&gt;source&lt;/a&gt;) &lt;strong&gt;OR&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Mac Mini &amp;ndash; starts at $599 (&lt;a href="http://www.apple.com/macmini/" target="_blank"&gt;source&lt;/a&gt;) + display at ~$140 (&lt;a href="http://www.amazon.com/Acer-S231HL-23-Inch-Widescreen-Ultra-Slim/dp/B003N7P6TC/ref=sr_1_1?ie=UTF8&amp;amp;qid=1336664613&amp;amp;sr=8-1" target="_blank"&gt;source&lt;/a&gt;) + ~$16 keyboard (&lt;a href="http://www.amazon.com/Kensington-64338-Comfort-Type-Keyboard/dp/B0000C4DX6/ref=sr_1_2?ie=UTF8&amp;amp;qid=1336665008&amp;amp;sr=8-2" target="_blank"&gt;source&lt;/a&gt;) &amp;amp; $8 mouse (&lt;a href="http://www.amazon.com/Logitech-B100-Optical-USB-Mouse/dp/B003L62T7W/ref=sr_1_17?ie=UTF8&amp;amp;qid=1336665050&amp;amp;sr=8-17" target="_blank"&gt;source&lt;/a&gt;) totals to &lt;strong&gt;$763&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is for Windows PC:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A decent modern laptop for &lt;strong&gt;$400&lt;/strong&gt; (&lt;a href="http://www.amazon.com/Lenovo-4334DBU-15-6-Inch-Laptop-Black/dp/B007CKQMPI/ref=sr_1_3?s=electronics&amp;amp;ie=UTF8&amp;amp;qid=1336665179&amp;amp;sr=1-3" target="_blank"&gt;source&lt;/a&gt;) (pre-bundled with Windows 7 Home Premium)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But let's go beyond that - Macs have &lt;a href="http://www.apple.com/support/bootcamp/"&gt;Bootcamp&lt;/a&gt;, so your investment might be reduced to simply getting a copy of Windows for &lt;strong&gt;$120&lt;/strong&gt; (&lt;a href="http://www.microsoftstore.com/store/msstore/en_US/pd/Windows-7-Home-Premium/productID.235488300/parentCategoryID.44066700/categoryID.50726100/list.true?Icid=WinCat_032012_Compgrid_boxshot1_Win7HP_PID_235488300"&gt;source&lt;/a&gt;). Or, you might go with what &lt;a href="http://dennisdel.com/blog/mac-ie#comment-290"&gt;Wes MacDonald suggested in the comments&lt;/a&gt; - which results in an additional investment of &lt;strong&gt;$0 &lt;/strong&gt;(download testing VHDs &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=11575"&gt;here&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;If you are a serious developer who invests his time and effort in creating a solid platform, using hardware priced above average and consider Windows to be a breaking investment, your argument is invalid.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PS:&lt;/strong&gt; Developers, you might want to also &lt;a href="http://stackoverflow.com/questions/55577/how-can-i-test-my-web-pages-in-microsoft-internet-explorer-on-a-mac"&gt;read this&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Thu, 10 May 2012 16:30:20 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/mac-ie</guid></item><item><title>Windows Phone Registration Issue Fixed For Devices Registered With a Different AppHub ID</title><link>http://www.dennisdel.com:80/blog/windows-phone-registration-issue-fixed-for-devices-registered-with-a-different-apphub-id</link><description>&lt;p&gt;Today &lt;a href="http://forums.create.msdn.com/forums/p/104141/616123.aspx#616123" target="_blank"&gt;Microsoft fixed a bug&lt;/a&gt; that was preventing phones that were unlocked under a different AppHub account from being re-registered with a new ID, unless the original account holder would un-register it.&lt;/p&gt; &lt;p&gt;Ultimately, this applies to developers who might’ve had their devices unlocked by someone else other than themselves.&lt;/p&gt; &lt;p&gt;All you have to do now is simply use the &lt;a href="http://msdn.microsoft.com/en-us/library/ff769508%28v=VS.92%29.aspx" target="_blank"&gt;Windows Phone registration tool&lt;/a&gt; to re-register the device with a different Microsoft ID that is associated with a valid &lt;a href="http://create.msdn.com/en-US/" target="_blank"&gt;AppHub account&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Thu, 10 May 2012 00:43:46 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/windows-phone-registration-issue-fixed-for-devices-registered-with-a-different-apphub-id</guid></item><item><title>Help students with So.Cl research</title><link>http://www.dennisdel.com:80/blog/help-students-with-so.cl-research</link><description>&lt;p&gt;If you are using So.Cl, you have a great opportunity to help three students: &lt;a href="https://twitter.com/#!/denniscode"&gt;me&lt;/a&gt;, &lt;a href="https://twitter.com/#!/wilson_to"&gt;Wilson To&lt;/a&gt; and &lt;a href="https://twitter.com/#!/alexpoms"&gt;Alex Poms&lt;/a&gt;, in the monumental task of writing a research paper on the social network.&lt;/p&gt; &lt;p&gt;How can you help? Simply fill out &lt;a href="http://dotcore.wufoo.com/forms/socl-case-study-student-research/"&gt;this form&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Wed, 09 May 2012 03:24:41 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/help-students-with-so.cl-research</guid></item><item><title>For Microsoft Student Partners having trouble connecting to Lync on Windows Phone</title><link>http://www.dennisdel.com:80/blog/for-microsoft-student-partners-having-trouble-connecting-to-lync-on-windows-phone</link><description>&lt;p&gt;Considering the recent problems of one of my MSP friends, I found out that for some reason the Lync 2010 app on Windows Phone might refuse to connect to the Lync server designated for Microsoft Student Partners. It seemed to be an application problem, since I was able to connect just fine with my account – &lt;a href="https://twitter.com/#!/wilson_to"&gt;Wilson To&lt;/a&gt;, however, was not.&lt;/p&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/For-Microsoft-Student-Partners-having-tr_CC8A/Screen%20Capture%20(43)_2.jpg"&gt;&lt;img title="Screen Capture (43)" 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="Screen Capture (43)" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/For-Microsoft-Student-Partners-having-tr_CC8A/Screen%20Capture%20(43)_thumb.jpg" width="288" height="480"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;With a little bit of research, I managed to find the source of the problem. When signing in, disable the &lt;strong&gt;Auto-detect server&lt;/strong&gt; option and use this URL for the &lt;strong&gt;External discovery address&lt;/strong&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a href="http://lyncdiscover.studentpartner.com"&gt;http://lyncdiscover.studentpartner.com&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/For-Microsoft-Student-Partners-having-tr_CC8A/Screen%20Capture%20(44)_2.jpg"&gt;&lt;img title="Screen Capture (44)" 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="Screen Capture (44)" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/For-Microsoft-Student-Partners-having-tr_CC8A/Screen%20Capture%20(44)_thumb.jpg" width="288" height="480"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You should be able to successfully connect once this is done.&lt;/p&gt;</description><pubDate>Thu, 03 May 2012 21:45:41 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/for-microsoft-student-partners-having-trouble-connecting-to-lync-on-windows-phone</guid></item><item><title>“What Time Is It” explained and ported to Windows Phone</title><link>http://www.dennisdel.com:80/blog/time-windows-phone</link><description>&lt;p&gt;Today&amp;rsquo;s highlight from Hacker News is &lt;a href="http://iprl.wz.cz/"&gt;What Time Is It?&lt;/a&gt; &amp;ndash; a web page that shows how some construction workers are putting together a wooden representation of the current time. As much as we would want that to be a real-time process, it is not. The purpose of this blog post is to explain what&amp;rsquo;s behind the process.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The original video project is called &lt;a href="http://www.standard-time.com/"&gt;Standard Time&lt;/a&gt; and was created by Mark Formanek.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;First things first, I decided to analyze the network layer. Wireshark seems to be doing the job pretty well so far, so I noticed this:&lt;/p&gt;
&lt;p&gt;&lt;a href="$image[9].png"&gt;&lt;img src="/blog/Media/Default/BlogPost/den-by-default/time-windows-phone/image5.png" alt="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" height="92" width="581" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The full URL looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://176.9.156.38/big_10-25.mp4?start=0&amp;amp;radius=0.794870455716131"&gt;http://176.9.156.38/big_10-25.mp4?start=0&amp;amp;radius=0.794870455716131&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The application is fetching MPEG-4 videos that were filmed prior to the actual display. You probably already noticed that there are two parameters &amp;ndash; one called &lt;strong&gt;start&lt;/strong&gt; and the other one called &lt;strong&gt;radius&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see what &lt;strong&gt;start&lt;/strong&gt; is about. Obviously, the videos are not filmed for every minute. Instead, each video file is structured in 10 minute chunks. In this case, the source video starts when the clock hits 10:25 AM, but it&amp;rsquo;s 270 seconds in already (4.5 minutes, therefore it starts at 10:29:30 AM, where workers finish up the :30 sign.&lt;/p&gt;
&lt;p&gt;That being said, video URLs are structured like this (from the beginning of the day):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a title="http://176.9.156.38/big_00-00.mp4" href="http://176.9.156.38/big_00-00.mp4"&gt;http://176.9.156.38/big_00-00.mp4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="http://176.9.156.38/big_00-00.mp4" href="http://176.9.156.38/big_00-05.mp4"&gt;http://176.9.156.38/big_00-05.mp4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="http://176.9.156.38/big_00-00.mp4" href="http://176.9.156.38/big_00-10.mp4"&gt;http://176.9.156.38/big_00-10.mp4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="http://176.9.156.38/big_00-00.mp4" href="http://176.9.156.38/big_00-15.mp4"&gt;http://176.9.156.38/big_00-15.mp4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="http://176.9.156.38/big_00-00.mp4" href="http://176.9.156.38/big_00-20.mp4"&gt;http://176.9.156.38/big_00-20.mp4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="http://176.9.156.38/big_00-00.mp4" href="http://176.9.156.38/big_00-25.mp4"&gt;http://176.9.156.38/big_00-25.mp4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="http://176.9.156.38/big_00-00.mp4" href="http://176.9.156.38/big_00-30.mp4"&gt;http://176.9.156.38/big_00-30.mp4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Basically, you can initiate the download from any point out of 5 minute intervals. The maximum value for the start parameter is 590. After that, you have to switch to the next video.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;radius&lt;/strong&gt; parameter seems to be useless at this point.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see how to implement this for Windows Phone. I created a project and named it BerlinTime, since the videos were filmed in Berlin. The application itself consists of one page with a MediaElement on it.&lt;/p&gt;
&lt;pre class="prettyprint lang-css"&gt;&amp;lt;phone:PhoneApplicationPage 
    x:Class="BerlinTime.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    SupportedOrientations="Landscape" Orientation="Landscape"
    shell:SystemTray.IsVisible="True"&amp;gt;
    
    &amp;lt;Grid x:Name="LayoutRoot" Background="Transparent"&amp;gt;
        &amp;lt;MediaElement BufferingTime="0:0:01" x:Name="mediaPlayer"&amp;gt;&amp;lt;/MediaElement&amp;gt;
    &amp;lt;/Grid&amp;gt;
&amp;lt;/phone:PhoneApplicationPage&amp;gt;
&lt;/pre&gt;
&lt;p&gt;In the code-behind, I have a custom model for keeping the &amp;ldquo;normalized&amp;rdquo; (within 5 minute intervals) time:&lt;/p&gt;
&lt;pre class="prettyprint lang-css"&gt;public class TimeUnit
{
    public string Hours { get; set; }
    public string Minutes { get; set; }
    public string SecondsIn { get; set; }
}
&lt;/pre&gt;
&lt;p&gt;To get the current time in a manner that can be applied to get the correct video file (remember &amp;ndash; the video files are based on 5 minute intervals) I have &lt;strong&gt;GenerateCurrentTime&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class="prettyprint lang-css"&gt;private TimeUnit GenerateCurrentTime()
{
    TimeUnit unit = new TimeUnit();

    TimeSpan current = DateTime.Now.TimeOfDay;
    Debug.WriteLine(current.ToString());

    int minutes = current.Minutes;
    int seconds = 0;
    int modulusResult = minutes % 5;

    minutes = minutes - modulusResult - 5;

    seconds = (modulusResult + 5) * 60 + current.Seconds;
    Debug.WriteLine(seconds);

    unit.Hours = current.Hours.ToString("D2");
    unit.Minutes = minutes.ToString("D2");
    unit.SecondsIn = seconds.ToString();

    return unit;
}
&lt;/pre&gt;
&lt;p&gt;Here is where 5 minute chunks and the &lt;strong&gt;start&lt;/strong&gt; parameter become useful. To minimize the amount of downloaded data (and therefore to make the streaming smoother), I am constantly looking for the video that represents the time 5 minutes behind the actual one, so the number of seconds goes beyond 300 (5 minutes), therefore I cut the amount of media to be downloaded at least in half. If I would not be doing this, the user would have a high chance of downloading 50MB+ videos on every 10 minute reset.&lt;/p&gt;
&lt;p&gt;I need a URL template, that can be used to generate the video URL. For this I have:&lt;/p&gt;
&lt;pre class="prettyprint lang-css"&gt;public const string UrlTemplate = "http://176.9.156.38/big_{0}-{1}.mp4?start={2}";
&lt;/pre&gt;
&lt;p&gt;When the user first navigates to the page, I am getting the current time and setting the source for the MediaElement (that will buffer the data automatically) to the video file that corresponds to the current time:&lt;/p&gt;
&lt;pre class="prettyprint lang-css"&gt;protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
    PlayVideo();
    base.OnNavigatedTo(e);
}

private void PlayVideo()
{
    CurrentUnit = GenerateCurrentTime();

    mediaPlayer.Source = new Uri(string.Format(UrlTemplate, CurrentUnit.Hours, CurrentUnit.Minutes, CurrentUnit.SecondsIn));
    mediaPlayer.Play();
}
&lt;/pre&gt;
&lt;p&gt;Eventually, the buffer will be exhausted and I will need to reload the media. So when MediaEnded is triggered for the MediaElement, I am simply playing the video again, with new time indicators:&lt;/p&gt;
&lt;pre class="prettyprint lang-css"&gt;void mediaPlayer_MediaEnded(object sender, RoutedEventArgs e)
{
    PlayVideo();
}
&lt;/pre&gt;
&lt;p&gt;The end result looks something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="$image[15].png"&gt;&lt;img src="/blog/Media/Default/BlogPost/den-by-default/time-windows-phone/image4.png" alt="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" height="332" width="599" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There might be slight delays, depending on your connection speed. You can download the project on &lt;a href="https://github.com/dend/WhatTimeIsIt-WP"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Tue, 01 May 2012 20:51:26 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/time-windows-phone</guid></item><item><title>Getting Windows Phone apps back into the Zune Desktop Client</title><link>http://www.dennisdel.com:80/blog/getting-windows-phone-apps-back-into-the-zune-desktop-client</link><description>&lt;p&gt;The Windows Phone team recently &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/24/two-marketplace-changes-an-update-on-9-new-markets.aspx" target="_blank"&gt;announced that it will remove the Windows Phone apps section from the Zune Desktop client&lt;/a&gt; due to the fact that users mostly access those through the web interface or the mobile client directly on the device. Despite the fact that I do support this change, I know there are also users who might want to keep using the Zune software on their PC to download apps for their Windows Phone.&lt;/p&gt; &lt;p&gt;If you started the Zune client today, you probably saw this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Getting-Windows-Phone-apps-back-into-the_10199/zunescreen_2.png"&gt;&lt;img title="zunescreen" 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="zunescreen" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Getting-Windows-Phone-apps-back-into-the_10199/zunescreen_thumb.png" width="575" height="394"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Here is what’s happening. You are &lt;strong&gt;not actually getting a Zune client update&lt;/strong&gt;, but rather &lt;strong&gt;a configuration update&lt;/strong&gt;. Whenever the Zune software launches, it tries to reach this endpoint:&lt;/p&gt; &lt;p&gt;&lt;a href="http://tuners.zune.net/en-US/ZunePCClient/v4.8/configuration.xml"&gt;http://tuners.zune.net/en-US/ZunePCClient/v4.8/configuration.xml&lt;/a&gt;&lt;/p&gt; &lt;p&gt;That is, if your client version is &lt;strong&gt;4.8&lt;/strong&gt;. For other clients check out the Zune API &lt;a href="http://zunedata.codeplex.com/wikipage?title=PC%20Client%20Configuration" target="_blank"&gt;documentation page I wrote a while ago&lt;/a&gt;. This configuration file has a node called &lt;strong&gt;apps&lt;/strong&gt;, and in the updated version it has the status set to &lt;strong&gt;disabled&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Getting-Windows-Phone-apps-back-into-the_10199/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://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Getting-Windows-Phone-apps-back-into-the_10199/image_thumb.png" width="245" height="306"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The configuration is being cached on each launch, this is why you are getting the alert when the settings change and you need to restart the client. To get the Windows Phone apps back in the desktop client, you need to set the &lt;strong&gt;status&lt;/strong&gt; value to &lt;strong&gt;enabled&lt;/strong&gt;. But how do you intercept the XML file? There are several ways to do it. The easiest one is to use your own mini (or not so mini) web server with the folder structure used by the endpoint to get the configuration. Here is what I did with IIS:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Getting-Windows-Phone-apps-back-into-the_10199/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://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Getting-Windows-Phone-apps-back-into-the_10199/image_thumb_1.png" width="569" height="208"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The configuration.xml file has absolutely the same contents as the original configuration file, with the only difference being the fact that apps are enabled via the method I outlined above.&lt;/p&gt; &lt;p&gt;Now, open your HOSTS file (&lt;em&gt;C:\Windows\System32\drivers\etc&lt;/em&gt;) and add the following line:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;127.0.0.1&amp;nbsp; tuners.zune.net&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Now whenever &lt;strong&gt;tuners.zune.net&lt;/strong&gt; is accessed for the configuration file, the local version will be fetched. If you already updated the configuration to the one disabling Windows Phone 7 apps, restart the Zune client. You will see that you will once again get an alert notifying you that the settings changed. Restart the Zune client once more and voila:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Getting-Windows-Phone-apps-back-into-the_10199/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://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Getting-Windows-Phone-apps-back-into-the_10199/image_thumb_2.png" width="567" height="402"&gt;&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Use at your own risk. I am just guessing that this will be available only till the next full Zune client update.&lt;/p&gt;&lt;/blockquote&gt;</description><pubDate>Wed, 25 Apr 2012 23:34:34 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/getting-windows-phone-apps-back-into-the-zune-desktop-client</guid></item><item><title>On ImagineCup, US Finals in Redmond and Microsoft Student Partners</title><link>http://www.dennisdel.com:80/blog/on-imaginecup-us-finals-in-redmond-and-microsoft-student-partners</link><description>&lt;p&gt;This weekend I got the privilege of attending the Microsoft ImagineCup Unites States Finals in Redmond, WA, right in the middle of the Microsoft campus. Let me tell you right away – I had an amazing time. The people you see there represent the brightest minds passionate about Microsoft technologies from all over the country and world.&lt;/p&gt; &lt;p&gt;Let’s start with the highlight of the event – the ImagineCup finalists:&lt;/p&gt; &lt;p&gt;&lt;b&gt;Software Design&lt;/b&gt;  &lt;ol&gt; &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/50/1335323296/#fbid=moZ9W7PXdt-" target="_blank"&gt;FlashFood&lt;/a&gt; – &lt;em&gt;Arizona State University&lt;/em&gt;  &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/52/1335323296/#fbid=moZ9W7PXdt-" target="_blank"&gt;The Miracle Workers&lt;/a&gt; – &lt;em&gt;Winona State University&lt;/em&gt;  &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/42/1335323296/#fbid=moZ9W7PXdt-" target="_blank"&gt;Physically Kinected&lt;/a&gt; – &lt;em&gt;University of Arkansas, Little Rock&lt;/em&gt;  &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/40/1335323296/#fbid=moZ9W7PXdt-" target="_blank"&gt;KinectMath&lt;/a&gt; – &lt;em&gt;University of Washington, Bothell&lt;/em&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;strong&gt;Game Design - Phone&lt;/strong&gt;  &lt;ol&gt; &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/46/1335323296#fbid=moZ9W7PXdt-" target="_blank"&gt;Drexel Dragons&lt;/a&gt; –&lt;em&gt; Drexel University&lt;/em&gt;  &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/56/1335323296#fbid=moZ9W7PXdt-" target="_blank"&gt;Pigmaster&lt;/a&gt; – &lt;em&gt;UCLA&lt;/em&gt;  &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/48/1335323296#fbid=moZ9W7PXdt-" target="_blank"&gt;Wasabi Ninja&lt;/a&gt; – &lt;em&gt;University of Houston&lt;/em&gt;  &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/47/1335323296#fbid=moZ9W7PXdt-" target="_blank"&gt;Panther Games - Team Alpha&lt;/a&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;–&lt;em&gt; Santa Ana College, Chapman University&lt;/em&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;b&gt;Game Design - Xbox&lt;/b&gt;  &lt;ol&gt; &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/57/1335323296#fbid=moZ9W7PXdt-" target="_blank"&gt;Dr. Fishbowl&lt;/a&gt; – &lt;em&gt;Carnegie Mellon University&lt;/em&gt;  &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/58/1335323296#fbid=moZ9W7PXdt-" target="_blank"&gt;Digital Infinity&lt;/a&gt; – Springbrook High School  &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/43/1335323296#fbid=moZ9W7PXdt-" target="_blank"&gt;Credit/No Credit&lt;/a&gt; – &lt;em&gt;University of Washington, Bothell Campus&lt;/em&gt;  &lt;li&gt;&lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/45/1335323296#fbid=moZ9W7PXdt-" target="_blank"&gt;Zigers&lt;/a&gt; – &lt;em&gt;University of Houston&lt;/em&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;img alt="https://public.bay.livefilestore.com/y1pbUOs1wGsk1MTMKWKE3WZDbU8RDkNBp85oIYq6SBYVpCe0Mgm9GMbawuNAGIE7aMyKs-E-PmFE13SEI9WqRnGyw/99.jpg?psid=1" src="https://public.bay.livefilestore.com/y1pbUOs1wGsk1MTMKWKE3WZDbU8RDkNBp85oIYq6SBYVpCe0Mgm9GMbawuNAGIE7aMyKs-E-PmFE13SEI9WqRnGyw/99.jpg?psid=1" width="532" height="399"&gt;&lt;/p&gt; &lt;p&gt;Also, there was a special award that evening – Windows Azure Award, that was given to &lt;a href="https://msimaginecup-fbchallenge.com/vote/fbapps/tabprojectcontent/41/1335323296/#fbid=moZ9W7PXdt-" target="_blank"&gt;Team Legendairy&lt;/a&gt;. Notable guests were leading the award ceremony – &lt;a href="http://billbuxton.com/" target="_blank"&gt;Bill Buxton&lt;/a&gt;, Principal Researcher at Microsoft Research, and &lt;a href="https://twitter.com/#!/mhindsbo" target="_blank"&gt;Mark Hindsbo&lt;/a&gt;, Vice President of Developer and Platform Evangelism for Microsoft US.&amp;nbsp; It was exciting to see how young developers applied their knowledge for the global good, on pressing issues like child mortality, the availability of food and environmental sustainability.&lt;/p&gt; &lt;p&gt;&lt;img src="https://public.bay.livefilestore.com/y1p9BPNnCW-N00dAULEEKc8iC8FpL-mq76A8cZyT8mJH-kdeYfgyqndTNP0qFqR996UhJD5ZUUSm_gvUrhqETnhSg/97.jpg?psid=1" width="532" height="399"&gt;&lt;/p&gt; &lt;p&gt;Overall, courtesy of Microsoft, the weekend was spent attending finalist presentations, touring Seattle (go on a Duck Tour, highly recommend it) and networking with developers from and outside Microsoft. It’s worth mentioning that some notable Microsoft Student Partners were also in attendance – &lt;a href="https://twitter.com/wilson_to" target="_blank"&gt;Wilson To&lt;/a&gt; (if you are not aware of his last year’s ImagineCup project, &lt;a href="http://www.businessweek.com/magazine/wilson-tos-malaria-test-07282011.html" target="_blank"&gt;check it out right now&lt;/a&gt;), &lt;a href="https://twitter.com/#!/megan_boorsma" target="_blank"&gt;Megan Boorsma&lt;/a&gt; and Ana Parra. I also got a chance to to see fellow Microsoft Student Insiders – &lt;a href="http://www.dreamincode.net/forums/blog/904-its-not-a-bug-but-an-unexpected-feature/" target="_blank"&gt;Ryan Bucinell&lt;/a&gt;, &lt;a href="http://catholictechgeek.blogspot.com/" target="_blank"&gt;Steven Nowak&lt;/a&gt; and &lt;a href="http://sircmpwn.blogspot.com/" target="_blank"&gt;Drew DeVault&lt;/a&gt;. Special thanks go to &lt;a href="https://twitter.com/#!/MaryPerisic" target="_blank"&gt;Mary Perisic&lt;/a&gt; for organizing the trip and offering some awesome Microsoft swag.&lt;/p&gt; &lt;p&gt;I loved the experience - I got to see my good friends at Microsoft and discuss some of the future projects. More exciting news to come before this summer, so stay tuned. Thank you to everyone who made this weekend special!&lt;/p&gt;</description><pubDate>Wed, 25 Apr 2012 04:29:19 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/on-imaginecup-us-finals-in-redmond-and-microsoft-student-partners</guid></item><item><title>Love Electronic Dance Music? Get Beem for Windows Phone</title><link>http://www.dennisdel.com:80/blog/love-electronic-dance-music-get-beem-for-windows-phone</link><description>&lt;p&gt;I am very excited to announce that my weekend hackathon project – &lt;a href="http://beem.dennisdel.com/" target="_blank"&gt;Beem for Windows Phone&lt;/a&gt;, passed certification and is officially available for download in the Windows Phone Marketplace.&lt;/p&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Love-Electronic-Dance-Music-Get-Beem-for_B20A/screen2_2.png"&gt;&lt;img title="screen2" 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="screen2" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Love-Electronic-Dance-Music-Get-Beem-for_B20A/screen2_thumb.png" width="263" height="438"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Love-Electronic-Dance-Music-Get-Beem-for_B20A/screen3_2.png"&gt;&lt;img title="screen3" 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="screen3" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Love-Electronic-Dance-Music-Get-Beem-for_B20A/screen3_thumb.png" width="263" height="438"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;It is a streaming client for &lt;a href="http://www.di.fm/" target="_blank"&gt;DI.FM (Digitally Imported)&lt;/a&gt; – it aggregates data from all the popular stations, including trance, progressive, house and dubstep (and many more, of course). I tried to make it visually consistent with the Zune Player – I am curious to hear whether I succeeded in that task or not.&lt;/p&gt; &lt;p&gt;It can play music in the background and under the lock screen, so you don’t have to keep the application constantly open. &lt;/p&gt; &lt;p&gt;&lt;a href="http://windowsphone.com/s?appid=1bc66496-6941-41e6-876a-2ba818ab0ceb" target="_blank"&gt;&lt;img src="http://dennisdel.com/blog/Media/Default/Page/Download-EN-Med.png"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Let me know if you have any suggestions and ideas!&lt;/p&gt;</description><pubDate>Thu, 12 Apr 2012 14:45:56 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/love-electronic-dance-music-get-beem-for-windows-phone</guid></item><item><title>Update to Windows Phone Control Kit - ZuneCard</title><link>http://www.dennisdel.com:80/blog/update-to-windows-phone-control-kit-ndash-zunecard</link><description>&lt;p&gt;Zune API has been out there for a while &amp;ndash; I &lt;a href="http://channel9.msdn.com/coding4fun/articles/Using-the-Zune-Web-API-on-Windows-Phone-7" target="_blank"&gt;documented it on Coding4Fun&lt;/a&gt; and even &lt;a href="http://zunedata.codeplex.com/" target="_blank"&gt;created a centralized project&lt;/a&gt; with all the known API calls. I like to keep track of my Zune progress, and I like the Zune Card.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Update-to-Windows-Phone-Control-KitZuneC_1FB4/image_2.png"&gt;&lt;img title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" border="0" alt="image" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Update-to-Windows-Phone-Control-KitZuneC_1FB4/image_thumb.png" width="572" height="406" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I implemented the exact copy of the Zune Card that can be used in a Windows Phone Silverlight Application project. The control is a part of the Windows Phone Control Kit and is called &lt;strong&gt;ZuneCard&lt;/strong&gt;. The only property that needs to be specified at design time is &lt;strong&gt;UserID&lt;/strong&gt; &amp;ndash; the Zune tag (conveniently, it is also the Xbox Gamertag, if you have one).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Update-to-Windows-Phone-Control-KitZuneC_1FB4/image_4.png"&gt;&lt;img title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" border="0" alt="image" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Update-to-Windows-Phone-Control-KitZuneC_1FB4/image_thumb_1.png" width="287" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can download it on &lt;a href="https://github.com/dend/WP-ControlKit" target="_blank"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;WARNING:&lt;/strong&gt; The control is currently in testing stage. More functionality will be added and optimized. Use at your own risk.&lt;/p&gt;
&lt;/blockquote&gt;</description><pubDate>Tue, 10 Apr 2012 07:28:18 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/update-to-windows-phone-control-kit-ndash-zunecard</guid></item><item><title>The beginnings of Windows Phone Control Kit - TapMenu and TapMenuItem</title><link>http://www.dennisdel.com:80/blog/wp-controlkit-beginning</link><description>&lt;p&gt;For some situations, the controls that are out there are not enough. That is why I started working on my own control toolkit. As I work on my own applications and feel the need to implement a custom control, I will add it to the Windows Phone Control Kit collection.&lt;/p&gt;
&lt;p&gt;Today, I decided to implement a &amp;ldquo;show-on-tap&amp;rdquo; menu, just like the one you see in the latest version of the Rowi client. My implementation is called &lt;strong&gt;TapMenu&lt;/strong&gt;, and it is a container for &lt;strong&gt;TapMenuButton&lt;/strong&gt; instances.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You can read about the way I implemented this control &lt;a href="http://dotnet.dzone.com/articles/rowi-show-tap-menu?mz=27249-windowsphone7" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Download the source on &lt;a href="https://github.com/dend/WP-ControlKit" target="_blank"&gt;GitHub&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/The-beginnings-of-Windows-Phone-Control-_13D63/Screen%20Capture%20(13)_2.jpg"&gt;&lt;img title="Screen Capture (13)" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="Screen Capture (13)" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/The-beginnings-of-Windows-Phone-Control-_13D63/Screen%20Capture%20(13)_thumb.jpg" border="0" width="266" height="430" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/The-beginnings-of-Windows-Phone-Control-_13D63/Screen%20Capture%20(12)_2.jpg"&gt;&lt;img title="Screen Capture (12)" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="Screen Capture (12)" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/The-beginnings-of-Windows-Phone-Control-_13D63/Screen%20Capture%20(12)_thumb.jpg" border="0" width="266" height="430" /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Mon, 09 Apr 2012 03:47:03 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/wp-controlkit-beginning</guid></item><item><title>Are you a student in the US? Get a free Windows Phone</title><link>http://www.dennisdel.com:80/blog/are-you-a-student-in-the-us-get-a-free-windows-phone</link><description>&lt;p&gt;Paul Betts mentioned on Twitter yesterday that he was looking for a Canada-specific offer, where developers could get free Windows Phone devices. Although I was not aware of anything like that for Canada, there sure is an offer for students in the United States.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Are-you-a-student-in-the-US-Get-a-free-_C0CD/image_6.png"&gt;&lt;img title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="image" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Are-you-a-student-in-the-US-Get-a-free-_C0CD/image_thumb_2.png" border="0" height="114" width="547" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So if you want a free Windows Phone device, you need to make sure that you follow these guidelines:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You are a student in an accredited university/college in the United States&lt;/li&gt;
&lt;li&gt;You have developed two Windows Phone applications that are (or will be) published between &lt;strong&gt;March 26th&lt;/strong&gt; and &lt;strong&gt;May 31st, 2012&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Those apps are targeting Windows Phone 7.5&lt;/li&gt;
&lt;li&gt;Apps support Fast App Switching&lt;/li&gt;
&lt;li&gt;The apps are of high-quality and are not created with one of the &amp;ldquo;do-it-fast&amp;rdquo; tools, like AppMakr or FollowMyFeed&lt;/li&gt;
&lt;li&gt;You have not received a Windows Phone device in previous student promotions from Microsoft&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Full outline of the official rules can be found &lt;a href="http://www.myphpstuff.com/clients/2012/facebook/PDF/Offer for  WP Student App Development Campaign.pdf" target="_blank"&gt;here&lt;/a&gt; ( &lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Are-you-a-student-in-the-US-Get-a-free-_C0CD/ACP_PDF%202_file_document_2.png"&gt;&lt;img title="ACP_PDF 2_file_document" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="ACP_PDF 2_file_document" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Are-you-a-student-in-the-US-Get-a-free-_C0CD/ACP_PDF%202_file_document_thumb.png" border="0" height="16" width="16" /&gt;&lt;/a&gt; &lt;a href="http://get.adobe.com/reader/" target="_blank"&gt;&lt;em&gt;PDF&lt;/em&gt;&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;You can sign up for the promotion &lt;a href="https://www.facebook.com/pages/FB-Window-Phone/310395012360680?sk=app_190322544333196#!/MicrosoftTechStudent/app_190322544333196" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SHAMELESS PLUG:&lt;/strong&gt; If you are signing up, I would really appreciate if you&amp;nbsp;put my name as the referring MSP (&lt;em&gt;Den Delimarsky)&lt;/em&gt;.&lt;/p&gt;</description><pubDate>Fri, 06 Apr 2012 19:08:20 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/are-you-a-student-in-the-us-get-a-free-windows-phone</guid></item><item><title>Porting Visual Studio Achievements for Windows Phone to Windows 8 Article Series</title><link>http://www.dennisdel.com:80/blog/porting-visual-studio-achievements-for-windows-phone-to-windows-8-article-series</link><description>&lt;p&gt;&lt;a href="http://www.windowsphone.com/en-US/apps/1a98ef71-67d3-4acb-b181-1185fdf9888e" target="_blank"&gt;Visual Studio Achievements for Windows Phone&lt;/a&gt; is an &lt;a href="http://vsa.codeplex.com/" target="_blank"&gt;open-source application&lt;/a&gt; that aggregates &lt;a href="http://channel9.msdn.com/achievements/visualstudio" target="_blank"&gt;Channel9 Visual Studio Achievements&lt;/a&gt; to a Windows Phone device (couldn’t have made it more obvious). &lt;/p&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Porting-Visual-Studio-Achievements-for-W_108F0/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://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Porting-Visual-Studio-Achievements-for-W_108F0/image_thumb.png" width="563" height="317"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I ported this application to Windows 8 as a general learning experience and made the notes available for the public. You can familiarize yourself with the process I followed by reading the articles below:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://dotnet.dzone.com/articles/porting-visual-studio"&gt;Porting Visual Studio Achievements for WP to Windows 8 - Layout and basic bindings&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://dotnet.dzone.com/articles/porting-visual-studio-0"&gt;Porting Visual Studio Achievements for WP to Windows 8 - Minor problems and data acquisition&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://dotnet.dzone.com/articles/porting-visual-studio-1"&gt;Porting Visual Studio Achievements for WP to Windows 8 - Getting primary user input&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://dotnet.dzone.com/articles/porting-visual-studio-2"&gt;Porting Visual Studio Achievements for WP to Windows 8 - Serialization and Storage&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://dotnet.dzone.com/articles/porting-visual-studio-3"&gt;Porting Visual Studio Achievements for WP to Windows 8 - Viewing and Sharing&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://dotnet.dzone.com/articles/porting-windows-phone"&gt;Porting a Windows Phone application to Windows 8 - A Look from 10,000 Feet Above&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If you would like to share some feedback and similar experiences, &lt;a href="http://dennisdel.com/blog/contact" target="_blank"&gt;feel free to do so&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Mon, 02 Apr 2012 00:04:06 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/porting-visual-studio-achievements-for-windows-phone-to-windows-8-article-series</guid></item><item><title>Windows Phone Homebrew: The new Samsung Diagnostics app appears to be blocking GPRS profile switching</title><link>http://www.dennisdel.com:80/blog/windows-phone-homebrew-the-new-samsung-diagnostics-app-appears-to-be-blocking-gprs-profile-switching</link><description>&lt;p&gt;If you own a Samsung Windows Phone device, you probably noticed that there is an update available for the stock &lt;strong&gt;Diagnostics&lt;/strong&gt; application. The default build is 1004 and the new one is 0210.&lt;/p&gt;
&lt;p&gt;There is one breaking change that was implemented here that you should be aware of &amp;ndash; once you update to 0210 you &lt;strong&gt;will not be able&lt;/strong&gt; to enter the GPRS profile selection mode.&lt;/p&gt;
&lt;address&gt;&lt;strong&gt;IMPORTANT NOTE:&lt;/strong&gt; It seems like &lt;a href="http://forum.xda-developers.com/showthread.php?t=1561087"&gt;some devices&lt;/a&gt; do not have a problem with the hidden menu.&amp;nbsp;&lt;/address&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Windows-Phone-Homebrew-The-new-Samsung-D_EDD8/Screen%20Capture%20(3)_2.jpg"&gt;&lt;img title="Screen Capture (3)" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" border="0" alt="Screen Capture (3)" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Windows-Phone-Homebrew-The-new-Samsung-D_EDD8/Screen%20Capture%20(3)_thumb.jpg" width="288" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here in the screenshot, I was attempting to type in the code to get to the required page (&lt;strong&gt;*#9908#&lt;/strong&gt;) and the application instantly crashes. This means that if your device is not interop-unlocked (giving access to lower-level drivers with a registry flag), you &lt;strong&gt;won&amp;rsquo;t be able to do so&lt;/strong&gt; because the current methods are tied specifically to the GPRS profile switching capability of the app.&lt;/p&gt;
&lt;p&gt;It doesn&amp;rsquo;t appear to be an internal restriction at the moment &amp;ndash; the layout for the invocation is the same. The Samsung-generated hash code for this command is registered and handled. It might be that there is something missing in the current firmware, or it might be that developers misplaced a native call somewhere.&lt;/p&gt;
&lt;p&gt;Either way &amp;ndash; tested on a Samsung Focus Flash (&lt;strong&gt;7.10.7720.68&lt;/strong&gt; &amp;ndash; FW &lt;strong&gt;2103.11.10.1&lt;/strong&gt;). The new Diagnostics app was automatically delivered through the Marketplace update.&lt;/p&gt;
&lt;p&gt;To revert back to a version of the Diagnostics app that works with the &lt;strong&gt;*#9908#&lt;/strong&gt; command, uninstall the 0201 release and type &lt;strong&gt;##634#&lt;/strong&gt; in the dialer once again. This will revert it to the 1004 build.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you updated your Samsung device to 8107, let me know what model you have and whether the command mentioned above works in the diagnostics app on your build (given that the app is 0201).&lt;/p&gt;
&lt;/blockquote&gt;</description><pubDate>Wed, 28 Mar 2012 01:10:25 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/windows-phone-homebrew-the-new-samsung-diagnostics-app-appears-to-be-blocking-gprs-profile-switching</guid></item><item><title>Windows Phone Emulator in the 7.1.1 SDK - quick insights</title><link>http://www.dennisdel.com:80/blog/windows-phone-emulator</link><description>&lt;h2&gt;RAM Size&lt;/h2&gt;
&lt;p&gt;It appears that the Windows Phone SDK 7.1.1 does not come with two separate OS images for 256MB and 512MB. Instead, it is using the standard DECFG files &lt;a href="http://dotnet.dzone.com/articles/emulator-configuration-windows"&gt;that I documented a while ago&lt;/a&gt; (*.decfg files &lt;a href="http://msdn.microsoft.com/en-us/library/bb531162(v=VS.90).aspx"&gt;come from the Windows CE times&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;In the XDE folder there are now three configuration boards:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_2.png"&gt;&lt;img title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" border="0" alt="image" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_thumb.png" width="566" height="488" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see, there are also two DLL files (&lt;strong&gt;config_board&lt;/strong&gt; and &lt;strong&gt;config_board256&lt;/strong&gt;) that most likely define the OS behaviors on launch. There is only one OS image bundled (that is, one for each OS version &amp;ndash; 7.0 and 7.1):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_4.png"&gt;&lt;img title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" border="0" alt="image" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_thumb_1.png" width="566" height="488" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Modifying the DECFG boards&lt;/h2&gt;
&lt;p&gt;I noticed that modifying the configuration boards does not affect the way the emulator works, unless you want to pass the DECFG board to the XDE as a parameter.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&amp;ldquo;Windows Phone Emulator is doing a complete OS boot&amp;rdquo;&lt;/h2&gt;
&lt;p&gt;If you are launching XDE from the console, you are probably passing a command similar to this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;XDE.exe "C:\Program F&lt;br /&gt;iles (x86)\Microsoft SDKs\Windows Phone\v7.1\Emulation\Images\WM70C1.en-US.bin"&lt;br /&gt;/vmid {cfcdc3d0-b974-49c4-b05c-e4bb033f32f9}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once you do this, you are prompted with the infamous boot screen:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_6.png"&gt;&lt;img title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" border="0" alt="image" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_thumb_2.png" width="264" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That is happening because you are not using one of the built-in states, that are located in &lt;strong&gt;C:\ProgramData\Microsoft\XDE&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_8.png"&gt;&lt;img title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" border="0" alt="image" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_thumb_3.png" width="566" height="387" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Notice the GUIDs that are used for the files here and now look at the GUID that you were trying to pass from the command line. The VMID is tied to these states, and if you want a fast boot, you need to pass one of these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;106DEFF1-7B7E-43EA-969A-4BC6B52DAF9E&lt;/strong&gt; &amp;ndash; BoardID is 1 &amp;ndash; &lt;strong&gt;256MB&lt;/strong&gt; emulator&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;751F92FB-3952-4FA6-B9B8-0E6985C3E5AE&lt;/strong&gt; &amp;ndash; BoardID is 2 &amp;ndash; &lt;strong&gt;512MB&lt;/strong&gt; emulator&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Launching the emulator through Smartdevice.Connectivity&lt;/h2&gt;
&lt;p&gt;This method was &lt;a href="http://dennisdel.com/blog/how-to-access-blacklisted-apps-in-the-windows-phone-emulator-rom-with-the-locked-bin-image"&gt;used by me to access blacklisted applications in the emulator&lt;/a&gt;. If you build that sample application, you will now be able to access three devices on the Windows Phone 7 platform:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_12.png"&gt;&lt;img title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" border="0" alt="image" src="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Win.1-SDK--the-size-is-a-setting-and-not_D699/image_thumb_5.png" width="566" height="125" /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Mon, 26 Mar 2012 21:25:13 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/windows-phone-emulator</guid></item><item><title>Looking at Windows 8 Metro app internals? The path has changed in the Consumer Preview.</title><link>http://www.dennisdel.com:80/blog/looking-at-windows-8-metro-app-internals-the-path-has-changed-in-the-consumer-preview</link><description>&lt;p&gt;Justin Angel put together &lt;a href="http://justinangel.net/ReverseEngineerWin8Apps"&gt;a blog post on reverse engineering Windows 8 applications&lt;/a&gt; and he described the locations of the APPX packages on the local machine. Although working well for the Developer Preview, the application locations are no longer the same in the Consumer Preview. Compare those for yourself:&lt;/p&gt; &lt;p&gt;Consumer Preview:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;C:\Program Files\WindowsApps&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Developer Preview:&lt;/p&gt; &lt;blockquote&gt; &lt;h4&gt;C:\Program Files\Applications&lt;/h4&gt;&lt;/blockquote&gt; &lt;p&gt;By the way, if someone attempts to open the WindowsApps folder with the default user, an error message will be shown with an&lt;strong&gt; Access Denied&lt;/strong&gt; problem. To mitigate this issue, you have to change the owner from &lt;strong&gt;TrustedInstaller&lt;/strong&gt; to the current user (the method described by Justin Angel above works).&lt;/p&gt; &lt;h2&gt;Does changing the owner mean that I won’t be able to install apps from the Marketplace?&lt;/h2&gt; &lt;p&gt;&lt;strong&gt;No.&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;I am deploying my application from Visual Studio 11 Beta. Is it also installed in WindowsApps?&lt;/h2&gt; &lt;p&gt;&lt;strong&gt;No.&lt;/strong&gt;&amp;nbsp; It is located in your project folder: &lt;em&gt;C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\Visual Studio 11\Projects\&amp;lt;SOLUTIONNAME&amp;gt;\&amp;lt;PROJECTNAME&amp;gt;\bin\Debug\AppX&lt;/em&gt;&lt;/p&gt; &lt;p&gt;It is worth mentioning that the package deployed from Visual Studio 11 Beta, although located in a different area of the user disk space, will still be registered in line with all other Metro applications in the Windows Registry:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Looking-at-Windows-8-app-internals-The-_F0E2/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://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Looking-at-Windows-8-app-internals-The-_F0E2/image_thumb.png" width="570" height="292"&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 24 Mar 2012 23:04:58 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/looking-at-windows-8-metro-app-internals-the-path-has-changed-in-the-consumer-preview</guid></item><item><title>Pushing the limits of the Windows Phone SDK and sending files via EmailComposeTask</title><link>http://www.dennisdel.com:80/blog/pushing-the-limits-of-the-windows-phone-sdk-ndash-sending-files-via-emailcomposetask</link><description>&lt;p&gt;It’s almost 4 in the morning, and as with all great ideas, this one came to me while I was working on a completely different project. I was thinking that it is a shame that I cannot attach files to an email via &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.emailcomposetask(v=VS.92).aspx"&gt;EmailComposeTask&lt;/a&gt; – and indeed, I am not the only one thinking about this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Pushing-the-limits-of-the-Windows-Phone-_3345/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://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Pushing-the-limits-of-the-Windows-Phone-_3345/image_thumb.png" width="565" height="203"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;EmailComposeTask&lt;/strong&gt; won’t allow you to send attachments, but this doesn’t mean that you cannot send files through it. .NET Framework has these two amazing methods: &lt;a href="http://msdn.microsoft.com/en-us/library/system.convert.tobase64string.aspx"&gt;Convert.ToBase64String&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/system.convert.frombase64string.aspx"&gt;Convert.FromBase64String&lt;/a&gt;. The first will allow the developer to convert a byte array (&lt;strong&gt;&lt;em&gt;byte[]&lt;/em&gt;&lt;/strong&gt;) to a &lt;a href="http://en.wikipedia.org/wiki/Base64"&gt;Base64&lt;/a&gt;-encoded string, the other one will do the same operation in reverse.&lt;/p&gt; &lt;p&gt;Let’s say that I want to send a picture from my phone. I am going to use &lt;strong&gt;CameraCaptureTask&lt;/strong&gt;:&lt;br&gt;&lt;/p&gt;&lt;pre class="prettyprint lang-css"&gt;Microsoft.Phone.Tasks.CameraCaptureTask task = new Microsoft.Phone.Tasks.CameraCaptureTask();
task.Completed += new EventHandler&lt;microsoft.phone.tasks.photoresult&gt;(task_Completed);
task.Show();&lt;/pre&gt;
&lt;p&gt;Whenever a photo is captured, I have direct access to the resulting stream. What I can do at that point, is get the byte array from it, convert it to Base64 and set is as the body for &lt;strong&gt;EmailComposeTask&lt;/strong&gt;:&lt;/p&gt;&lt;pre class="prettyprint lang-css"&gt;void task_Completed(object sender, Microsoft.Phone.Tasks.PhotoResult e)
{
    int read = 0;
    int part = 0;
    byte[] buffer = new byte[22000];

    while ((read = e.ChosenPhoto.Read(buffer,0,buffer.Length)) &amp;gt; 0)
    {
        Thread.Sleep(10000);

        part++;
        string bsfData = Convert.ToBase64String(buffer);

        Debug.WriteLine(bsfData.Length);

        EmailComposeTask task = new EmailComposeTask();
        task.To = "ddelimarsky@live.com";
        task.Subject = "Part " + part.ToString();
        task.Body = bsfData;
        task.Show();
    }

}&lt;/pre&gt;
&lt;p&gt;A couple of stress points here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There is a content length restriction currently set to 64k (for the message body), therefore I have to split the entire captured byte array in chunks that are ready to be sent out. If ignored, the following exception is thrown:&lt;br&gt;&lt;br&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Pushing-the-limits-of-the-Windows-Phone-_3345/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://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Pushing-the-limits-of-the-Windows-Phone-_3345/image_thumb_1.png" width="348" height="272"&gt;&lt;/a&gt; 
&lt;li&gt;This ultimately creates a multi-part email (read: 22 parts for a 2 megapixel photo). 
&lt;li&gt;The &lt;strong&gt;&lt;em&gt;Thread.Sleep(10000)&lt;/em&gt;&lt;/strong&gt; creates a lag of 10 seconds between &lt;strong&gt;EmailComposeTask&lt;/strong&gt; invocations, because there is no completion notifier event handler for this specific task type. The user has to quickly hit send in this case. 
&lt;li&gt;Without a sleeping thread, I get this:&lt;br&gt;&lt;br&gt;&lt;a href="http://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Pushing-the-limits-of-the-Windows-Phone-_3345/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://dennisdel.com/blog/Media/Default/Windows-Live-Writer/Pushing-the-limits-of-the-Windows-Phone-_3345/image_thumb_2.png" width="450" height="251"&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Once all parts are sent out, on the receiving end a simple console application like this will perform the Base64-to-content conversion:&lt;/p&gt;&lt;pre class="prettyprint lang-css"&gt;using System;
using System.IO;

namespace AttachFileReader
{
    class Program
    {
        static void Main(string[] args)
        {
            string customParameter = args[0];
            string inputPath = args[1];
            string outputPath = args[2];

            switch (customParameter)
            {
                case "c":
                    {
                        if (!string.IsNullOrWhiteSpace(inputPath))
                        {
                            if (!string.IsNullOrWhiteSpace(outputPath))
                            {
                                try
                                {
                                    using (MemoryStream stream = new MemoryStream())
                                    {
                                        string data = File.ReadAllText(inputPath);
                                        string[] content = data.Split(new char[] { '=' });

                                        foreach (string d in content)
                                        {
                                            string unit = d;
                                            unit = d.Replace("=", "");
                                            unit += "=";

                                            Console.WriteLine(unit.Length);
                                            if (unit.Length &amp;gt; 1)
                                            {
                                                byte[] byteData = Convert.FromBase64String(unit);
                                                stream.Write(byteData, 0, byteData.Length);
                                            }
                                        }
                                        File.WriteAllBytes(outputPath, stream.ToArray());
                                        Console.WriteLine("Successfully saved to " + outputPath);
                                    }
                                }
                                catch (Exception ex)
                                {
                                    Console.WriteLine("Oh snap! Something went wrong. Will this message help you?");
                                    Console.WriteLine(ex.Message);
                                }
                            }
                            else
                            {
                                Console.WriteLine("Missing parameter - index 1");
                            }
                        }
                        else
                        {
                            Console.WriteLine("Missing parameter - index 0");
                        }
                        break;
                    }
                default:
                    {
                        Console.WriteLine("Windows Phone Attached Email Reader v.1.0\nDeveloped by Den Delimarsky.");
                        break;
                    }
            }
        }
    }
}
&lt;/pre&gt;
&lt;p&gt;The first argument passed to the application is &lt;strong&gt;c&lt;/strong&gt; for &lt;strong&gt;conversion&lt;/strong&gt;. The second argument is the path to the text file that contains the concatenated Base64 strings. This, obviously, can be automated or be done manually. The third and last argument shows the output path.&lt;/p&gt;
&lt;p&gt;The composite string is being broken down in chunks once again, and every single one of them is decode and written to a &lt;a href="http://msdn.microsoft.com/en-us/library/system.io.memorystream.aspx"&gt;MemoryStream&lt;/a&gt; instance, that works well for byte array merging, especially in a situation where I am writing those sequentially. &lt;/p&gt;
&lt;p&gt;The byte array obtained from MemoryStream is later saved to a file.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; jpg is used as a sample extension. It can be any other extension as long as the correct file format is being sent out.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is more of a for-fun observation than a viable option for sending files. You might want to consider these choices for applications that go public:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;send data to a web service that forwards the file to an email address&lt;/li&gt;
&lt;li&gt;use a cloud storage system and upload files there directly&lt;/li&gt;
&lt;li&gt;implement the email transmission protocol independently (think about System.Net.Mail)&lt;/li&gt;&lt;/ul&gt;</description><pubDate>Sat, 24 Mar 2012 09:45:08 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/pushing-the-limits-of-the-windows-phone-sdk-ndash-sending-files-via-emailcomposetask</guid></item><item><title>TCP-based sockets on Windows Phone with support for large amounts of data</title><link>http://www.dennisdel.com:80/blog/tcp-based-sockets-on-windows-phone-with-support-for-large-amounts-of-data</link><description>&lt;p&gt;Network communication through sockets is a welcome addition to the Windows Phone platform. Personally, I enjoy using those because of the tremendous performance gain compared to WCF services. One topic, however, seems to be rarely covered when it comes to TCP-based communication between the server (presumably running on a desktop machine) and the client (Windows Phone) = transmission of large amounts of data.&lt;/p&gt;
&lt;p&gt;A lot of existing samples assume that the communication, although bi-directional, is done with small data units. For example, &lt;a href="http://msdn.microsoft.com/en-us/library/5w7b7x5f.aspx"&gt;here is a pretty good sample&lt;/a&gt; that I used to build the asynchronous server. The reading callback looks like this:&lt;/p&gt;
&lt;pre class="prettyprint lang-css"&gt;public static void readCallback(IAsyncResult ar) {
    StateObject state = (StateObject) ar.AsyncState;
    Socket handler = state.WorkSocket;

    // Read data from the client socket.
    int read = handler.EndReceive(ar);

    // Data was read from the client socket.
    if (read &amp;gt; 0) {
        state.sb.Append(&lt;br /&gt;             Encoding.ASCII.GetString(state.buffer,0,read));
        handler.BeginReceive(state.buffer,0,&lt;br /&gt;             StateObject.BufferSize, 0,
            new AsyncCallback(readCallback), state);
    } else {
        if (state.sb.Length &amp;gt; 1) {
            // All the data has been read from the client;
            // display it on the console.
            string content = state.sb.ToString();
            Console.WriteLine(content);
        }
        handler.Close();
    }
}&lt;/pre&gt;
&lt;p&gt;It works perfectly fine on the desktop machine. I am also adding a terminator verification statement that allows me to check whether the whole data set was received:&lt;/p&gt;
&lt;p&gt;public void ReadCallback(IAsyncResult ar)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StateObject state = (StateObject)ar.AsyncState;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Socket handler = state.WorkSocket;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int bytesRead = handler.EndReceive(ar);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (bytesRead &amp;gt; 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string contentString =&lt;/p&gt;
&lt;p&gt;Encoding.UTF8.GetString(state.buffer, 0, bytesRead);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (state.buffer[bytesRead - 1] != terminator[0])&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state.ContentString.Append(contentString);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler.BeginReceive(state.buffer, 0, StateObject.BUFFER_SIZE,&lt;/p&gt;
&lt;p&gt;0, new AsyncCallback(ReadCallback), state);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contentString = contentString.Replace(terminator, "");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state.ContentString.Append(contentString);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Although seemingly simple, the data receiving process on a Windows Phone is handled in a different manner. There is no direct implementation of &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.beginreceive.aspx"&gt;Socket.BeginReceive&lt;/a&gt;. Instead, developers work with &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.receiveasync(v=vs.95).aspx"&gt;Socket.ReceiveAsync&lt;/a&gt;. Many samples give you this piece of code:&lt;/p&gt;
&lt;p&gt;public string Receive()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; string response = "Operation Timeout";&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (_socket != null)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SocketAsyncEventArgs socketEventArg = new SocketAsyncEventArgs();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socketEventArg.RemoteEndPoint = _socket.RemoteEndPoint;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socketEventArg.SetBuffer(new Byte[MAX_BUFFER_SIZE],&lt;/p&gt;
&lt;p&gt;0, MAX_BUFFER_SIZE);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socketEventArg.Completed += &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new EventHandler&amp;lt;SocketAsyncEventArgs&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (delegate(object s, SocketAsyncEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.SocketError == SocketError.Success)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = Encoding.UTF8.GetString(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Buffer, e.Offset, e.BytesTransferred);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = response.Trim('\0');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = e.SocketError.ToString();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientDone.Set();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientDone.Reset();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; socket.ReceiveAsync(socketEventArg);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientDone.WaitOne(TIMEOUT_MILLISECONDS);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = "Socket is not initialized";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return response;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Notice the problem with this snippet. Once the string is received, that will be it. The inbound data length will be limited to the size of the buffer, and the maximum chunk size. The buffer size cannot always be fixed, and it is safe to assume that the developer does not want to allocate too much space for that in one iteration. The default socket chuck size cannot always be accommodated either.&lt;/p&gt;
&lt;p&gt;The resolution comes in a continuous invocation of&amp;nbsp; &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.receiveasync(v=vs.95).aspx"&gt;Socket.ReceiveAsync&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;private void ProcessReceive(SocketAsyncEventArgs e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.SocketError == SocketError.Success)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Socket sock = e.UserToken as Socket;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string dataFromServer =&lt;/p&gt;
&lt;p&gt;Encoding.UTF8.GetString(e.Buffer, 0, e.BytesTransferred);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (dataFromServer.EndsWith(terminator))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataFromServer = dataFromServer.Replace(terminator, "");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; builder.Append(dataFromServer);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sock.Shutdown(SocketShutdown.Send);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sock.Close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientDone.Set();&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; builder.Append(dataFromServer);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sock.ReceiveAsync(e);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientDone.Set();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new SocketException((int)e.SocketError);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Here is where the terminator character plays a major role. Look at&lt;strong&gt;&lt;em&gt; if (dataFromServer.EndsWith(terminator)) &amp;ndash; &lt;/em&gt;&lt;/strong&gt;that is the flag that shows whether more data is coming or not. With a receiving structure like I showed above, it is possible to keep receiving data until the connection is closed (happens all the time) or the terminator character is detected.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you are wondering what terminator character to use, try going with non-standard ones. For example, &lt;em&gt;&lt;strong&gt;\u00BE&lt;/strong&gt;.&lt;/em&gt; Otherwise, chances are that the actual &amp;ldquo;terminator&amp;rdquo; is not the terminating character.&lt;/p&gt;
&lt;/blockquote&gt;</description><pubDate>Sat, 24 Mar 2012 09:16:48 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/tcp-based-sockets-on-windows-phone-with-support-for-large-amounts-of-data</guid></item><item><title>Setting up a network capture box with Ubuntu and Wireshark</title><link>http://www.dennisdel.com:80/blog/net-capture-ubuntu</link><description>&lt;p&gt;For a college project I had to set up an Ubuntu box and work on a network analysis assignment. I worked with this kind of tasks on Windows, and got some pretty interesting results by sniffing &lt;a href="http://dennisdel.com/blog/how-to-get-wp7-sized-bing-wallpapers"&gt;Windows Phone&lt;/a&gt;, &lt;a href="http://dennisdel.com/blog/xbox-api"&gt;Xbox&lt;/a&gt; and &lt;a href="http://dennisdel.com/blog/windows-8-app-store-ndash-the-appx-download-api-is-secure"&gt;Windows 8&lt;/a&gt; traffic with Wireshark. Ubuntu is a new environment for me, and I figured that the actual capture process is set a bit differently.&lt;/p&gt;
&lt;p&gt;I downloaded Wireshark, but was greeted with this:&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/Media/Default/BlogPost/den-by-default/net-capture-ubuntu/48.png" alt="" width="600" height="364" /&gt;&lt;/p&gt;
&lt;p&gt;There are no interfaces I could capture data on. With a little research, I found out that it is, in fact, a built in restriction. When Wireshark is running outside the administrative sandbox, without root permissions, it won't allow the user to capture data on any of the registered network interfaces. So what are the options?&lt;/p&gt;
&lt;p&gt;First and foremost it is still possible to use the &lt;strong&gt;dumpcap&lt;/strong&gt; tool. Open the Terminal (Ctrl+ALT+T) and type in &lt;strong&gt;dumpcap -i NAME_OF_THE_INTERFACE&lt;/strong&gt;. Depending on individual system configurations, there might be a different number of network interfaces. To make sure that you are capturing on the right one, use the &lt;strong&gt;ifconfig&lt;/strong&gt; command. That will give you a list of registered interfaces.&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/Media/Default/BlogPost/den-by-default/net-capture-ubuntu/53.png" alt="" width="600" height="385" /&gt;&lt;/p&gt;
&lt;p&gt;In my case, the computer was connected to a wireless network, so I had to monitor the &lt;strong&gt;wlan0&lt;/strong&gt; interface.&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/Media/Default/BlogPost/den-by-default/net-capture-ubuntu/30.png" alt="" width="600" height="385" /&gt;&lt;/p&gt;
&lt;p&gt;The file that is captured is a PCAP-formatted entity, so it can be easily analyzed in Wireshark. A problem appeared when I tried to open the file, however.&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/Media/Default/BlogPost/den-by-default/net-capture-ubuntu/27.png" alt="" width="451" height="143" /&gt;&lt;/p&gt;
&lt;p&gt;When dumpcap was ran, it was elevated - remember the sudo prefix. This means that the file created will also be only accessible with elevated permissions. I ran Wireshark from the Terminal - &lt;strong&gt;sudo wireshark&lt;/strong&gt;. I was able to read the file, as well as see the available capture interfaces:&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/Media/Default/BlogPost/den-by-default/net-capture-ubuntu/15.png" alt="" width="600" height="364" /&gt;&lt;/p&gt;
&lt;p&gt;This is one way to make capture easier, by the way. If you are absolutely sure about the people who are using a specific machine and want to enable capture without elevated permissions, run &lt;strong&gt;sudo dpkg-reconfigure wireshark-common&lt;/strong&gt;. You will be prompted with a security dialog:&lt;/p&gt;
&lt;p&gt;&lt;img src="/blog/Media/Default/BlogPost/den-by-default/net-capture-ubuntu/11.png" alt="" width="600" height="385" /&gt;&lt;/p&gt;
&lt;address&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Make sure you are aware of the security implications that come with this decision.&lt;/address&gt;</description><pubDate>Fri, 23 Mar 2012 03:07:37 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/net-capture-ubuntu</guid></item><item><title>See me on Dream.In.Code TV - talking about my work as an admin</title><link>http://www.dennisdel.com:80/blog/dic-tv</link><description>&lt;p&gt;Last week I had a chance to be a part of a Dream.In.Code community event, specifically the Dream.In.Code TV. &lt;a href="http://www.andreburdette.com/"&gt;Andre Burdette&lt;/a&gt;, a good friend of mine, took the initiative of creating a show for an about the developer community he is a part of. He was kind enough to make me the first guest (ever), so I had to live up to some expectations from the viewers.&lt;/p&gt;
&lt;p&gt;I discuss some of the behind-the-scenes aspects of my work as an admin, as well as some of my projects.&lt;/p&gt;
&lt;p&gt;You can watch the recording of the live conversation here:&lt;/p&gt;
&lt;p&gt;&lt;iframe height="315" src="http://www.youtube.com/embed/zwg-WOENTVk" frameborder="0" width="560" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/p&gt;</description><pubDate>Tue, 20 Mar 2012 22:15:49 GMT</pubDate><guid isPermaLink="true">http://www.dennisdel.com:80/blog/dic-tv</guid></item></channel></rss>
