<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Of Kings and Cabbage</title>
    <link>http://blog.opennetcf.com/afeinman/</link>
    <description>Compact Framework Musings. Alex Feinman's web log</description>
    <copyright>Alex Feinman</copyright>
    <lastBuildDate>Fri, 31 Oct 2008 05:37:08 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.8.5223.2</generator>
    <managingEditor>alex@remuv-this-no-spam.alexfeinman.com</managingEditor>
    <webMaster>alex@remuv-this-no-spam.alexfeinman.com</webMaster>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=53972c15-271d-47aa-9461-f7f05200c93c</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,53972c15-271d-47aa-9461-f7f05200c93c.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,53972c15-271d-47aa-9461-f7f05200c93c.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=53972c15-271d-47aa-9461-f7f05200c93c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Calibri" size="3">This is the third post in the series on accessing Live
      Services from Compact .NET Framework applications. So far we have covered </font>
          <a href="http://blog.opennetcf.com/afeinman/PermaLink,guid,80ea4a1d-fbc0-485d-a088-fb8f30efb6ab.aspx">
            <font face="Calibri" size="3">authentication </font>
          </a>
          <font face="Calibri" size="3">and </font>
          <a href="http://blog.opennetcf.com/afeinman/PermaLink,guid,15855efe-824d-4c23-b5d0-b6ff241447cf.aspx">
            <font face="Calibri" size="3">Live
      Contacts</font>
          </a>
          <font face="Calibri" size="3">. The next service we are going to
      discuss is Live Photos. </font>
        </p>
        <p>
          <font face="Calibri" size="3">There are 2 separate APIs available for working with
      Live Photos. One is</font>
          <a href="http://msdn.microsoft.com/en-us/library/cc302759.aspx">
            <font face="Calibri" size="3"> WebDAV-based </font>
          </a>
          <font face="Calibri" size="3">and
      the other is </font>
          <a href="http://msdn.microsoft.com/en-us/library/cc304575.aspx" target="_blank">
            <font face="Calibri" size="3">ATOM
      API</font>
          </a>
          <font face="Calibri" size="3">. While both can be used successfully
      to upload photos, create albums etc, WebDAV is generally considered to be deprecated
      in favor of more modern SOAP APIs such as </font>
          <a href="http://tools.ietf.org/html/rfc5023">
            <font face="Calibri" size="3">ATOM
      Publishing Protocol</font>
          </a>
          <font face="Calibri" size="3">.</font>
        </p>
        <p>
          <font face="Calibri" size="3">Photo ATOM documentation tells us that the format of
      the ATOM request for Photo access is as follows:</font>
        </p>
        <p>
          <font face="Calibri" size="3">[METHOD] /[path to resource] HTTP/1.1 
      <br />
      Host: cumulus.services.live.com 
      <br />
      User-Agent: [Name of the user agent, typically the client app or service.] 
      <br />
      Authentication: DelegatedToken dt="[delegation token]"</font>
        </p>
        <p>
          <font face="Calibri" size="3">We are going to use it with one modification. Instead
      of <em>Authentication: DelegatedToken dt="[delegation token]"</em> we will
      add <em>Authorization: WLID1.0 t="[auth token]"</em>.</font>
        </p>
        <p>
          <font face="Calibri" size="3">Similar to what we have done previously, the [path to
      resource] part is constructed as /[live ID]/[Service]/[Path to item] where [live ID]
      is the WLID of the current account (e.g. </font>
          <a href="mailto:someone@live.com">
            <font face="Calibri" size="3">someone@live.com</font>
          </a>
          <font face="Calibri" size="3">),
      [service] is AtomSpacesPhotos and [Path to item] is a combination of Album and Photo
      identifier. And example of a folder URL: 
      <br /></font>
          <a href="https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders(231">
            <font face="Calibri" size="3">https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders(231</font>
          </a>
          <font face="Calibri" size="3">)</font>
        </p>
        <p>
          <font face="Calibri" size="3">An example of a photo URL: 
      <br /></font>
          <a href="https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders(196)/Photos(200)/$value">
            <font face="Calibri" size="3">https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders(196)/Photos(200)/$value</font>
          </a>
          <font face="Calibri" size="3">
            <br />
      This one has content type image/jpeg. It returns image binary stream in jpeg format.
      An HTTP POST to the above url with the request body set to the image binary stream
      and content type set to image/jpeg will update the image.</font>
        </p>
        <p>
          <font face="Calibri" size="3">To retrieve a list of all top-level folders use </font>
          <a href="https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders">
            <font face="Calibri" size="3">https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders</font>
          </a>
          <font face="Calibri" size="3">.</font>
        </p>
        <p>
          <font face="Calibri" size="3">[this is work in progress. to be continued. code samples
      coming shortly]</font>
        </p>
        <img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=53972c15-271d-47aa-9461-f7f05200c93c" />
      </body>
      <title>Accessing Windows Live Services from Compact .NET Framework applications - Part III, Photos and Storage</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,53972c15-271d-47aa-9461-f7f05200c93c.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,53972c15-271d-47aa-9461-f7f05200c93c.aspx</link>
      <pubDate>Fri, 31 Oct 2008 05:37:08 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;font face="Calibri" size="3"&gt;This is the third post in the series on accessing Live
   Services from Compact .NET Framework applications. So far we have covered &lt;/font&gt;&lt;a href="http://blog.opennetcf.com/afeinman/PermaLink,guid,80ea4a1d-fbc0-485d-a088-fb8f30efb6ab.aspx"&gt;&lt;font face="Calibri" size="3"&gt;authentication &lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;and &lt;/font&gt;&lt;a href="http://blog.opennetcf.com/afeinman/PermaLink,guid,15855efe-824d-4c23-b5d0-b6ff241447cf.aspx"&gt;&lt;font face="Calibri" size="3"&gt;Live
   Contacts&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;. The next service we are going to
   discuss is Live Photos. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Calibri" size="3"&gt;There are 2 separate APIs available for working with
   Live Photos. One is&lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc302759.aspx"&gt;&lt;font face="Calibri" size="3"&gt; WebDAV-based &lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;and
   the other is &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc304575.aspx" target="_blank"&gt;&lt;font face="Calibri" size="3"&gt;ATOM
   API&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;. While both can be used successfully
   to upload photos, create albums etc, WebDAV is generally considered to be deprecated
   in favor of more modern SOAP APIs such as &lt;/font&gt;&lt;a href="http://tools.ietf.org/html/rfc5023"&gt;&lt;font face="Calibri" size="3"&gt;ATOM
   Publishing Protocol&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Calibri" size="3"&gt;Photo ATOM documentation tells us that the format of
   the ATOM request for Photo access is as follows:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Calibri" size="3"&gt;[METHOD] /[path to resource] HTTP/1.1 
   &lt;br /&gt;
   Host: cumulus.services.live.com 
   &lt;br /&gt;
   User-Agent: [Name of the user agent, typically the client app or service.] 
   &lt;br /&gt;
   Authentication: DelegatedToken dt=&amp;quot;[delegation token]&amp;quot;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Calibri" size="3"&gt;We are going to use it with one modification. Instead
   of &lt;em&gt;Authentication: DelegatedToken dt=&amp;quot;[delegation token]&amp;quot;&lt;/em&gt; we will
   add &lt;em&gt;Authorization: WLID1.0 t=&amp;quot;[auth token]&amp;quot;&lt;/em&gt;.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Calibri" size="3"&gt;Similar to what we have done previously, the [path to
   resource] part is constructed as /[live ID]/[Service]/[Path to item] where [live ID]
   is the WLID of the current account (e.g. &lt;/font&gt;&lt;a href="mailto:someone@live.com"&gt;&lt;font face="Calibri" size="3"&gt;someone@live.com&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;),
   [service] is AtomSpacesPhotos and [Path to item] is a combination of Album and Photo
   identifier. And example of a folder URL: 
   &lt;br /&gt;
   &lt;/font&gt;&lt;a href="https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders(231"&gt;&lt;font face="Calibri" size="3"&gt;https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders(231&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;)&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Calibri" size="3"&gt;An example of a photo URL: 
   &lt;br /&gt;
   &lt;/font&gt;&lt;a href="https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders(196)/Photos(200)/$value"&gt;&lt;font face="Calibri" size="3"&gt;https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders(196)/Photos(200)/$value&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt; 
   &lt;br /&gt;
   This one has content type image/jpeg. It returns image binary stream in jpeg format.
   An HTTP POST to the above url with the request body set to the image binary stream
   and content type set to image/jpeg will update the image.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Calibri" size="3"&gt;To retrieve a list of all top-level folders use &lt;/font&gt;&lt;a href="https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders"&gt;&lt;font face="Calibri" size="3"&gt;https://cumulus.services.live.com/someone@live.com/AtomSpacesPhotos/Folders&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font face="Calibri" size="3"&gt;[this is work in progress. to be continued. code samples
   coming shortly]&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=53972c15-271d-47aa-9461-f7f05200c93c" /&gt;</description>
      <comments>http://blog.opennetcf.com/afeinman/CommentView,guid,53972c15-271d-47aa-9461-f7f05200c93c.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=15855efe-824d-4c23-b5d0-b6ff241447cf</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,15855efe-824d-4c23-b5d0-b6ff241447cf.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,15855efe-824d-4c23-b5d0-b6ff241447cf.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=15855efe-824d-4c23-b5d0-b6ff241447cf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Now that we know how to acquire authentication ticket from Windows Live, we can put
      it to work accessing the user's contact list. In general a number of requests to the
      Live Services follow a common pattern. It is an HTTP(s) request to <font color="#a31515" size="2"><font color="#a31515" size="2"><a href="https://cumulus.services.live.com/{user identity}/{Service}/">https://cumulus.services.live.com/{user
      identity}/{Service}/</a></font></font></p>
        <p>
          <font color="#a31515" size="2">
            <font color="#a31515" size="2">Depending on the operation
      the request could be GET, PUT, DELETE, POST or other. User identity is the email address
      that is the Windows Live ID. Service can be one of the supported services. E.g. for
      contacts it is <em>LiveContacts</em>.</font>
          </font>
        </p>
        <p>
          <font color="#a31515" size="2">
            <font color="#a31515" size="2">In order to provide
      the authentication ticket to the server the caller needs to include a custom HTTP
      header - "Authorization" and set its value to WLID1.0 t="{base64 auth ticket}" where
      {base64 auth ticket} is <a href="http://blog.opennetcf.com/afeinman/PermaLink,guid,80ea4a1d-fbc0-485d-a088-fb8f30efb6ab.aspx">the
      ticket retrieved from the authentication server</a>.</font>
          </font>
        </p>
        <font color="#a31515" size="2">
          <font color="#a31515" size="2">
            <p>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> url <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"https://cumulus.services.live.com/{0}/LiveContacts/"</span>;<br />
      url <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span>.Format(url,
      userID);<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> result <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> SendHttpRequest(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ref</span> url, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span>.Format(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"WLID1.0
      t=\"{0}\""</span>,ticket), <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"GET"</span>,
      System.Net.HttpStatusCode.OK, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">""</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">""</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">""</span>);<br />
      XmlDocument docContacts <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> XmlDocument();<br />
      docContacts.LoadXml(result);</span>
            </p>
            <p>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <font face="Verdana" size="2">The
      code above will retrieve the entire contact list as described <a href="http://msdn.microsoft.com/en-us/library/bb463933.aspx">here</a>.</font>
              </span>
            </p>
            <p>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <font face="Verdana" size="2">In
      order to create a contact, a POST to <a href="https://cumulus.services.live.com/{user identity}/LiveContacts/">https://cumulus.services.live.com/{user
      identity}/LiveContacts/</a>Contacts is required. The post contents should be an xml
      message formatted in accordance with Live contacts schema and having appropriate fields
      filled in. It is wort mentioning that WindowsLiveID field is not just an email address.
      It has to be a valid Live ID. Another thing to keep in mind is that almost any content-related
      error will cause HTTP code 403 (supposedly, for security reasons).</font>
              </span>
            </p>
            <p>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <font face="Verdana" size="2">To
      delete a contact a DELETE verb is used. In order to indetify the contact being deleted
      or updated the application should use contact GUID provided in the ID tag:</font>
              </span>
            </p>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <font color="#0000ff">
                <font color="#0000ff">
                  <p>
                    <font size="2">&lt;</font>
                  </p>
                </font>
              </font>
              <font color="#a31515">
                <font color="#a31515" size="2">Contact</font>
              </font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
      &lt;</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">ID</font>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&gt;</font>
                </font>
                <font color="#0000ff">
                  <strong>ead5572c-9c61-43a2-b71f-f2412e283598</strong>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&lt;/</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">ID</font>
                </font>
              </font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
      &lt;</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">AutoUpdateEnabled</font>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&gt;</font>
                </font>false<font color="#0000ff"><font color="#0000ff">&lt;/</font></font><font color="#a31515"><font color="#a31515">AutoUpdateEnabled</font></font></font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
      &lt;</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">LastChanged</font>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&gt;</font>
                </font>2007-11-19T20:26:57.2230000Z<font color="#0000ff"><font color="#0000ff">&lt;/</font></font><font color="#a31515"><font color="#a31515">LastChanged</font></font></font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
      &lt;</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">Profiles</font>
                </font>
              </font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
         &lt;</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">Personal</font>
                </font>
              </font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
            &lt;</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">FirstName</font>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&gt;</font>
                </font>Alex<font color="#0000ff"><font color="#0000ff">&lt;/</font></font><font color="#a31515"><font color="#a31515">FirstName</font></font></font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
            &lt;</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">LastName</font>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&gt;</font>
                </font>Feinman<font color="#0000ff"><font color="#0000ff">&lt;/</font></font><font color="#a31515"><font color="#a31515">LastName</font></font></font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
            </font>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&lt;</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">Gender</font>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&gt;</font>
                </font>Male<font color="#0000ff"><font color="#0000ff">&lt;/</font></font><font color="#a31515"><font color="#a31515">Gender</font></font></font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
         </font>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&lt;/</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">Personal</font>
                </font>
              </font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br />
      &lt;/</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">Profiles</font>
                </font>
              </font>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">&gt;<br /></font>
                </font>
                <font color="#0000ff">
                  <font color="#0000ff">&lt;/</font>
                </font>
                <font color="#a31515">
                  <font color="#a31515">Contact</font>
                </font>
              </font>
              <font color="#0000ff">
                <font color="#0000ff">
                  <font size="2">&gt;</font>
                  <p>
                    <font face="Verdana" color="#000000" size="2">The post url will look like this:</font>
                  </p>
                  <font face="Verdana" color="#000000">
                  </font>
                  <font color="#a31515">
                    <font color="#a31515">
                      <p>
                        <a href="https://cumulus.services.live.com/someone@example.com/LiveContacts/contacts/Contact(ead5572c-9c61-43a2-b71f-f2412e283598">
                          <font size="2">https://cumulus.services.live.com/someone@example.com/LiveContacts/contacts/Contact(<strong><font color="#0000ff">ead5572c-9c61-43a2-b71f-f2412e283598
      </font></strong></font>
                        </a>
                      </p>
                    </font>)</font>
                  <p>
                  </p>
                </font>
              </font>
            </span>
          </font>
        </font>
        <font face="Verdana" size="2">Same url format is using for updates.
   Keep in mind that to update data you need to use PUT verb.</font>
        <br />
        <img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=15855efe-824d-4c23-b5d0-b6ff241447cf" />
      </body>
      <title>Accessing Windows Live Services from Compact .NET Framework applications - Part II, Contacts</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,15855efe-824d-4c23-b5d0-b6ff241447cf.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,15855efe-824d-4c23-b5d0-b6ff241447cf.aspx</link>
      <pubDate>Wed, 29 Oct 2008 17:41:37 GMT</pubDate>
      <description>&lt;p&gt;
   Now that we know how to acquire authentication ticket from Windows Live, we can put
   it to work accessing the user's contact list. In general a number of requests to the
   Live Services follow a common pattern. It is an HTTP(s) request to &lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;&lt;a href="https://cumulus.services.live.com/{user identity}/{Service}/"&gt;https://cumulus.services.live.com/{user
   identity}/{Service}/&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;Depending on the operation the
   request could be GET, PUT, DELETE, POST or other. User identity is the email address
   that is the Windows Live ID. Service can be one of the supported services. E.g. for
   contacts it is &lt;em&gt;LiveContacts&lt;/em&gt;.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;In order to provide the authentication
   ticket to the server the caller needs to include a custom HTTP header - "Authorization"
   and set its value to WLID1.0 t="{base64 auth ticket}" where {base64 auth ticket} is &lt;a href="http://blog.opennetcf.com/afeinman/PermaLink,guid,80ea4a1d-fbc0-485d-a088-fb8f30efb6ab.aspx"&gt;the
   ticket retrieved from the authentication server&lt;/a&gt;.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt; 
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; url &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"https://cumulus.services.live.com/{0}/LiveContacts/"&lt;/span&gt;;&lt;br&gt;
   url &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt;.Format(url,
   userID);&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; result &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; SendHttpRequest(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ref&lt;/span&gt; url, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt;.Format(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"WLID1.0
   t=\"{0}\""&lt;/span&gt;,ticket), &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"GET"&lt;/span&gt;,
   System.Net.HttpStatusCode.OK, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;""&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;""&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;""&lt;/span&gt;);&lt;br&gt;
   XmlDocument docContacts &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; XmlDocument();&lt;br&gt;
   docContacts.LoadXml(result);&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;The
   code above will retrieve the entire contact list as described &lt;a href="http://msdn.microsoft.com/en-us/library/bb463933.aspx"&gt;here&lt;/a&gt;.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;In
   order to create a contact, a POST to &lt;a href="https://cumulus.services.live.com/{user identity}/LiveContacts/"&gt;https://cumulus.services.live.com/{user
   identity}/LiveContacts/&lt;/a&gt;Contacts is required. The post contents should be an xml
   message formatted in accordance with Live contacts schema and having appropriate fields
   filled in. It is wort mentioning that WindowsLiveID field is not just an email address.
   It has to be a valid Live ID. Another thing to keep in mind is that almost any content-related
   error will cause HTTP code 403 (supposedly, for security reasons).&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;To
   delete a contact a DELETE verb is used. In order to indetify the contact being deleted
   or updated the application should use contact GUID provided in the ID tag:&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt; 
&lt;p&gt;
   &lt;font size=2&gt;&amp;lt;&lt;/font&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515 size=2&gt;Contact&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;ID&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;strong&gt;ead5572c-9c61-43a2-b71f-f2412e283598&lt;/strong&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;ID&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;AutoUpdateEnabled&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;false&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;AutoUpdateEnabled&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;LastChanged&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;2007-11-19T20:26:57.2230000Z&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;LastChanged&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;Profiles&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;Personal&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;FirstName&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;Alex&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;FirstName&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;LastName&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;Feinman&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;LastName&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;Gender&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;Male&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;Gender&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;Personal&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;Profiles&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt;Contact&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff&gt;&lt;font color=#0000ff&gt;&lt;font size=2&gt;&amp;gt;&lt;/font&gt;&gt;
&lt;p&gt;
   &lt;font face=Verdana color=#000000 size=2&gt;The post url will look like this:&lt;/font&gt;
&lt;/p&gt;
&lt;font face=Verdana color=#000000&gt;&lt;/font&gt;&lt;font color=#a31515&gt;&lt;font color=#a31515&gt; 
&lt;p&gt;
   &lt;a href="https://cumulus.services.live.com/someone@example.com/LiveContacts/contacts/Contact(ead5572c-9c61-43a2-b71f-f2412e283598"&gt;&lt;font size=2&gt;https://cumulus.services.live.com/someone@example.com/LiveContacts/contacts/Contact(&lt;strong&gt;&lt;font color=#0000ff&gt;ead5572c-9c61-43a2-b71f-f2412e283598
   &lt;/a&gt;
&lt;/font&gt;&gt;)&lt;/font&gt;&gt;
&lt;p&gt;
&lt;/font&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font face=Verdana size=2&gt;Same url format is using for updates. Keep
in mind that to update data you need to use PUT verb.&lt;/font&gt;
&lt;br&gt;
&gt;
&gt;&gt;&gt;&lt;img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=15855efe-824d-4c23-b5d0-b6ff241447cf" /&gt;</description>
      <comments>http://blog.opennetcf.com/afeinman/CommentView,guid,15855efe-824d-4c23-b5d0-b6ff241447cf.aspx</comments>
      <category>.Net technology;Code;Computers;Microsoft</category>
    </item>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=80ea4a1d-fbc0-485d-a088-fb8f30efb6ab</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,80ea4a1d-fbc0-485d-a088-fb8f30efb6ab.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,80ea4a1d-fbc0-485d-a088-fb8f30efb6ab.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=80ea4a1d-fbc0-485d-a088-fb8f30efb6ab</wfw:commentRss>
      <title>Accessing Windows Live Services from Compact .NET Framework applications - Part I, Authentication</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,80ea4a1d-fbc0-485d-a088-fb8f30efb6ab.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,80ea4a1d-fbc0-485d-a088-fb8f30efb6ab.aspx</link>
      <pubDate>Wed, 29 Oct 2008 16:13:32 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Windows
   Live Services is an infrastructure (I am trying to avoid words like 'ecosystem') that
   provides multiple services (contacts, photo albums, blogs, web storage, mail etc)
   available via federated authentication mechanism. While the majority of these services
   are exposed to the user as web pages, they are also available to regular applications.
   Microsoft own such as LIve Mail, Live Writer, Live Gallery as well as 3rd party via&amp;nbsp; &lt;a href="http://msdn.microsoft.com/en-us/library/bb264574.aspx"&gt;&lt;font color=#0000ff&gt;Live
   Services SDK&lt;/font&gt;&lt;/a&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;.
   I am going to provide a short&amp;nbsp;introduction on accessing some of the Live Services
   programmatically from Compact .NET Framework applications.&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;The
   starting point of any Live Services interaction being authenticating the user, it
   is only natural that Microsoft has provided a .&lt;a href="http://msdn.microsoft.com/en-us/library/bb404791.aspx"&gt;NET
   component that handles the authentication for applications&lt;/a&gt;. This component however
   is offered only for desktop applications. Nevertheless behind every Live Service interaction
   there is a web request of a sort, which suggests that it can be emulated using NETCF
   code. While there are several authentication options available in Windows Live, there
   is just one that is really suitable for smart clients - RPS (Relying Party Suites).
   Underneath it is simply an HTTP POST of some XML data over secure channel. Upon successful
   request the application receives an encoded authentication ticket valid typically
   for 24 hours (the exact expiration time is provided with the ticket). To request the
   ticket an application sends XML message to &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;a href="https://dev.login.live.com/wstlogin.srf"&gt;&lt;font color=#0000ff&gt;https://dev.login.live.com/wstlogin.srf&lt;/font&gt;&lt;/a&gt;.
   The message uses content type "application/soap+xml" and looks like this:&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;s:Envelope&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns:s&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;http://www.w3.org/2003/05/soap-envelope&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns:wsse&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns:saml&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;urn:oasis:names:tc:SAML:1.0:assertion&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&amp;nbsp;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns:wsp&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;http://schemas.xmlsoap.org/ws/2004/09/policy&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns:wsu&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns:wsa&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;http://www.w3.org/2005/08/addressing&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns:wssc&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;http://schemas.xmlsoap.org/ws/2005/02/sc&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns:wst&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;http://schemas.xmlsoap.org/ws/2005/02/trust&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;s:Header&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wlid:ClientInfo&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns:wlid&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;http://schemas.microsoft.com/wlid&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wlid:ApplicationID&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;10&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wlid:ApplicationID&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wlid:ClientInfo&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsa:Action&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;s:mustUnderstand&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;1&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsa:Action&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsa:To&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;s:mustUnderstand&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;1&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;https://dev.login.live.com/wstlogin.srf&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsa:To&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsse:Security&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsse:UsernameToken&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;wsu:Id&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;user&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsse:Username&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;example@live.com&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsse:Username&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsse:Password&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;S3cr3t&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsse:Password&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsse:UsernameToken&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsse:Security&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;s:Header&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;s:Body&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wst:RequestSecurityToken&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;Id&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;RST0&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wst:RequestType&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;http://schemas.xmlsoap.org/ws/2005/02/trust/Issue&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wst:RequestType&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsp:AppliesTo&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsa:EndpointReference&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&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;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsa:Address&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;http://live.com&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsa:Address&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsa:EndpointReference&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsp:AppliesTo&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsp:PolicyReference&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;URI&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; = &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;MBI&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsp:PolicyReference&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wst:RequestSecurityToken&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;s:Body&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;s:Envelope&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Naturally,
   in the above XML the wsse:Username and wsse:Password will have to be substituted with
   actual user-provided credentials. In response we expect a standard SOAP message that
   has action set to &lt;a href="http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue"&gt;&lt;font color=#0000ff&gt;http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue&lt;/font&gt;&lt;/a&gt;.
   In the body of this message of particular interest are the following parts:&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wst:Lifetime&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsu:Created&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;2008-10-29T14:38:23Z&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsu:Created&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsu:Expires&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;2008-10-29T22:38:23Z&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wsu:Expires&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;br&gt;
   &amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;wst:Lifetime&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;and &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Verdana','sans-serif'"&gt;wst:RequestedSecurityToken&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Verdana','sans-serif'"&gt;wsse:BinarySecurityToken&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Id&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Compact0&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;t=[very
   long Base64-encoded string here]&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Verdana','sans-serif'"&gt;wsse:BinarySecurityToken&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&amp;gt;&lt;br&gt;
   &amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Verdana','sans-serif'"&gt;wst:RequestedSecurityToken&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;The
   former tells us the ticket validity time range. There is no need to reacquire a ticket
   until Expires date. The latter contains the actual ticket. Notice that while it has
   a format &lt;em&gt;&lt;span style="FONT-FAMILY: 'Verdana','sans-serif'"&gt;t=IKnvriu73nf...&lt;/span&gt;&lt;/em&gt;,
   the actual requests sent later to the Live servers will require the Base64 part to
   be quoted like this: &lt;em&gt;&lt;span style="FONT-FAMILY: 'Verdana','sans-serif'"&gt;t="IKnvriu73nf..."&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Of
   course the application should be prepared to deal with authentication failures. A
   logon failure (bad password) will result in a message that looks like this:&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp; &amp;lt;S:Body&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;S:Fault&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;S:Code&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;S:Value&amp;gt;S:Sender&amp;lt;/S:Value&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;S:Subcode&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;S:Value&amp;gt;wst:FailedAuthentication&amp;lt;/S:Value&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/S:Subcode&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/S:Code&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;S:Reason&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;S:Text xml:lang="en-US"&amp;gt;Authentication
   Failure&amp;lt;/S:Text&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/S:Reason&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;S:Detail&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;psf:error&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;psf:value&amp;gt;0x80048821&amp;lt;/psf:value&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;psf:internalerror&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; &amp;lt;psf:code&amp;gt;0x80041012&amp;lt;/psf:code&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; &amp;lt;psf:text&amp;gt;The
   entered and stored passwords do not match.&amp;lt;/psf:text&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/psf:internalerror&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/psf:error&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/S:Detail&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/S:Fault&amp;gt;&lt;br&gt;
   &amp;nbsp; &amp;lt;/S:Body&amp;gt;&lt;br&gt;
   &amp;lt;/S:Envelope&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Notice
   that it conveniently includes human-readable failure reason as well as a hex error
   code.&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;font color=#000000&gt;The
   code&amp;nbsp;to request the ticket would look like this (sans error handling):&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; AcquireTicket(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; userName, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; password)&lt;br&gt;
   {&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;const&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; url &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;@"https://dev.login.live.com/wstlogin.srf"&lt;/span&gt;;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;HttpWebRequest request &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; WebRequest.Create(url)&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;as&lt;/span&gt; HttpWebRequest
   ;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;request.Method &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"POST"&lt;/span&gt;;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;request.ContentType &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"application/soap+xml;
   charset=UTF-8"&lt;/span&gt;;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;request.Timeout &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; 10 &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;*&lt;/span&gt; 1000; &lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//
   Wait for at most 10 seconds&lt;/span&gt;
   &lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;byte&lt;/span&gt;[]
   bytes &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; System.Text.Encoding.UTF8.GetBytes(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt;.Format(
   soapEnvelope, userName, password));&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;request.ContentLength &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; bytes.Length;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;Stream reqStream &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; request.GetRequestStream();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;reqStream.Write(bytes, 0, bytes.Length);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;reqStream.Close();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;WebResponse response;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;response &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; request.GetResponse();&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&lt;/span&gt; xml;&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;using&lt;/span&gt; (System.IO.StreamReader
   reader &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; System.IO.StreamReader(response.GetResponseStream()))&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xml &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; reader.ReadToEnd();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;response.Close();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;XmlDocument document &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; XmlDocument();&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;document.LoadXml(xml);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;XmlNamespaceManager nsManager &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; XmlNamespaceManager(document.NameTable);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;nsManager.AddNamespace(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"wsse"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&lt;/span&gt;);&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;XmlNode node &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; document.SelectSingleNode(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;@"//wsse:BinarySecurityToken/text()"&lt;/span&gt;,
   nsManager);&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/span&gt; (node
   == &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt;)&lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt;; &lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//
   The wsse:BinarySecurityToken element is missing. Examine the xml for error information&lt;/span&gt;
   &lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;
   &lt;br&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&lt;/span&gt; node.Value;&lt;br&gt;
   }&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;o:p&gt;&lt;/o:p&gt;
   &gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
   &lt;o:p&gt;
      &lt;font face=Calibri color=#000000 size=3&gt;To&amp;nbsp;be continued:&amp;nbsp;&lt;/font&gt;
   &lt;/o:p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=80ea4a1d-fbc0-485d-a088-fb8f30efb6ab" /&gt;</description>
      <comments>http://blog.opennetcf.com/afeinman/CommentView,guid,80ea4a1d-fbc0-485d-a088-fb8f30efb6ab.aspx</comments>
      <category>.Net technology;Code;Computers;Microsoft</category>
    </item>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=bec1694f-766b-4d85-9bf3-02e63582c4b3</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,bec1694f-766b-4d85-9bf3-02e63582c4b3.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,bec1694f-766b-4d85-9bf3-02e63582c4b3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=bec1694f-766b-4d85-9bf3-02e63582c4b3</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      It is sometimes said that the reason Soviet Union has produced so many outstanding
      scientists is that a lot of attention was being paid to introducing kids to science
      early and in a way that kept them interested. Indeed, a large amount of popular science
      books has been printed over the years as well as translations made of the best ones
      offered in the rest of the world. Martin Gardner and Richard Feinman, absolutely fascinating
      Robert Wood biography, Smullyan, Soviet authors Perelman and Makovetsky - all of those
      made me fall in love with physics, mathematics, mechanics, chemistry as a kid. And
      of course these books were fairly accurate as they were either authored or reviewed
      by respected professionals.
   </p>
        <p>
      Times change and these days people find that you cannot blindly trust books you buy.
      Quite recently a <a href="http://community.livejournal.com/astronomy_ru/96772.html">very
      lively discussion </a>took place in one of the LiveJournal communities (very popular
      in Russia). It was about a book recently printed in Moscow called "Unabridged
      Encyclopedia of Astronomy". The book that contains 25000 articles, has many entries
      that make even a casual student of science do a doubletake (some of it could be explained
      by the fact that the entire author team somehow did not have a single specialist in
      astronomy or even general physics among them). 
   </p>
        <p>
      Here are some gems (translated from original Russian as closely as possible)
   </p>
        <p>
      "<strong>Gravitational waves</strong> - are emitted by electrical charge oscillating
      in space"
   </p>
        <p>
      "<strong>Barnard star</strong> - a <em>stationary</em> star with visual magnitude
      of 9.5m... Known for being <em>fast-moving</em>..."
   </p>
        <p>
      "<strong>Visible radiation</strong> - radiation that is not only visible to the naked
      eye, but to the special astronomical equipment and devices..."
   </p>
        <p>
      "<strong>Visible light</strong> - light being radiated by a heated body..."
   </p>
        <p>
      "<strong>Escape velocity</strong> - [is] defined as speed required for a man-made
      satellite to reach the Earth orbit. Equals 12km/s"
   </p>
        <p>
      "<strong>Galactic Cannibalism</strong> (Extragalactic Astronomy) - a part of Astronomy
      dealing with celestial bodies (stars, galaxies, quasars etc) that exist outside our
      Galaxy"
   </p>
        <p>
      "<strong>Ultraviolet radiation</strong> - radiation emitted by the Sun and stars"
   </p>
        <p>
      "<strong>Interference </strong>- wave oscillation produced by the light source generates
      so called spherical wave fronts"
   </p>
        <p>
      "<strong>Polar Star</strong> - the main star <u>L</u> of Ursa Minor constellation
      and the brightest star of the northern hemisphere"
   </p>
        <p>
      "<strong>Rigel</strong> - the brightest star in the constellation of Orion and in
      the entire sky"
   </p>
        <p>
      "<strong>Lynx</strong> - one of the constellations of the southern hemisphere"
   </p>
        <p>
      "<strong>Triton</strong> - a constellation discovered by Lassell in 1846. It's mass
      is calculated at 2.14x10^22 kg" 
   </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>The next one is tricky. It makes no sense at all in Russian, so be prepared for
      the same in English translation.</em>
          </p>
        </blockquote>
        <p>
      "<strong>Phase angle</strong> - an angle situated at a distance from the Sun to the
      Moon as well as from the Moon to the Earth"
   </p>
        <p>
      "<strong>Fundamental Astronomy</strong> - modern physical-mathematical discipline
      growing interdependent with advances in science and technology"
   </p>
        <p>
      Fortunately, some astute readers (one of them employed by Moscow planetarium - must
      know her astronomy, eh?) were able to spot it and raise some ruckus. As they were
      not able to get any response from the publisher, someone suggested to make a formal
      complaint to the russian authorities, invoking Consumer Protection Act. We'll see
      how it goes.
   </p>
        <img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=bec1694f-766b-4d85-9bf3-02e63582c4b3" />
      </body>
      <title>Russian science in trouble</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,bec1694f-766b-4d85-9bf3-02e63582c4b3.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,bec1694f-766b-4d85-9bf3-02e63582c4b3.aspx</link>
      <pubDate>Thu, 28 Feb 2008 11:22:35 GMT</pubDate>
      <description>&lt;p&gt;
   It is sometimes said that the reason Soviet&amp;nbsp;Union has produced so many outstanding
   scientists is that a lot of attention was being paid to introducing kids to science
   early and in a way that kept them interested. Indeed, a large amount of popular science
   books has been printed over the years as well as translations made of the best ones
   offered in the rest of the world. Martin Gardner and Richard Feinman, absolutely fascinating
   Robert Wood biography, Smullyan, Soviet authors Perelman and Makovetsky - all of those
   made me fall in love with physics, mathematics, mechanics, chemistry as a kid. And
   of course these books were fairly accurate as they were either authored or reviewed
   by respected professionals.
&lt;/p&gt;
&lt;p&gt;
   Times change and these days people find that you cannot blindly trust books you buy.
   Quite recently a &lt;a href="http://community.livejournal.com/astronomy_ru/96772.html"&gt;very
   lively discussion &lt;/a&gt;took place in one of the LiveJournal communities (very popular
   in Russia). It was&amp;nbsp;about a book recently printed in Moscow called "Unabridged
   Encyclopedia of Astronomy". The book that contains 25000 articles, has many entries
   that make even a casual student of science do a doubletake (some of it could be explained
   by the fact that the entire author team somehow did not have a single specialist in
   astronomy or even general physics among them). 
&lt;/p&gt;
&lt;p&gt;
   Here are some gems (translated from original Russian as closely as possible)
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Gravitational waves&lt;/strong&gt; - are emitted by electrical charge oscillating
   in space"
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Barnard star&lt;/strong&gt; - a &lt;em&gt;stationary&lt;/em&gt; star with visual magnitude
   of 9.5m... Known for being &lt;em&gt;fast-moving&lt;/em&gt;..."
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Visible radiation&lt;/strong&gt; - radiation that is not only visible to the naked
   eye, but to the special astronomical equipment and devices..."
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Visible light&lt;/strong&gt; - light being radiated by a heated body..."
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Escape velocity&lt;/strong&gt; - [is] defined as speed required for a man-made
   satellite to reach&amp;nbsp;the Earth orbit. Equals 12km/s"
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Galactic Cannibalism&lt;/strong&gt; (Extragalactic Astronomy) - a part of Astronomy
   dealing with celestial bodies (stars, galaxies, quasars etc) that exist outside our
   Galaxy"
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Ultraviolet radiation&lt;/strong&gt; - radiation emitted by the Sun and stars"
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Interference &lt;/strong&gt;- wave oscillation produced by the light source generates
   so called spherical wave fronts"
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Polar Star&lt;/strong&gt; - the main star &lt;u&gt;L&lt;/u&gt; of Ursa Minor constellation
   and the brightest star of the northern hemisphere"
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Rigel&lt;/strong&gt; - the brightest star in the constellation of Orion and in
   the entire sky"
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Lynx&lt;/strong&gt; - one of the constellations of the southern hemisphere"
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Triton&lt;/strong&gt; - a constellation discovered by Lassell in 1846. It's mass
   is calculated at 2.14x10^22 kg" 
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
   &lt;em&gt;The next one is tricky. It makes no sense at all in Russian, so be prepared for
   the same in English translation.&lt;/em&gt; 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
   "&lt;strong&gt;Phase angle&lt;/strong&gt; - an angle situated at a distance from the Sun to the
   Moon as well as from the Moon to the Earth"
&lt;/p&gt;
&lt;p&gt;
   "&lt;strong&gt;Fundamental Astronomy&lt;/strong&gt; - modern physical-mathematical discipline
   growing interdependent with advances in science and technology"
&lt;/p&gt;
&lt;p&gt;
   Fortunately, some astute readers (one of them employed by Moscow planetarium - must
   know her astronomy, eh?) were able to spot it and raise some ruckus. As they were
   not able to get any response from the publisher, someone suggested to make a formal
   complaint to the russian authorities, invoking Consumer Protection Act. We'll see
   how it goes.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=bec1694f-766b-4d85-9bf3-02e63582c4b3" /&gt;</description>
      <comments>http://blog.opennetcf.com/afeinman/CommentView,guid,bec1694f-766b-4d85-9bf3-02e63582c4b3.aspx</comments>
      <category>Life;Rant;Science</category>
    </item>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=5291cae4-c5d8-4333-a5d7-d4a57646e7e5</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,5291cae4-c5d8-4333-a5d7-d4a57646e7e5.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,5291cae4-c5d8-4333-a5d7-d4a57646e7e5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=5291cae4-c5d8-4333-a5d7-d4a57646e7e5</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://blogs.ugidotnet.org/raffaele">Raffaele Rialdi </a>pointed out that
      attempting to run RTF Host from Compact Framework 3.5 Power Toys on an emulator produces
      the following error:
   </p>
        <p>
          <img src="http://blog.opennetcf.org/afeinman/content/binary/RTFError.png" border="0" />
        </p>
        <p>
      This is caused by RTF getting confused because the default CoreCon transport on the
      emulator is DMA (DeviceDMA.dll). Here are the steps to add emulator as a manual Tcp
      connection. Not that many will need it, but it is useful for a demo
   </p>
        <p>
      1. Start Emulator using Device Emulator Manager.<br />
      2. Configure Network and Storage card folder<br />
      3. Copy to storage card folder the following file: "C:\Program Files\Common 
      <br />
      Files\microsoft shared\CoreCon\1.0\Target\wce400\armv4i\TCPConnectionA.dll"<br />
      4. In File ExplorerNavigate to \Windows\Corecon1.1. If you don't see it 
      <br />
      there, connect to the emulator from Studio<br />
      5. Launch ClientShutdown (you should see a guid-named folder to appear)<br />
      6. Copy \Storage Card\TcpConnectionA.dll to \Windows<br />
      7. Go to \Windows and delete DeviceDMA.dll (if you can't, you forgot to 
      <br />
      launch ClientShutdown)<br />
      8. Go back to \Windows\Corecon1.1 and launch ConmanClient.exe<br />
      9. Launch RTF Host. Enjoy<br /></p>
        <img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=5291cae4-c5d8-4333-a5d7-d4a57646e7e5" />
      </body>
      <title>Running RTF Host (Compact Framework 3.5 Power Toys) on emulator</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,5291cae4-c5d8-4333-a5d7-d4a57646e7e5.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,5291cae4-c5d8-4333-a5d7-d4a57646e7e5.aspx</link>
      <pubDate>Tue, 26 Feb 2008 14:46:07 GMT</pubDate>
      <description>&lt;p&gt;
   &lt;a href="http://blogs.ugidotnet.org/raffaele"&gt;Raffaele Rialdi &lt;/a&gt;pointed out that
   attempting to run RTF Host from Compact Framework 3.5 Power Toys on an emulator produces
   the following error:
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://blog.opennetcf.org/afeinman/content/binary/RTFError.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   This is caused by RTF getting confused because the default CoreCon transport on the
   emulator is DMA (DeviceDMA.dll). Here are the steps to add emulator as a manual Tcp
   connection. Not that many will need it, but it is useful for a demo
&lt;/p&gt;
&lt;p&gt;
   1. Start Emulator using Device Emulator Manager.&lt;br&gt;
   2. Configure Network and Storage card folder&lt;br&gt;
   3. Copy to storage card folder the following file: "C:\Program Files\Common 
   &lt;br&gt;
   Files\microsoft shared\CoreCon\1.0\Target\wce400\armv4i\TCPConnectionA.dll"&lt;br&gt;
   4. In File ExplorerNavigate to \Windows\Corecon1.1. If you don't see it 
   &lt;br&gt;
   there, connect to the emulator from Studio&lt;br&gt;
   5. Launch ClientShutdown (you should see a guid-named folder to appear)&lt;br&gt;
   6. Copy \Storage Card\TcpConnectionA.dll to \Windows&lt;br&gt;
   7. Go to \Windows and delete DeviceDMA.dll (if you can't, you forgot to 
   &lt;br&gt;
   launch ClientShutdown)&lt;br&gt;
   8. Go back to \Windows\Corecon1.1 and launch ConmanClient.exe&lt;br&gt;
   9. Launch RTF Host. Enjoy&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=5291cae4-c5d8-4333-a5d7-d4a57646e7e5" /&gt;</description>
      <comments>http://blog.opennetcf.com/afeinman/CommentView,guid,5291cae4-c5d8-4333-a5d7-d4a57646e7e5.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=ad573686-ebbb-477a-8086-9a9ef7c893a4</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,ad573686-ebbb-477a-8086-9a9ef7c893a4.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,ad573686-ebbb-477a-8086-9a9ef7c893a4.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=ad573686-ebbb-477a-8086-9a9ef7c893a4</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Cyberlink was kind enough to let me evaluate the latest version of their PowerDVD
      Ultra product - about a year ago. Yet I procrastinated. Now, a year later I found
      myself in posession of a <a href="http://www.dell.com/content/products/productdetails.aspx/xpsdt_420?c=us&amp;cs=19&amp;l=en&amp;s=dhs&amp;~tab=bundlestab">brand-new
      Media Center machine </a>(does the phrase "Dude, you are getting a Dell" sound familiar?), which
      is connected to a brand new <a href="http://www.samsung.com/us/consumer/detail/detail.do?group=televisions&amp;type=televisions&amp;subtype=lcdtv&amp;model_cd=LNT5271FX/XAA">1080P
      Samsung LCD TV</a>. I've slightly upgraded it with an LG GGC-H20L Blu-Ray/HD-DVD Reader and
      realized, how close I to being finally able to watch HD DVDs on a Media Center machine
      (instead of Xbox 360). This is where I remembered about Cyberlink generous offer. 
   </p>
        <p>
      After a painless 100MB download (you can buy all of the Cyberlink products electronically,
      directly on their web site, and depending on the speed of your connection, you will
      get to install it in 5-10 min), I ran the setup and was shortly rewarded with the
      activation dialog. I am not big fan of software activation (Windows or any other),
      but as far as the activation experiences go, this one was seamless and easy.
   </p>
        <p>
      PowerDVD comes with a companion application called BluRay Advisor (there is also nearly
      identical HD DVD Advisor). This application checks your system for being ready to
      play HD content. The last time I ran it a year ago, I got a message saying that my
      display card was underpowered, my CPU - barely sufficient (P IV 3.6GHz) and my TV
      entirely unsuitable due to the lack of HDCP support. This time I had a green light
      on every item, except the video driver - the Advisor did not recognize the driver
      version and indicated the status as unknown.
   </p>
        <p>
      My TV uses so called 10' setup, meaning that normally there is no keyboard or mouse
      connected to it (well, there is a Media Center keyboard, just in case, but I
      rarely use it). Earlier versions of PowerDVD did not fare well with the Media Center
      remote, but the current one does not seem to have any problems. I was able to control
      it perfectly well, except of going into settings and such. For day-to-day needs, such
      as watching DVD MCE Remote gives you all control you need.
   </p>
        <p>
      PowerDVD fully supports HD DVD menu system. My experience with it did not differ from
      Xbox 360 one.
   </p>
        <p>
      There are few minor annoyances - nothing critical, but I have to mention them:<br />
       - when starting playback, Vista pops a message saying that the application is
      not compatible with Windows Aero and that Windows will switch into basic mode.<br />
       - I was not able to figure out how to select the disk to play. The machine has
      a regular DVD drive, an HD DVD drive and a DVD changer. By default the player picks
      the first of them. I'm sure there is a setting somewhere, but I wish it were
      more accessible. As it is I have to open Computer window and select the disc I want
      to play<br />
      - The status overlay that's shown in the upper right corner when you are controlling
      volume, is way too small. From the couch it is nearly impossible to read.
   </p>
        <p>
      I want to emphasize, that the above list is of really minor issues. The application
      is very good in every way and does the job of playing DVDs and HD DVDs nearly perfectly.
      The picture quality is superb, there are no artifacts or playback delays, missed frames
      and other unpleasant occurences that might mire your viewing experience.
   </p>
        <p>
      In conclusion I wanted to mention the auto update feature. It is not something new
      - Microsoft, Adobe, Intel and quite a few others have it. Nevertheless it is gratifying
      to know that you don't have to check the web site for updates constantly (and who
      doesn't love updates) - it's done for you.
   </p>
        <img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=ad573686-ebbb-477a-8086-9a9ef7c893a4" />
      </body>
      <title>PowerDVD Ultra - first experiences</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,ad573686-ebbb-477a-8086-9a9ef7c893a4.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,ad573686-ebbb-477a-8086-9a9ef7c893a4.aspx</link>
      <pubDate>Sun, 30 Dec 2007 00:17:35 GMT</pubDate>
      <description>&lt;p&gt;
   Cyberlink was kind enough to let me evaluate the latest version of their PowerDVD
   Ultra product - about a year ago. Yet I procrastinated. Now, a year later I found
   myself in posession of a &lt;a href="http://www.dell.com/content/products/productdetails.aspx/xpsdt_420?c=us&amp;amp;cs=19&amp;amp;l=en&amp;amp;s=dhs&amp;amp;~tab=bundlestab"&gt;brand-new
   Media Center machine &lt;/a&gt;(does the phrase "Dude, you are getting a Dell" sound familiar?),&amp;nbsp;which
   is connected to a brand new &lt;a href="http://www.samsung.com/us/consumer/detail/detail.do?group=televisions&amp;amp;type=televisions&amp;amp;subtype=lcdtv&amp;amp;model_cd=LNT5271FX/XAA"&gt;1080P
   Samsung LCD TV&lt;/a&gt;. I've slightly upgraded it with an LG GGC-H20L Blu-Ray/HD-DVD Reader&amp;nbsp;and
   realized, how close I to being finally able to watch HD DVDs on a Media Center machine
   (instead of Xbox 360). This is where I remembered about Cyberlink generous offer. 
&lt;/p&gt;
&lt;p&gt;
   After a painless 100MB download (you can buy all of the Cyberlink products electronically,
   directly on their web site, and depending on the speed of your connection, you will
   get to install it in 5-10 min), I ran the setup and was shortly rewarded with the
   activation dialog. I am not big fan of software activation (Windows or any other),
   but as far as the activation experiences go, this one was seamless and easy.
&lt;/p&gt;
&lt;p&gt;
   PowerDVD comes with a companion application called BluRay Advisor (there is also nearly
   identical HD DVD Advisor). This application checks your system for being ready to
   play HD content. The last time I ran it a year ago, I got a message saying that my
   display card was underpowered, my CPU - barely sufficient (P IV 3.6GHz) and my TV
   entirely unsuitable due to the lack of HDCP support. This time I had a green light
   on every item, except the video driver - the Advisor did not recognize the driver
   version and indicated the status as unknown.
&lt;/p&gt;
&lt;p&gt;
   My TV uses so called 10' setup, meaning that normally there is no keyboard or mouse
   connected to it (well, there is&amp;nbsp;a Media Center keyboard, just in case, but I
   rarely use it). Earlier versions of PowerDVD did not fare well with the Media Center
   remote, but the current one does not seem to have any problems. I was able to control
   it perfectly well, except of going into settings and such. For day-to-day needs, such
   as watching DVD MCE Remote gives you all control you need.
&lt;/p&gt;
&lt;p&gt;
   PowerDVD fully supports HD DVD menu system. My experience with it did not differ from
   Xbox 360 one.
&lt;/p&gt;
&lt;p&gt;
   There are few minor annoyances - nothing critical, but I have to mention them:&lt;br&gt;
   &amp;nbsp;- when starting playback, Vista pops a message saying that the application is
   not compatible with Windows Aero and that Windows will switch into basic mode.&lt;br&gt;
   &amp;nbsp;- I was not able to figure out how to select the disk to play. The machine has
   a regular DVD drive, an HD DVD drive and a DVD changer. By default the player picks
   the first of them. I'm sure there is a setting somewhere, but&amp;nbsp;I wish it were
   more accessible. As it is I have to open Computer window and select the disc I want
   to play&lt;br&gt;
   - The status overlay that's shown in the upper right corner when you are controlling
   volume, is way too small. From the couch it is nearly impossible to read.
&lt;/p&gt;
&lt;p&gt;
   I want to emphasize, that the above list is of really minor issues. The application
   is very good in every way and does the job of playing DVDs and HD DVDs nearly perfectly.
   The picture quality is superb, there are no artifacts or playback delays, missed frames
   and other unpleasant occurences that might mire your viewing experience.
&lt;/p&gt;
&lt;p&gt;
   In conclusion I wanted to mention the auto update feature. It is not something new
   - Microsoft, Adobe, Intel and quite a few others have it. Nevertheless it is gratifying
   to know that you don't have to check the web site for updates constantly (and who
   doesn't love updates) - it's done for you.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=ad573686-ebbb-477a-8086-9a9ef7c893a4" /&gt;</description>
      <comments>http://blog.opennetcf.com/afeinman/CommentView,guid,ad573686-ebbb-477a-8086-9a9ef7c893a4.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=e6d0cf14-6264-4b77-9c96-d2ebdd09fd6f</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,e6d0cf14-6264-4b77-9c96-d2ebdd09fd6f.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,e6d0cf14-6264-4b77-9c96-d2ebdd09fd6f.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=e6d0cf14-6264-4b77-9c96-d2ebdd09fd6f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      This one has been actually gleaned through a usenet post, but needs a wider coverage
   </p>
        <h5>Trying to use dwAlphaConst member of DDOVERLAYFX structure to specify
      overall overlay transparency results in E_INVALIDARG error
   </h5>
        <p>
          <font size="2">As explained <a href="http://groups.google.com/group/microsoft.public.windowsce.platbuilder/browse_thread/thread/8263cc28238a4092/1fb494361d758ec7">here</a>,
      there is a clever bug in the parameter checking logic that results in the API soundly
      rejecting any combination of dwAlphaConst and dwAlphaConstBitDepth, unless dwAlphaConst
      == 1 &lt;&lt; dwAlphaConstBitDepth. This is not fixed as of WM 6 AKU4. Interestingly
      enough the actual value of dwAlphaConstBitDepth seems to be ... ignored, once the
      parameter check is done. The bit depth used is always 8 bit.</font>
        </p>
        <ul>
          <li>
            <font size="2">The net result of this bug is that the allowed values for the dwAlphaConstBitDepth/dwAlphaConst
         and the resulting opacity are<br />
         1/2 - 0.78%<br />
         2/4 - 1.6%<br />
         3/8 - 3.1%<br />
         4/16 - 6.2%<br />
         5/32 - 12.5%<br />
         6/64 - 25%<br />
         7/128 - 50%</font>
          </li>
        </ul>
        <p>
      Not using DDOVER_ALPHACONSTOVERRIDE gives you of course 100% (opaque overlay). In
      my experience anything under 5 (12.5%) is too small to be useful, but YMMV. Here
      is the code snippet:
   </p>
        <font size="2">
          <p>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (
      fUseAlpha )<br />
      {<br />
          <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (
      dwAlpha &gt; 8 ) <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
      Bug in ddraw</span><br />
              dwAlpha <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> 8;<br />
          <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (
      dwAlpha &lt; 8 )<br />
          {<br />
              dwUpdateFlags |= DDOVER_ALPHACONSTOVERRIDE;<br />
              ovfx.dwAlphaConst <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> 1
      &lt;&lt; dwAlpha;<br />
              ovfx.dwAlphaConstBitDepth <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dwAlpha;<br />
          }<br />
      }</span>
          </p>
        </font>
        <img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=e6d0cf14-6264-4b77-9c96-d2ebdd09fd6f" />
      </body>
      <title>DirectDraw experiences (Part III)</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,e6d0cf14-6264-4b77-9c96-d2ebdd09fd6f.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,e6d0cf14-6264-4b77-9c96-d2ebdd09fd6f.aspx</link>
      <pubDate>Wed, 26 Dec 2007 09:50:12 GMT</pubDate>
      <description>&lt;p&gt;
   This one has been actually gleaned through a usenet post, but needs a wider coverage
&lt;/p&gt;
&lt;h5&gt;Trying to use&amp;nbsp;dwAlphaConst member of DDOVERLAYFX structure to&amp;nbsp;specify
   overall overlay transparency results in E_INVALIDARG error
&lt;/h5&gt;
&lt;p&gt;
   &lt;font size=2&gt;As explained &lt;a href="http://groups.google.com/group/microsoft.public.windowsce.platbuilder/browse_thread/thread/8263cc28238a4092/1fb494361d758ec7"&gt;here&lt;/a&gt;,
   there is a clever bug in the parameter checking logic that results in the API soundly
   rejecting any combination of dwAlphaConst and dwAlphaConstBitDepth, unless dwAlphaConst
   == 1 &amp;lt;&amp;lt; dwAlphaConstBitDepth. This is not fixed as of WM 6 AKU4. Interestingly
   enough the actual value of dwAlphaConstBitDepth seems to be ... ignored, once the
   parameter check is done. The bit depth used is always 8 bit.&lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      &lt;font size=2&gt;The net result of this bug is that the allowed values for the dwAlphaConstBitDepth/dwAlphaConst
      and the resulting opacity are&lt;br&gt;
      1/2 - 0.78%&lt;br&gt;
      2/4 - 1.6%&lt;br&gt;
      3/8 - 3.1%&lt;br&gt;
      4/16 - 6.2%&lt;br&gt;
      5/32 - 12.5%&lt;br&gt;
      6/64 - 25%&lt;br&gt;
      7/128 - 50%&lt;/font&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   Not using DDOVER_ALPHACONSTOVERRIDE gives you of course 100% (opaque overlay). In
   my experience anything under 5 (12.5%) is too&amp;nbsp;small to be useful, but YMMV. Here
   is the code snippet:
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
   &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;if&lt;/span&gt; (
   fUseAlpha )&lt;br&gt;
   {&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;if&lt;/span&gt; (
   dwAlpha &amp;gt; 8 ) &lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//
   Bug in ddraw&lt;/span&gt;
   &lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dwAlpha &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; 8;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;if&lt;/span&gt; (
   dwAlpha &amp;lt; 8 )&lt;br&gt;
   &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;dwUpdateFlags |= DDOVER_ALPHACONSTOVERRIDE;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ovfx.dwAlphaConst &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; 1
   &amp;lt;&amp;lt; dwAlpha;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ovfx.dwAlphaConstBitDepth &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; dwAlpha;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
   }&lt;/span&gt;
&lt;/font&gt;&gt;
&lt;img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=e6d0cf14-6264-4b77-9c96-d2ebdd09fd6f" /&gt;</description>
      <comments>http://blog.opennetcf.com/afeinman/CommentView,guid,e6d0cf14-6264-4b77-9c96-d2ebdd09fd6f.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=018a8ea8-6d78-45ae-ba96-143caab7c842</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,018a8ea8-6d78-45ae-ba96-143caab7c842.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,018a8ea8-6d78-45ae-ba96-143caab7c842.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=018a8ea8-6d78-45ae-ba96-143caab7c842</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <h5>Call to IDirectDrawSurface::Blt returns E_INVALIDARG
   </h5>
        <p>
      While possible causes for this error are numerous, I wanted to point out a specific
      one that is not mentioned anywhere: either source or destination rectangle is
      empty ( zero width or height )
   </p>
        <img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=018a8ea8-6d78-45ae-ba96-143caab7c842" />
      </body>
      <title>DirectDraw experiences (Part I|)</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,018a8ea8-6d78-45ae-ba96-143caab7c842.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,018a8ea8-6d78-45ae-ba96-143caab7c842.aspx</link>
      <pubDate>Wed, 26 Dec 2007 09:25:03 GMT</pubDate>
      <description>&lt;h5&gt;Call to IDirectDrawSurface::Blt returns E_INVALIDARG
&lt;/h5&gt;
&lt;p&gt;
   While possible causes for this error are numerous,&amp;nbsp;I wanted to point out a specific
   one that is not&amp;nbsp;mentioned anywhere: either source or destination rectangle is
   empty ( zero width or height )
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=018a8ea8-6d78-45ae-ba96-143caab7c842" /&gt;</description>
      <comments>http://blog.opennetcf.com/afeinman/CommentView,guid,018a8ea8-6d78-45ae-ba96-143caab7c842.aspx</comments>
      <category>Code;Computers;Microsoft</category>
    </item>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=d1fb6baf-46d5-4c0d-a069-47615c41da9b</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,d1fb6baf-46d5-4c0d-a069-47615c41da9b.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,d1fb6baf-46d5-4c0d-a069-47615c41da9b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=d1fb6baf-46d5-4c0d-a069-47615c41da9b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      It's been a while. Things were a bit hectic. Nevertheless I am back.
   </p>
        <p>
      These days I am working on a rather interesting project involving DirectDraw on Windows
      Mobile 6. Without going into the project details, I wanted to share some experiences.
      So far, a number of time I would run into an issue, and of course not it would not
      be explained/documented/covered anywhere where the Google search takes you. It struck
      me that I must be not the first one to hit these issues, and if I list them here,
      chances are that Google search will be more productive for the next poor sod to plow
      through underdocumented (to put it mildly), convoluted (again, to put it mildly) and
      unforgiving API such as DirectDraw. I am going to have multiple posts with keywords
      facilitating search. If a month from now you will find out that I produced all of
      one post (this one seems to be on track so far. Chances for it not making it are slim),
      don't judge me too hard. I am away from home for the 3rd week in a row, having missed
      Christmas, but should be back for the New Year. Ok, here goes.
   </p>
        <p>
          <hr />
        </p>
        <h5>Call to IDirectDrawSurface::Blt returns DDERR_SURFACEBUSY
   </h5>
        <p>
      The documentation says to check for other threads accessing your surface at the same
      time. The group search suggests to search for mismatching Lock/Unlock calls. The actual
      cause turned to be a missed call to IDirectDrawSurface::ReleaseDC (after a successfull
      call to IDirectDrawSurface::GetDC). If you think about it, internally these calls
      must be using Lock/Unlock, so cudos to Group search and boo to MSDN documentation
   </p>
        <p>
       
   </p>
        <img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=d1fb6baf-46d5-4c0d-a069-47615c41da9b" />
      </body>
      <title>DirectDraw experiences (Part I)</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,d1fb6baf-46d5-4c0d-a069-47615c41da9b.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,d1fb6baf-46d5-4c0d-a069-47615c41da9b.aspx</link>
      <pubDate>Wed, 26 Dec 2007 09:20:39 GMT</pubDate>
      <description>&lt;p&gt;
   It's been a while. Things were a bit hectic. Nevertheless I am back.
&lt;/p&gt;
&lt;p&gt;
   These days I am working on a rather interesting project involving DirectDraw on Windows
   Mobile 6. Without going into the project details, I wanted to share some experiences.
   So far, a number of time I would run into an issue, and of course not it would not
   be explained/documented/covered anywhere where the Google search takes you. It struck
   me that I must be not the first one to hit these issues, and if I list them here,
   chances are that Google search will be more productive for the next poor sod to plow
   through underdocumented (to put it mildly), convoluted (again, to put it mildly) and
   unforgiving API such as DirectDraw. I am going to have multiple posts with keywords
   facilitating search. If a month from now you will find out that I produced all of
   one post (this one seems to be on track so far. Chances for it not making it are slim),
   don't judge me too hard. I am away from home for the 3rd week in a row, having missed
   Christmas, but should be back for the New Year. Ok, here goes.
&lt;/p&gt;
&lt;p&gt;
   &lt;hr&gt;
&lt;/p&gt;
&lt;h5&gt;Call to IDirectDrawSurface::Blt returns DDERR_SURFACEBUSY
&lt;/h5&gt;
&lt;p&gt;
   The documentation says to check for other threads accessing your surface at the same
   time. The group search suggests to search for mismatching Lock/Unlock calls. The actual
   cause turned to be a missed call to IDirectDrawSurface::ReleaseDC (after a successfull
   call to IDirectDrawSurface::GetDC). If you think about it, internally these calls
   must be using Lock/Unlock, so cudos to Group search and boo to MSDN documentation
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=d1fb6baf-46d5-4c0d-a069-47615c41da9b" /&gt;</description>
      <comments>http://blog.opennetcf.com/afeinman/CommentView,guid,d1fb6baf-46d5-4c0d-a069-47615c41da9b.aspx</comments>
      <category>Code;Computers;Microsoft</category>
    </item>
    <item>
      <trackback:ping>http://blog.opennetcf.com/afeinman/Trackback.aspx?guid=e6309045-3f60-4ec4-835f-34a7a98c3ab5</trackback:ping>
      <pingback:server>http://blog.opennetcf.com/afeinman/pingback.aspx</pingback:server>
      <pingback:target>http://blog.opennetcf.com/afeinman/PermaLink,guid,e6309045-3f60-4ec4-835f-34a7a98c3ab5.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://blog.opennetcf.com/afeinman/CommentView,guid,e6309045-3f60-4ec4-835f-34a7a98c3ab5.aspx</wfw:comment>
      <wfw:commentRss>http://blog.opennetcf.com/afeinman/SyndicationService.asmx/GetEntryCommentsRss?guid=e6309045-3f60-4ec4-835f-34a7a98c3ab5</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I was quite surprised to learn that apparently I have missed an important new feature
      of Windows Mobile 6 (Professional)- <a href="http://msdn2.microsoft.com/en-us/library/bb431764.aspx">inking
      and ink serialization support</a>. Gone are the days when a developer had to tinker
      with oh-so-temperamental InkX control. Now everyone and his brother can take advantage
      not only of high-quality precision ink support with smoothing and serialization, but
      also of handwriting recognition built into Windows Mobile 6 Professional. To quote
      the documentation - <em>"It provides a rich inking experience, through high quality
      curve–fitted ink with anti-aliasing, transparent ink, and highlighter ink. It provides
      an API for Ink collection, data management, rendering, and recognition. It also provides
      Ink controls to support the note–taking scenario."</em></p>
        <p>
      Another important feature is interoperability and serialized data format compatibility
      with ink support on Tablet PC.
   </p>
        <p>
      While all of this is nice, there is slight bit of bad news - using this rich set of
      goodies requires C++. There are 2 ways to use ink in Windows Mobile 6 - InkCanvas
      control and an COM automation library. <a href="http://msdn2.microsoft.com/en-us/library/bb431715.aspx">InkCanvas
      control </a>offers the ability to use a regular Win32 control (similar to InkX)
      to write, highlight, collect ink etc via <a href="http://msdn2.microsoft.com/en-us/library/bb160710.aspx">a
      set of Windows messages</a>. <a href="http://msdn2.microsoft.com/en-us/library/bb431732.aspx">COM
      automation library </a>on the other hand allows accessing the entire set of features
      offered by WISP. And there is no managed wrapper for the time being.
   </p>
        <p>
      As a public service, we at <a href="http://www.OpenNETCF.com">OpenNETCF.com</a> are
      proud to offer <a href="http://www.opennetcf.com/downloads/download.aspx?s=OpenNETCF.WindowsMobile.Ink">WISPLite
      managed wrapper</a>. The wrapper offers the entire WISPLite functionality (although
      not every method of every interface has been tested). There is InkControl class, which
      wraps InkCanvas, and a OpenNETCF.WindowsMobile.Ink namespace that contains imported
      COM interfaces. Some of the interfaces do not wrap cleanly, so a bit of coding is
      needed.
   </p>
        <p>
      Here is what the demo app looks like (warning, before running it, change line 132
      in Form1.cs to be
   </p>
        <font size="2">
          <p>
      inkControl1.SetPenStyle((
   </p>
        </font>
        <font color="#0000ff" size="2">float</font>
        <font size="2">)trackBar1.Value,
   penColor, penType); )</font>
        <p>
          <img src="http://blog.opennetcf.org/afeinman/content/binary/InkDemo.png" border="0" />
        </p>
        <p>
      Saving ink data to a file:
   </p>
        <font size="2">
          <p>
          </p>
        </font>
        <font color="#0000ff" size="2">using</font>
        <font size="2"> (</font>
        <font color="#2b91af" size="2">SaveFileDialog</font>
        <font size="2"> fd
   = </font>
        <font color="#0000ff" size="2">new</font>
        <font size="2">
        </font>
        <font color="#2b91af" size="2">SaveFileDialog</font>
        <font size="2">())<br />
   {<br />
     fd.Filter = </font>
        <font color="#a31515" size="2">"Ink files (*.isf)|*.isf|All
   files (*.*)|*.*"</font>
        <font size="2">;<br />
     </font>
        <font color="#0000ff" size="2">if</font>
        <font size="2"> (fd.ShowDialog()
   == </font>
        <font color="#2b91af" size="2">DialogResult</font>
        <font size="2">.OK)<br />
     {<br />
       </font>
        <font color="#0000ff" size="2">byte</font>
        <font size="2">[]
   data = (</font>
        <font color="#0000ff" size="2">byte</font>
        <font size="2">[])inkControl1.GetInkData(</font>
        <font color="#2b91af" size="2">IC_INKENCODING</font>
        <font size="2">.BINARY);<br /></font>
        <font color="#2b91af" size="2">
          <font color="#003300">    </font>FileStream</font>
        <font size="2"> stm
   = </font>
        <font color="#2b91af" size="2">File</font>
        <font size="2">.OpenWrite(fd.FileName);<br />
       stm.Write(data, 0, data.Length);<br />
       stm.Close();<br />
     }<br />
   }</font>
        <p>
          <font size="2">Getting ink as bitmap and retrieving recongnition result:</font>
        </p>
        <font size="2">
          <p>
      pbPreview.Image = inkControl1.GetInkDataAsBitmap();<br />
      lblReco.Text = inkControl1.RecognizedText;
   </p>
        </font>
        <p>
          <font size="2">In conclusion I'd like to ask to report problems with this wrapper
      to this blog's comments. 
      </font>
        </p>
        <img width="0" height="0" src="http://blog.opennetcf.com/afeinman/aggbug.ashx?id=e6309045-3f60-4ec4-835f-34a7a98c3ab5" />
      </body>
      <title>WISPLite on Windows Mobile 6</title>
      <guid>http://blog.opennetcf.com/afeinman/PermaLink,guid,e6309045-3f60-4ec4-835f-34a7a98c3ab5.aspx</guid>
      <link>http://blog.opennetcf.com/afeinman/PermaLink,guid,e6309045-3f60-4ec4-835f-34a7a98c3ab5.aspx</link>
      <pubDate>Fri, 01 Jun 2007 21:20:22 GMT</pubDate>
      <description>&lt;p&gt;
   I was quite surprised to learn that apparently I have missed an important new feature
   of Windows Mobile 6 (Professional)- &lt;a href="http://msdn2.microsoft.com/en-us/library/bb431764.aspx"&gt;inking
   and ink serialization support&lt;/a&gt;. Gone are the days when a developer had to tinker
   with oh-so-temperamental InkX control. Now everyone and his brother can take advantage
   not only of high-quality precision ink support with smoothing and serialization, but
   also of handwriting recognition built into Windows Mobile 6 Professional. To quote
   the documentation - &lt;em&gt;"It provides a rich inking experience, through high quality
   curve–fitted ink with anti-aliasing, transparent ink, and highlighter ink. It provides
   an API for Ink collection, data management, rendering, and recognition. It also provides
   Ink controls to support the note–taking scenario."&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
   Another important feature is interoperability and serialized data format compatibility
   with ink support on Tablet PC.
&lt;/p&gt;
&lt;p&gt;
   While all of this is nice, there is slight bit of bad news - using this rich set of
   goodies requires C++. There are 2 ways to use ink in Windows Mobile 6 - InkCanvas
   control and an COM automation library. &lt;a href="http://msdn2.microsoft.com/en-us/library/bb431715.aspx"&gt;InkCanvas
   control &lt;/a&gt;offers the ability to use a regular&amp;nbsp;Win32 control (similar to InkX)
   to write, highlight, collect ink etc via &lt;a href="http://msdn2.microsoft.com/en-us/library/bb160710.aspx"&gt;a
   set of Windows messages&lt;/a&gt;. &lt;a href="http://msdn2.microsoft.com/en-us/library/bb431732.aspx"&gt;COM
   automation library &lt;/a&gt;on the other hand allows accessing the entire set of features
   offered by WISP. And there is no managed wrapper for the time being.
&lt;/p&gt;
&lt;p&gt;
   As a public service, we at &lt;a href="http://www.OpenNETCF.com"&gt;OpenNETCF.com&lt;/a&gt;&amp;nbsp;are
   proud to offer &lt;a href="http://www.opennetcf.com/downloads/download.aspx?s=OpenNETCF.WindowsMobile.Ink"&gt;WISPLite
   managed wrapper&lt;/a&gt;. The wrapper offers the entire WISPLite functionality (although
   not every method of every interface has been tested). There is InkControl class, which
   wraps InkCanvas, and a OpenNETCF.WindowsMobile.Ink namespace that contains imported
   COM interfaces. Some of the interfaces do not wrap cleanly, so a bit of coding is
   needed.
&lt;/p&gt;
&lt;p&gt;
   Here is what the demo app looks like (warning, before running it, change line 132
   in Form1.cs to be
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
   inkControl1.SetPenStyle((
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;float&lt;/font&gt;&lt;font size=2&gt;)trackBar1.Value, penColor,
penType); )&lt;/font&gt;&gt;
&lt;p&gt;
   &lt;img src="http://blog.opennetcf.org/afeinman/content/binary/InkDemo.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   Saving ink data to a file:
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;using&lt;/font&gt;&lt;font size=2&gt; (&lt;/font&gt;&lt;font color=#2b91af size=2&gt;SaveFileDialog&lt;/font&gt;&lt;font size=2&gt; fd
= &lt;/font&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;SaveFileDialog&lt;/font&gt;&lt;font size=2&gt;())&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; fd.Filter = &lt;/font&gt;&lt;font color=#a31515 size=2&gt;"Ink files (*.isf)|*.isf|All
files (*.*)|*.*"&lt;/font&gt;&lt;font size=2&gt;;&lt;br&gt;
&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt; (fd.ShowDialog() == &lt;/font&gt;&lt;font color=#2b91af size=2&gt;DialogResult&lt;/font&gt;&lt;font size=2&gt;.OK)&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;byte&lt;/font&gt;&lt;font size=2&gt;[] data
= (&lt;/font&gt;&lt;font color=#0000ff size=2&gt;byte&lt;/font&gt;&lt;font size=2&gt;[])inkControl1.GetInkData(&lt;/font&gt;&lt;font color=#2b91af size=2&gt;IC_INKENCODING&lt;/font&gt;&lt;font size=2&gt;.BINARY);&lt;br&gt;
&lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#003300&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;FileStream&lt;/font&gt;&lt;font size=2&gt; stm
= &lt;/font&gt;&lt;font color=#2b91af size=2&gt;File&lt;/font&gt;&lt;font size=2&gt;.OpenWrite(fd.FileName);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; stm.Write(data, 0, data.Length);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; stm.Close();&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;&gt;
&lt;p&gt;
   &lt;font size=2&gt;Getting ink as bitmap and retrieving recongnition result:&lt;/font&gt;
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
   pbPreview.Image = inkControl1.GetInkDataAsBitmap();&lt;br&gt;
   lblReco.Text = inkControl1.RecognizedText;
&lt;/p&gt;
&lt;/