<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Ralph Squillace -- Docs, Samples, Docs, Samples....</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ralph.squillace/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:25:26 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Not tech: A quick Italian interlude.</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/not-tech-a-quick-italian-interlude</link>
      <pubDate>Fri, 23 Aug 2013 18:30:37 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2013/08/23/not-tech-a-quick-italian-interlude/</guid>
      <description><![CDATA[Ah, a vacation. This is just because it's possible. Ten U.S. dollars for the person who figures out...]]></description>
      <content:encoded><![CDATA[<p>Ah, a vacation. This is just because it's possible. Ten U.S. dollars for the person who figures out within two miles of where it is.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/52/53/7115.SanVitoDayFromBeach.JPG" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-52-53/7115.SanVitoDayFromBeach.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/52/53/7115.SanVitoDayFromBeach.JPG" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-52-53/7115.SanVitoDayFromBeach.JPG" alt="" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Cross-link: Getting Started with Mobile Services Data Validation with the iOS client SDK.</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/cross-link-getting-started-with-mobile-services-data-validation-with-the-ios-client-sdk</link>
      <pubDate>Wed, 24 Oct 2012 15:25:10 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2012/10/24/cross-link-getting-started-with-mobile-services-data-validation-with-the-ios-client-sdk/</guid>
      <description><![CDATA[&nbsp;A couple of cross posts here, so I don't lose them: Data Input Validation using the Mobile...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;A couple of cross posts here, so I don't lose them: <a target="_blank" title="http://blogs.msdn.com/b/silverlining/archive/2012/10/24/data-input-validation-using-the-mobile-services-ios-client-sdk.aspx" href="http://blogs.msdn.com/b/silverlining/archive/2012/10/24/data-input-validation-using-the-mobile-services-ios-client-sdk.aspx">Data Input Validation using the Mobile Services iOS client SDK</a>.&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>On the perils of live demos.</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/on-the-perils-of-live-demos</link>
      <pubDate>Tue, 12 Jun 2012 09:36:00 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2012/06/12/on-the-perils-of-live-demos/</guid>
      <description><![CDATA[Which everyone probably knows, remembering that:

Your keyboard currently defaults to French when...]]></description>
      <content:encoded><![CDATA[<p>Which everyone probably knows, remembering that:</p>
<ul>
<li>Your keyboard currently defaults to French when you reboot, and</li>
<li>Your password will only work on the <em>correct URL location</em></li>
</ul>
<p>is really always a good idea. Eh? Also, saying "Right?" when hitting Enter may actually be the way out of the conundrum, eh, Meg? (http://twitiq.com/Origameg) (Or at least it's a new game?)</p>
<p>In any case, I did manage to show the basic functionality after a fashion -- thanks to Yavor reminding me of the correct URL. Sigh. Well, the next morning we made it all work. However... because I was busy making Win8 work on that slate with buggy video drivers, I did not know what the heck was going on **prior** to the demo work. I've just come up for air from that conference, and discovered what that song-ee thing was prior to the announcement and oh, boy. I just do not know what to say. Actually, I do. But my daughter -- <em>my daughter </em>-- can read this blog, and I think I'll do better speaking with her directly.</p>
<p>But... just... no. That not only isn't about development, but it's wrong, wrong, wrong. I'm not speaking as an employee, just as a human. Please, marketing people, let's learn from this, OK?</p>
<p>Now then: Since Meg tweeted this, too: No, I didn't cancel the Friday afternoon session because of "Right" -- I thought it MUST have been funny to others, and we broke in with the correct URL and you all applauded as you should have -- no, I had a better excuse. There's someone special in my life, and I needed to be with that person. So I went. And it's all good. Plus --&gt; I DID do the What's New session in the morning at 9 AM (I know you weren't there because it was entirely a male audience) and things went fine THEN. Of course, I remembered the URL. :-)</p>
<p>And NDC is a great conference. I hope to come back next year. Meg --&gt; you want me to do the high-perf messaging as a webinar? Either that, or invite me, and I'll come do it for you and your colleagues.</p>
<p>Cheers, me.</p>]]></content:encoded>
    </item>
    <item>
      <title>Understanding Azure Namespaces, a bleg.</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/understanding-azure-namespaces-a-bleg</link>
      <pubDate>Fri, 06 Jan 2012 07:13:40 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2012/01/06/understanding-azure-namespaces-a-bleg/</guid>
      <description><![CDATA[I've been busy recently writing sample applications that use Windows Azure Service Bus and Windows...]]></description>
      <content:encoded><![CDATA[<p>I've been busy recently writing sample applications that use Windows Azure Service Bus and Windows Azure web roles and Windows Azure (damn I'm tired of typing brand names now) Access Control Service namespaces. And each time I do, I create a new namespace and often I reuse namespaces for general services in what used to be called AppFabric -- the Service Bus, Access Control, and Caching.</p>
<p>If I'm creating a set of applications, and all I need is access control to that application, I'll need to use an ACS namespace to configure that application as a relying party (which I would call a relying or dependent application, but I don't write the names). But do I use an ACS namespace that is already in use? Do I create a new ACS namespace just for that application? Or are there categories of people or clients that I can group into an ACS namespace, trusted by one or more applications LIKE those used by those people or clients?</p>
<p>I'm curious what you do, but I'm doing more work figuring out the best way to go here from the perspective of the real world. More soon.</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows Azure: P &amp; P Enterprise Integration Pack with failure/retry **and** fine-grained autoscaling APIs (among others)</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/windows-azure-p-p-enterprise-integration-pack-with-failureretry-and-fine-grained-autoscaling-apis-among-others</link>
      <pubDate>Sun, 04 Dec 2011 08:56:19 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2011/12/04/windows-azure-p-p-enterprise-integration-pack-with-failureretry-and-fine-grained-autoscaling-apis-among-others/</guid>
      <description><![CDATA[This release of the Patterns &amp; Practices Enterprise Integration Pack is simply wonderful and is...]]></description>
      <content:encoded><![CDATA[<p>This release of the <a href="http://blogs.msdn.com/b/agile/archive/2011/12/02/announcing-the-enterprise-library-integration-pack-for-windows-azure-with-autoscaling-transient-fault-handling-and-more.aspx" title="Patterns &amp;amp; Practices Enterprise Integration Pack" target="_blank">Patterns &amp; Practices Enterprise Integration Pack</a> is simply wonderful and is required for real-world Azure development. Read the announcement for the full list of features, but in particular I want to call out the autoscaling and transient failure/retry APIs offered. Azure applications can use these to handle a majority of the big needs that flexible and robust apps in the cloud need -- and still take advantage of the entire platform as designed, rather than being "trapped" in a VM.&nbsp;</p>
<p>We're soon going to release some guidance around building multi tenant applications in Windows Azure, and this integration pack is very, very important for that design approach as well. Have a look.&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Free Windows Azure training with Scott Klein in San Francisco, June 13-14.</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/free-windows-azure-training-with-scott-klein-in-san-francisco-june-13-14</link>
      <pubDate>Mon, 30 May 2011 17:32:00 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2011/05/30/free-windows-azure-training-with-scott-klein-in-san-francisco-june-13-14/</guid>
      <description><![CDATA[Hi all. If you're in the Bay Area and want to get up to speed on Windows Azure -- whether you want...]]></description>
      <content:encoded><![CDATA[<p>Hi all. If you're in the Bay Area and want to get up to speed on Windows Azure -- whether you want to learn how to use it or whether you want to validate your own approach! -- MVP Scott Klein of Blue Syntax Software&nbsp;(<a target="_blank" href="http://www.bluesyntax.net/blogs.aspx" title="blog">blog</a>)&nbsp;(author and co-author of many books including <a target="_blank" href="http://www.amazon.com/Pro-Azure-Experts-Voice-NET/dp/1430229616/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1306801008&amp;sr=1-1" title="Pro Sql Azure">Pro SQL Azure</a>) is offering a free two-day hands-on training course in all of Windows Azure in downtown San Francisco on June 13-14 (<a target="_blank" href="http://www.azurebootcamp.com/city/SanFrancisco" title="registration and information here">registration and information here</a>). I'll also be presenting and discussing the forthcoming release of the <a target="_blank" href="http://blogs.msdn.com/b/appfabric/archive/2011/05/15/announcing-the-windows-azure-appfabric-ctp-may-and-june-releases.aspx" title="Windows Azure AppFabric June CTP">Windows Azure AppFabric June CTP</a> including the AppFabric Development Platform and show you how to get your distributed cloud-based applications up and running quickly. In addition, my colleague Brian Swan will also be there to discuss using <a target="_blank" href="http://blogs.msdn.com/b/brian_swan/archive/2011/05/26/new-version-of-windows-azure-sdk-for-php-v-3-0-available.aspx" title="PHP">PHP</a> and <a target="_blank" href="http://blogs.msdn.com/b/brian_swan/archive/2011/05/24/consuming-odata-via-jsp-in-windows-azure.aspx" title="Odata and Java">Odata and Java</a> in Windows Azure.</p>
<p>Scott has tons of experience to help you understand Azure, its services, and get you started building applications over two days -- few could be better to learn from. I am really looking forward to it. If you're in the area and interested, please come. </p>]]></content:encoded>
    </item>
    <item>
      <title>Technical Note: Proxy Classes Different when using Svcutil.exe and VS Add Service Reference (doubleclick.com edition)</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/technical-note-proxy-classes-different-when-using-svcutil-exe-and-vs-add-service-reference-doubleclick-com-edition</link>
      <pubDate>Thu, 27 Jan 2011 20:28:38 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2011/01/27/technical-note-proxy-classes-different-when-using-svcutil-exe-and-vs-add-service-reference-doubleclick-com-edition/</guid>
      <description><![CDATA[The WSDL url http://advertisersapi.doubleclick.net/v1.12/api/dfa-api/campaign?wsdl&nbsp;was used by...]]></description>
      <content:encoded><![CDATA[<p>The WSDL url <span style="FONT-FAMILY: 'Segoe UI','sans-serif'; COLOR: #333333; FONT-SIZE: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><a target="_blank" href="http://advertisersapi.doubleclick.net/v1.12/api/dfa-api/campaign?wsdl">http://advertisersapi.doubleclick.net/v1.12/api/dfa-api/campaign?wsdl</a>&nbsp;was used by a customer with the Svcutil.exe tool to generate a proxy class and associated message and data classes, and it worked fine. But when they tried to use the Add Service Reference... (often shortened to "ASR")&nbsp;wizard in Visual Studio, they had a problem: they could not import the fault contracts. In fact, even with Svcutil.exe, there was a warning generated due to the tool's inability to understand the WSDL:</span></p>
<p><span style="FONT-FAMILY: 'Segoe UI','sans-serif'; COLOR: #333333; FONT-SIZE: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">
<p class="MsoNormal" style="margin: 0in 0in 0pt; padding-left: 30px;"><span style="color: #1f497d; font-size: 9pt;"><span style="font-family: Calibri;">Warning: Fault named <span class="spelle">ApiException</span> in operation <span class="spelle">copyCampaigns</span> cannot be imported.<br />&nbsp;Unsupported WSDL, the fault message part must reference an element. This fault<br /><span class="grame">message</span> does not reference an element. If you have edit access to the WSDL <span class="spelle">docum</span><br /><span class="grame">ent</span>, you can fix the problem by referencing a schema element using the 'element'<br />&nbsp;<span class="grame">attribute</span>.</span></span><span style="color: black;"><o:p></o:p></span></p>
</span></p>
<p>In any case, the difference between ASR and Svcutil.exe is that one has the <strong><a target="_blank" href="http://msdn.microsoft.com/en-us/library/aa347733.aspx" title="&lt;strong&gt;UseSerializerForFaults&lt;/strong&gt;">UseSerializerForFaults</a></strong> option easily available to you as a switch on the command line. Using this switch instructs Svcutil.exe to use the XmlSerializer to handle faults instead of the default, which is the DataContractSerializer. In this case, although Svcutil.exe has indicated that the WSDL for the fault is flawed, it continues to import the service operation. If you want to enable VS ASR to do the same thing:</p>
<ol>
<li>Click <strong>Show All Files</strong> in the Solution Explorer.</li>
<li>Open the <strong>Reference.svcmap</strong> file in your service reference.</li>
<li>Set the option &lt;UseSerializerForFaults&gt; to false in Reference.svcmap and save it. (NOTE: Take care NOT to update the service reference, as doing so resets the option to true.)</li>
<li>Open the reference.cs and you should see the operations generated.</li>
</ol>
<p>&nbsp;The WSDL for the fault contract will still need to be modified before the tools can generate the fault contract propery, but at least you can get your service proxies generated. Hope this helps. It's part of a larger series of issues revolving around this area. For one view, see <a target="_blank" href="http://dotnetbutchering.blogspot.com/2010/03/add-service-reference-duplicates.html" title="Add Service Reference duplicates properties on Faults ">http://dotnetbutchering.blogspot.com/2010/03/add-service-reference-duplicates.html</a>, which points out a <a target="_blank" href="http://connect.microsoft.com/wcf/feedback/details/424733/svcutil-generates-faults-elements-always-with-datacontract-serializer" title="bug">bug</a> that **may** have been fixed in a more recent version of the .NET Framework -- or may not. I'll try to find out tomorrow.</p>]]></content:encoded>
    </item>
    <item>
      <title>Technical Note: Reference to excellent Windows Phone 7 crypto discussion.</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/technical-note-reference-to-excellent-windows-phone-7-crypto-discussion</link>
      <pubDate>Mon, 24 Jan 2011 10:23:56 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2011/01/24/technical-note-reference-to-excellent-windows-phone-7-crypto-discussion/</guid>
      <description><![CDATA[Ian Miers has posted the code for doing "good" crypto for static data storage on the phone, but more...]]></description>
      <content:encoded><![CDATA[<p>Ian Miers has posted the code for doing "good" crypto for static data storage on the phone, but more importantly written about it, <a href="http://encryptedzoology.blogspot.com/2011/01/usability-and-cryptography.html" title="here">here</a>. Understanding this code, the problems it poses, and the processes it implements is important to doing things with <a href="http://blogs.msdn.com/b/ralph.squillace/archive/2011/01/20/technical-note-windows-phone-7-basic-authentication-over-https.aspx" title="secure web services">secure web services</a>. More later. </p>]]></content:encoded>
    </item>
    <item>
      <title>How Do I.... Linq directly into an ItemCollection?</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/how-do-i-linq-directly-into-an-itemcollection</link>
      <pubDate>Fri, 21 Jan 2011 21:38:00 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2011/01/21/how-do-i-linq-directly-into-an-itemcollection/</guid>
      <description><![CDATA[I have this:
private void LoadSupportSolutionsSection(ItemCollection itemCollection, XElement...]]></description>
      <content:encoded><![CDATA[<p>I have this:</p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="font-family: Arial;">private void LoadSupportSolutionsSection(ItemCollection itemCollection, XElement category)<br />{<br />&nbsp;&nbsp;&nbsp; // Solution, url att, Title, Description.<br />&nbsp;&nbsp;&nbsp; var solutions = from sol in category.Elements("Solution")<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select new TreeViewItem {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Header = sol.Element("Title").Value,&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tag = sol.Attribute("url").Value,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ToolTip = new ToolTip() <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Content=sol.Element("Description").Value, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StaysOpen=true<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</span></span></span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: small;"><span style="font-family: Arial;">&nbsp;&nbsp;&nbsp; foreach (TreeViewItem item in solutions)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; itemCollection.Add(item);<br />&nbsp;&nbsp;&nbsp; }<br />}<br /></span></span></span></p>
<p>A very simple linq query spun from from XML returned from&nbsp;a Web service. The TreeViewItem is a WPF tree view item. So how do I write the select portion such that it inserts <em>into the TreeView.Items collection each newly created TreeViewItem?</em></p>
<p>Anyone have an idea? I have two or three creative ones, but I have tried them out yet. Any suggestions appreciated....</p>]]></content:encoded>
    </item>
    <item>
      <title>Technical Note: Windows Phone 7: Basic Authentication over HTTPS.</title>
      <link>https://docs.microsoft.com/archive/blogs/ralph.squillace/technical-note-windows-phone-7-basic-authentication-over-https</link>
      <pubDate>Thu, 20 Jan 2011 16:48:00 GMT</pubDate>
      <dc:creator><![CDATA[ralph.squillace]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ralph.squillace/2011/01/20/technical-note-windows-phone-7-basic-authentication-over-https/</guid>
      <description><![CDATA[A note directly related to the larger blog project started with the last post,...]]></description>
      <content:encoded><![CDATA[<p>A note directly related to the larger blog project started with the last post, <a target="_blank" href="http://blogs.msdn.com/b/ralph.squillace/archive/2011/01/03/cloud-data-a-newbie-series-the-issues.aspx" title="Cloud Data: A Newbie Series --The issues.">http://blogs.msdn.com/b/ralph.squillace/archive/2011/01/03/cloud-data-a-newbie-series-the-issues.aspx</a>. While I have been working on a lot of phone applications, almost all of the work around the net using HTTP web requests involves Web services -- REST or SOAP style -- that do not require much if anything in the way of authentication and security. Yet when a service provides data of reasonable value, that's what you need. Currently the Windows Phone 7 supports only HTTPS to secure communications, but since that's what is used by the bulk of the Internet selling music, books, tickets, and so on, it is more than sufficient for the vast majority of consumer applications. This post is to demonstrate how to make those calls on the Windows Phone 7 using Basic Authentication over HTTPS using several different mechanisms. Each of these works against an HTTPS endpoint at the Windows Azure DataMarket to access free data sources, such as the United States crime statistics from 2008. </p>
<p><span style="color: #3366ff;"><strong>ASIDE:</strong></span> Some people have noticed that the <a href="http://cisforcoder.wordpress.com/2010/12/01/how-to-implement-basic-http-authentication-in-wcf-on-windows-phone-7/">WCF implementation on the phone does not support "easy" Basic authentication of HTTP</a>. No, it doesn't. But that's by design to protect you from "accidentally" using passwords in the clear over the network. Perhaps that's too much "protecting you", but it is documented <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.security.usernamepasswordclientcredential(VS.95).aspx" title="here">here</a>, in the note in the topic. If you don't use HTTPS -- that is, if you use HTTP -- the Client.Credentials property is ignored by design.</p>
<p><span style="color: #ff0000;"><strong>SECURITY NOTE:</strong></span> Because whenever sample code does not mention this, there's always some people in a big hurry that you have to remind: Obtain the username/password in a secure fashion. The most reasonably secure fashion is to prompt for it so that the user can enter it in a PasswordBox. However, there are other ways to encrypt in a strong way the strorage of such data on the phone. More in the future about several ways, but one is described here by Rob Tiffany: <a href="http://robtiffany.com/windows-phone-7/dont-forget-to-encrypt-your-windows-phone-7-data" title="http://robtiffany.com/windows-phone-7/dont-forget-to-encrypt-your-windows-phone-7-data">Don&rsquo;t forget to Encrypt your Windows Phone 7 Data</a>. </p>
<p><span style="font-size: medium;">Using the WebClient Class (<span style="font-size: small;">a good example with slightly different style found </span><a target="_blank" href="http://blog.toetapz.com/2010/11/15/windows-phone-7-and-making-https-rest-api-calls-with-basic-authentication/" title="here"><span style="font-size: small;">here</span></a><span style="font-size: small;">!</span>)</span></p>
<p>Using System.Net;</p>
<p>WebClient client = new WebClient();</p>
<p>// Handle the response when it comes.<br />client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);</p>
<p>// Your password; some services will call this a key, or a secret, or something. <br />string accountkeyOrPassword = "&lt;account or key or password goes here&gt;";</p>
<p>// Add the username/accountkeyOrPassword to the Client.Credentials property by creating a new NetworkCredential<br />client.Credentials = new NetworkCredential("accountKey", accountkeyOrPassword);</p>
<p>// Handle the response<br />client.DownloadStringAsync(new Uri("<a href="https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes/CityCrime?$filter=City%20eq%20%27Seattle%27&amp;$top=100">https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes/CityCrime?$filter=City%20eq%20%27Seattle%27&amp;$top=100</a>"));</p>
<p><span style="font-size: medium;">Using the HttpWebRequest Class</span></p>
<p><span style="font-size: medium;"><span style="font-size: small;">HttpWebRequest client<br />&nbsp;&nbsp;&nbsp; = WebRequest.CreateHttp(<br />&nbsp;new Uri("</span><a href="https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes/CityCrime?$filter=City%20eq%20%27Seattle%27&amp;$top=100"><span style="font-size: small;">https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes/CityCrime?$filter=City%20eq%20%27Seattle%27&amp;$top=100</span></a><span style="font-size: small;">")<br />&nbsp;&nbsp;&nbsp; ) as HttpWebRequest;</span></span></p>
<p><span style="font-size: small;">// Your password; some services will call this a key, or a secret, or something. <br />string accountkeyOrPassword = "&lt;account or key or password goes here&gt;";</span></p>
<p><span style="font-size: small;">// Add the username/accountkeyOrPassword to the Client.Credentials property by creating a new NetworkCredential<br />client.Credentials = new NetworkCredential("accountKey", accountkeyOrPassword);</span></p>
<p><span style="font-size: small;">// To support Windows Azure DataMarket<br />client.AllowReadStreamBuffering = true;</span></p>
<p><span style="font-size: small;">// Call and handle the response.<br />client.BeginGetResponse(<br />&nbsp;&nbsp;&nbsp; (asResult) =&gt;<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dispatcher.BeginInvoke(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; () =&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var response = client.EndGetResponse(asResult);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; responseString = reader.ReadToEnd();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch (WebException failure)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw failure;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<br />&nbsp;&nbsp;&nbsp;&nbsp; },<br />&nbsp;&nbsp;&nbsp;&nbsp; null<br />);</span></p>
<p><span style="font-size: small;">In a next post, I'll show how to use several different&nbsp;optimized client libraries to do this work. &nbsp;</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>