<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns: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/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Clemens Vasters</title>
    <link>http://vasters.com/clemensv/</link>
    <description>It's 2009. Where's that nuclear fusion power station for my house?</description>
    <language>en-us</language>
    <copyright>Clemens Vasters</copyright>
    <lastBuildDate>Mon, 06 Jul 2009 16:06:48 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.7067.0</generator>
    <managingEditor>clemensv@microsoft.com</managingEditor>
    <webMaster>clemensv@microsoft.com</webMaster>
    <geo:lat>47.67903</geo:lat><geo:long>-122.193409</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/clemensv" type="application/rss+xml" /><item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=26dc5df1-8b8c-4f71-8765-8904e584505b</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,26dc5df1-8b8c-4f71-8765-8904e584505b.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,26dc5df1-8b8c-4f71-8765-8904e584505b.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=26dc5df1-8b8c-4f71-8765-8904e584505b</wfw:commentRss>
      
      <title>SocketShifter - Network virtualization over the .NET Service Bus</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,26dc5df1-8b8c-4f71-8765-8904e584505b.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/nH5yxMeevvk/PermaLink,guid,26dc5df1-8b8c-4f71-8765-8904e584505b.aspx</link>
      <pubDate>Mon, 06 Jul 2009 16:06:48 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Anyone using the .NET Service Bus should take a good look at the &lt;a href="http://blogs.aws.net/atc/post/SocketShifter-Warping-the-Internet-Space-Time-Continuum-with-the-Azure-NET-Service-Bus.aspx"&gt;SocketShifter&#xD;
project&lt;/a&gt; started by Rob Blackwell and Richard Prodger from AWS in the UK. AWS stands&#xD;
for &lt;a href="http://www.aws.net"&gt;Active Web Solutions&lt;/a&gt;, not for the "other" AWS.&#xD;
The full project is up on &lt;a href="http://socketshifter.codeplex.com/"&gt;Codeplex&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
What makes SocketShifter significant is that it takes the network abstraction of SOAP,&#xD;
WS-Addressing, and the Service Bus full circle and layers the very bottom of that&#xD;
stack - plain TCP connections - as a virtualization on top of the the stack. In other&#xD;
words: SocketShifter allows you to create full-fidelity, bi-directional socket connections&#xD;
through the .NET Service Bus.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
We've created something very similar to SocketShifter last year (we're using&#xD;
it for a few internal purposes), but haven't made it public so far. I'm glad that&#xD;
the AWS folks built this, so that you get to play with it.   &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=26dc5df1-8b8c-4f71-8765-8904e584505b"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=nH5yxMeevvk:DCaJxbAjufo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=nH5yxMeevvk:DCaJxbAjufo:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=nH5yxMeevvk:DCaJxbAjufo:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=nH5yxMeevvk:DCaJxbAjufo:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=nH5yxMeevvk:DCaJxbAjufo:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=nH5yxMeevvk:DCaJxbAjufo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=nH5yxMeevvk:DCaJxbAjufo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=nH5yxMeevvk:DCaJxbAjufo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=nH5yxMeevvk:DCaJxbAjufo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=nH5yxMeevvk:DCaJxbAjufo:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=nH5yxMeevvk:DCaJxbAjufo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=nH5yxMeevvk:DCaJxbAjufo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/nH5yxMeevvk" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,26dc5df1-8b8c-4f71-8765-8904e584505b.aspx</comments>
      <category>.NET Services</category>
      <category>Architecture</category>
      <category>Technology</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,26dc5df1-8b8c-4f71-8765-8904e584505b.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=b703725d-3e6a-4dbb-a613-890c31505fe8</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,b703725d-3e6a-4dbb-a613-890c31505fe8.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,b703725d-3e6a-4dbb-a613-890c31505fe8.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=b703725d-3e6a-4dbb-a613-890c31505fe8</wfw:commentRss>
      
      <title>.NET Services March 2009 CTP - Service Bus Routers and Queues - Part 5: The Queue API for the rest of us</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,b703725d-3e6a-4dbb-a613-890c31505fe8.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/sTz0wsE64UQ/PermaLink,guid,b703725d-3e6a-4dbb-a613-890c31505fe8.aspx</link>
      <pubDate>Tue, 07 Apr 2009 06:38:26 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
In Parts &lt;a href="http://vasters.com/clemensv/PermaLink,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx"&gt;3&lt;/a&gt; and &lt;a href="http://vasters.com/clemensv/PermaLink,guid,4aefc36e-4476-4543-9574-13727c8f615d.aspx"&gt;4&lt;/a&gt; of&#xD;
this series I’ve explained the REST protocol for the .NET Service Bus Queue capability.&#xD;
If that looked a little too complicated for your taste and you’d rather clean with&#xD;
a simple API surface, here’s the API that you’ll prefer. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
We’ve got two simple classes in the SDK (in the Microsoft.ServiceBus assembly/namespace)&#xD;
that do the job. The &lt;em&gt;QueueManagementClient&lt;/em&gt; allows you to create, renew and&#xD;
delete queues in/from the .NET Service Bus namespace:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;static&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; QueueManagementClient &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:    &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;static&lt;/span&gt; QueueClient&#xD;
CreateQueue(TransportClientEndpointBehavior credential, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:                                          Uri queueUri, QueuePolicy queuePolicy);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:    &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;static&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; DeleteQueue(TransportClientEndpointBehavior&#xD;
credential, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6:                                   Uri queueUri);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7:    &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;static&lt;/span&gt; QueueClient&#xD;
GetQueue(TransportClientEndpointBehavior credential, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8:                                       Uri queueUri);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9:    &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;static&lt;/span&gt; QueuePolicy&#xD;
GetQueuePolicy(TransportClientEndpointBehavior credential, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10:                                             Uri queueUri);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:    &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;static&lt;/span&gt; DateTime&#xD;
RenewQueue(TransportClientEndpointBehavior credential, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:                                      Uri queueUri, TimeSpan requestedExpiration);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13: }&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
The most striking difference between this API (and the underlying SOAP protocol for&#xD;
which we still owe you some docs) and the REST API/Protocol is that there’s only a&#xD;
single URI to deal with. The WS-Transfer aligned protocol to manage the policy, the&#xD;
“Queue Transfer” protocol used to dequeue messages, and the “Enqueue” protocol to&#xD;
add messages to the queue are all overlaid over the exact same URI.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The only somewhat ugly element here is the &lt;em&gt;TransportClientEndpointBehavior&lt;/em&gt; that’s&#xD;
our awkwardly named credentials container. That class was meant to evolve into something&#xD;
else and then we changed our mind at some point, which is how the baby got stuck with&#xD;
that name. We’ll give that a prettier moniker in one of the next CTPs and as part&#xD;
of an overhaul of the .NET Access Control integration into Service Bus.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The function of the methods themselves should be quite obvious. You can create a queue&#xD;
by applying a &lt;a href="http://vasters.com/clemensv/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx"&gt;policy&lt;/a&gt;,&#xD;
you can delete a queue, attach to an existing queue, get the latest queue policy,&#xD;
and renew (extend the lifetime) of a queue. For completeness, here’s CreateQueue in&#xD;
context:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: Uri queueUri = ServiceBusEnvironment.CreateServiceUri("&lt;span style="COLOR: #8b0000"&gt;sb&lt;/span&gt;",&#xD;
solutionName, "&lt;span style="COLOR: #8b0000"&gt;/MyQueue/&lt;/span&gt;"); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3: QueuePolicy queuePolicy = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; QueuePolicy(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4: queuePolicy.ExpirationInstant = DateTime.UtcNow + TimeSpan.FromHours(1);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6: QueueClient client = QueueManagementClient.CreateQueue(credential, queueUri, queuePolicy);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7: queuePolicy = client.GetPolicy(); &lt;span style="COLOR: #008000"&gt;//&#xD;
get effective policy&lt;/span&gt;&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
The &lt;em&gt;QueueClient&lt;/em&gt; class allows interaction with a Queue. QueueClient instances&#xD;
cannot be created directly, but must be created via the QueueManagementClient factory.&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;sealed&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; QueueClient &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; DeleteLockedMessage(Message&#xD;
message); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; DeleteQueue(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; DateTime&#xD;
GetExpiration(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; QueuePolicy&#xD;
GetPolicy(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; Message&#xD;
PeekLock(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; Message&#xD;
PeekLock(TimeSpan timeout); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; IEnumerable&amp;lt;Message&amp;gt;&#xD;
PeekLockMultiple(&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt; maxMessages); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; IEnumerable&amp;lt;Message&amp;gt;&#xD;
PeekLockMultiple(&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt; maxMessages, TimeSpan timeout); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; Purge(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; ReleaseLock(Message&#xD;
message); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; DateTime&#xD;
Renew(TimeSpan requestedExpiration); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 14:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; Message&#xD;
Retrieve(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 15:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; Message&#xD;
Retrieve(TimeSpan timeout); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 16:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; IEnumerable&amp;lt;Message&amp;gt;&#xD;
RetrieveMultiple(&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt; maxMessages); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 17:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; IEnumerable&amp;lt;Message&amp;gt;&#xD;
RetrieveMultiple(&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt; maxMessages, TimeSpan timeout); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 18:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt; Send(Message&#xD;
message, TimeSpan timeout); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 19:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; RouterSubscriptionClient&#xD;
SubscribeToRouter(RouterClient routerClient, TimeSpan requestedTimeout); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 20: }&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
As you can tell, the class is – well – a queue client. It’s using WCF’s &lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.message.aspx"&gt;Message&lt;/a&gt;&lt;/em&gt; class&#xD;
as its message abstraction and supports sending messages into the queue, reading messages&#xD;
off the queue in a destructive fashion (Retrieve), and reading messages off the queue&#xD;
using the Peek/Lock pattern which provides resilience against message loss if the&#xD;
message were to be lost in transfer or the receiver fumbled the message. What you’ll&#xD;
also notice is that there are RetrieveMultiple and PeekLockMultiple variants of the&#xD;
retrieval functions which allow for getting more data with fewer network roundtrips. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Again, there should be no surprises using the API. Here’s how you send:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: queueClient.Send(Message.CreateMessage(MessageVersion.Default, "&lt;span style="COLOR: #8b0000"&gt;Hello&lt;/span&gt;",&#xD;
input), TimeSpan.MaxValue);&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
and here’s how you do a destructive read:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: Message message = queueClient.Retrieve();&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
and here’s how you use the Peek/Lock pattern:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: Message message = queueClient.PeekLock();&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; content&#xD;
= message.GetBody&amp;lt;&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3: queueClient.DeleteLockedMessage(message);&#xD;
&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
There are several examples in the SDK showing how to use the API for Queues. The OnewayQueueSender&#xD;
and SoapHttpQueueSender samples are particularly interesting since they just use WCF&#xD;
channels to enqueue, including all the bells and whistles you get from using a WCF&#xD;
channel. Here’s how the OnewayQueueSender does it:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: ChannelFactory&amp;lt;IOnewayChannel&amp;gt; channelFactory = &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2:      &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; ChannelFactory&amp;lt;IOnewayChannel&amp;gt;(&lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; NetOnewayRelayBinding(), &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:                                         &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; EndpointAddress(queueUri)); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4: channelFactory.Endpoint.Behaviors.Add(userNamePasswordServiceBusCredential);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5: IOnewayChannel onewayChannel = channelFactory.CreateChannel();&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7: &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; input&#xD;
= Console.ReadLine(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8: onewayChannel.Hello(&lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; HelloMessage(input)); &lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
The logical next question is: So why is the Queue not hooked up to a WCF listener?&#xD;
Answer: That’s what we’ve got “buffered Routers” for. The queue very explicitly provides&#xD;
a ‘pull’ model and the WCF listener would abstract that away and turn it into ‘push’.&#xD;
Routers provide ‘push’ natively &lt;em&gt;and&lt;/em&gt; they can embed a Queue. More on Routers&#xD;
in the next set of posts in this series. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=b703725d-3e6a-4dbb-a613-890c31505fe8"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=sTz0wsE64UQ:pphlyOFJ4vw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=sTz0wsE64UQ:pphlyOFJ4vw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=sTz0wsE64UQ:pphlyOFJ4vw:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=sTz0wsE64UQ:pphlyOFJ4vw:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=sTz0wsE64UQ:pphlyOFJ4vw:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=sTz0wsE64UQ:pphlyOFJ4vw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=sTz0wsE64UQ:pphlyOFJ4vw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=sTz0wsE64UQ:pphlyOFJ4vw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=sTz0wsE64UQ:pphlyOFJ4vw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=sTz0wsE64UQ:pphlyOFJ4vw:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=sTz0wsE64UQ:pphlyOFJ4vw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=sTz0wsE64UQ:pphlyOFJ4vw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/sTz0wsE64UQ" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,b703725d-3e6a-4dbb-a613-890c31505fe8.aspx</comments>
      <category>.NET Services</category>
      <category>Azure</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,b703725d-3e6a-4dbb-a613-890c31505fe8.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=4aefc36e-4476-4543-9574-13727c8f615d</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,4aefc36e-4476-4543-9574-13727c8f615d.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,4aefc36e-4476-4543-9574-13727c8f615d.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=4aefc36e-4476-4543-9574-13727c8f615d</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>.NET Services March 2009 CTP - Service Bus Routers and Queues - Part 4: The REST Queue Protocol in Code Snippets</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,4aefc36e-4476-4543-9574-13727c8f615d.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/n3vSBettHgA/PermaLink,guid,4aefc36e-4476-4543-9574-13727c8f615d.aspx</link>
      <pubDate>Tue, 07 Apr 2009 05:40:58 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
After I’ve gone through the dry facts of the REST Queue Protocol in &lt;a href="http://vasters.com/clemensv/PermaLink,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx"&gt;Part&#xD;
3 of this series&lt;/a&gt;, here’s some code to look at. The code snippets are ripped from&#xD;
the HTTP Queue sample we’ve got in the .NET Services &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8d1d1d5e-1332-4186-b33f-26d053759e49&amp;amp;displaylang=en"&gt;SDK&lt;/a&gt; and&#xD;
you can get the copy/paste ready code from there. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The most straightforward way to acquire the required hashed security token (&lt;a href="http://vasters.com/clemensv/PermaLink,guid,19e938fc-e6ec-42df-96d9-e2f6a31f7399.aspx"&gt;see&#xD;
my comments to Stefan Tilkov&lt;/a&gt;) using HttpWebRequest looks like this:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: &lt;span style="COLOR: #0000ff"&gt;static&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; HttpGetAuthenticationToken(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; username, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; password) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:     &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; tokenUri&#xD;
= &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt;.Format("&lt;span style="COLOR: #8b0000"&gt;https://{0}/issuetoken.aspx?u={1}&amp;amp;p={2}&lt;/span&gt;", &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:                                     ServiceBusEnvironment.DefaultIdentityHostName, &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:                                     username, Uri.EscapeDataString(password));&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7:     HttpWebRequest tokenRequest = (HttpWebRequest)WebRequest.Create(tokenUri);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8:     &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
tokenResponse = tokenRequest.GetResponse()) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9:     {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10:         &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
tokenResponseStream = tokenResponse.GetResponseStream()) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:         {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:             &lt;span style="COLOR: #0000ff"&gt;byte&lt;/span&gt;[]&#xD;
tokenBody = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;byte&lt;/span&gt;[500]; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13:             &lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt; tokenBodyLength&#xD;
= tokenResponseStream.Read(tokenBody, 0, 500); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 14:             &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; Encoding.UTF8.GetString(tokenBody,&#xD;
0, tokenBodyLength); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 15:         }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 16:     }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 17: }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 18: &lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
Once you’ve got the token, you need to pick a place in the Service Bus namespace.&#xD;
We’ve got a built-in helper function in the SDK that sits on &lt;em&gt;ServiceBusEnvironment&lt;/em&gt; and&#xD;
which knows all the right incantations:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1:  Uri queueUri = ServiceBusEnvironment.CreateServiceUri(&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2:                    Uri.UriSchemeHttps, &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:                    solutionName, &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:                    "&lt;span style="COLOR: #8b0000"&gt;/MyHttpQueue/&lt;/span&gt;"); &lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
Invoked in this way, the method yields the URI &lt;strong&gt;https://yourproject.&lt;font color="#ff8040"&gt;servicebus.windows.net&lt;/font&gt;/MyHttpQueue/&lt;/strong&gt; so&#xD;
there’s spectacularly little magic to it. The reason why we recommend that you use&#xD;
the method in .NET applications is that we’ve broken everyone’s apps going from the&#xD;
previous CTP to the current CTP due to the namespace restructuring and we’d like to&#xD;
avoid doing that again as we improve the namespace story. I don’t foresee any further&#xD;
change of the magnitude we had this time, however. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
To create a new Queue, you first &lt;a href="http://vasters.com/clemensv/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx"&gt;create&#xD;
a Queue policy&lt;/a&gt; and then apply it to the Service Bus namespace name. We’ve got&#xD;
a Queue Policy object in the SDK that I’ll use here to keep things short. I’m accepting&#xD;
all the defaults that are spelled out in &lt;a href="http://vasters.com/clemensv/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx"&gt;Part&#xD;
2 of the series&lt;/a&gt;, but explicitly I’m setting the expiration to 1 hour. The Queue&#xD;
Policy XSD schema in the the HTTP Queue sample’s &lt;em&gt;readme&lt;/em&gt; document, by the&#xD;
way. &#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: QueuePolicy queuePolicy = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; QueuePolicy(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: queuePolicy.ExpirationInstant = DateTime.UtcNow + TimeSpan.FromHours(1);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3: queueManageUri = HttpCreateQueue(token, queueUri, queuePolicy);&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
The code for creating the Queue shouldn’t be very surprising. It’s a POST of an Atom&#xD;
1.0 entry for which I’m using HttpWebRequest and the WCF 3.5 Syndication API. The&#xD;
SDK sample is using a rather terse version of the ‘correct’ way of doing things. I’m&#xD;
quoting the expanded variant from the Text140 sample that I showed at MIX’09:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;static&lt;/span&gt; QueuePolicy&#xD;
HttpCreateQueue(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; token, Uri queueUri, QueuePolicy&#xD;
policy, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2:                                           &lt;span style="COLOR: #0000ff"&gt;out&lt;/span&gt; Uri&#xD;
queueSelfUri, &lt;span style="COLOR: #0000ff"&gt;out&lt;/span&gt; Uri queueHeadUri) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3: {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:     HttpWebRequest webRequest;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:     HttpWebResponse webResponse;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7:     queueSelfUri = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8:     queueHeadUri = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10:     &lt;span style="COLOR: #008000"&gt;//&#xD;
Create a new syndication item and add the queue policy as an extension&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:     SyndicationItem syndicationItem = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; SyndicationItem(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:     syndicationItem.ElementExtensions.Add(&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13:         &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; SyndicationElementExtension("&lt;span style="COLOR: #8b0000"&gt;QueuePolicy&lt;/span&gt;", &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 14:                                         "&lt;span style="COLOR: #8b0000"&gt;http://schemas.microsoft.com/ws/2007/08/connect&lt;/span&gt;", &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 15:                                         policy));&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 16: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 17:     &lt;span style="COLOR: #008000"&gt;//&#xD;
create a new POST request and set the Content-Type to represent an Atom 1.0 entry&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 18:     webRequest = HttpWebRequest.Create(queueUri) &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; HttpWebRequest; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 19:     webRequest.ConnectionGroupName = "&lt;span style="COLOR: #8b0000"&gt;queueclient&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 20:     webRequest.KeepAlive = &lt;span style="COLOR: #0000ff"&gt;false&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 21:     webRequest.Method = "&lt;span style="COLOR: #8b0000"&gt;POST&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 22:     webRequest.Headers.Add("&lt;span style="COLOR: #8b0000"&gt;X-MS-Identity-Token&lt;/span&gt;",&#xD;
token); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 23:     webRequest.ContentType = "&lt;span style="COLOR: #8b0000"&gt;application/atom+xml;type=entry;charset=utf-8&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 24: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 25:     &lt;span style="COLOR: #008000"&gt;//&#xD;
write the item to the request stream&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 26:     &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
requestStream = webRequest.GetRequestStream()) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 27:     {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 28:         &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
textWriter = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; XmlTextWriter(requestStream,&#xD;
Encoding.UTF8)) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 29:         {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 30:             syndicationItem.GetAtom10Formatter().WriteTo(textWriter);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 31:             textWriter.Flush();&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 32:         }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 33:     }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 34: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 35:     &lt;span style="COLOR: #008000"&gt;//&#xD;
get the response&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 36:     &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (webResponse&#xD;
= webRequest.GetResponse() &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; HttpWebResponse) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 37:     {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 38:         &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; GetQueueInfoFromResponse(webResponse,&#xD;
queueUri, &lt;span style="COLOR: #0000ff"&gt;out&lt;/span&gt; queueSelfUri, &lt;span style="COLOR: #0000ff"&gt;out&lt;/span&gt; queueHeadUri); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 39:     }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 40: }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 41: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 42: &lt;span style="COLOR: #0000ff"&gt;static&lt;/span&gt; QueuePolicy&#xD;
GetQueueInfoFromResponse(HttpWebResponse webResponse, Uri queueUri, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 43:                                                     &lt;span style="COLOR: #0000ff"&gt;out&lt;/span&gt; Uri&#xD;
queueSelfUri, &lt;span style="COLOR: #0000ff"&gt;out&lt;/span&gt; Uri queueHeadUri) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 44: {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 45:     queueHeadUri = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 46:     queueSelfUri = &lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 47: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 48:     &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (webResponse.ContentType.StartsWith("&lt;span style="COLOR: #8b0000"&gt;application/atom+xml;type=entry&lt;/span&gt;",&#xD;
StringComparison.OrdinalIgnoreCase)) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 49:     {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 50:         Atom10ItemFormatter atomItemFormatter = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; Atom10ItemFormatter(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 51:         &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
responseReader = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; XmlTextReader(webResponse.GetResponseStream())) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 52:         {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 53:             atomItemFormatter.ReadFrom(responseReader);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 54:             &lt;span style="COLOR: #008000"&gt;//&#xD;
we found it. let's get the policy and the queue head URI&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 55:             &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SyndicationLink&#xD;
queueSelfLink &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 56:                            from link &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; atomItemFormatter.Item.Links &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 57:                            where link.RelationshipType.Equals("&lt;span style="COLOR: #8b0000"&gt;self&lt;/span&gt;",&#xD;
StringComparison.OrdinalIgnoreCase) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 58:                            select link)&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 59:             {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 60:                 queueSelfUri = queueSelfLink.Uri;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 61:                 &lt;span style="COLOR: #0000ff"&gt;break&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 62:             }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 63: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 64:             &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SyndicationLink&#xD;
queueHeadLink &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 65:                            from link &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; atomItemFormatter.Item.Links &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 66:                            where link.RelationshipType.Equals("&lt;span style="COLOR: #8b0000"&gt;queuehead&lt;/span&gt;",&#xD;
StringComparison.OrdinalIgnoreCase) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 67:                            select link)&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 68:             {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 69:                 queueHeadUri = queueHeadLink.Uri;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 70:                 &lt;span style="COLOR: #0000ff"&gt;break&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 71:             }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 72: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 73:             &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; atomItemFormatter.Item.ElementExtensions.ReadElementExtensions&amp;lt;QueuePolicy&amp;gt;( &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 74:                  "&lt;span style="COLOR: #8b0000"&gt;QueuePolicy&lt;/span&gt;", &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 75:                  "&lt;span style="COLOR: #8b0000"&gt;http://schemas.microsoft.com/ws/2007/08/connect&lt;/span&gt;").FirstOrDefault(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 76:         }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 77:     }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 78:     &lt;span style="COLOR: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 79:     {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 80:         Atom10FeedFormatter atomFeedFormatter = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; Atom10FeedFormatter(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 81:         &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
responseReader = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; XmlTextReader(webResponse.GetResponseStream())) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 82:         {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 83:             atomFeedFormatter.ReadFrom(responseReader);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 84: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 85:             &lt;span style="COLOR: #008000"&gt;//&#xD;
look for an item whose alternate-link equals the desired queue URI. The alternate &lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 86:             &lt;span style="COLOR: #008000"&gt;//&#xD;
URI is the 'tail' endpoint by which the queue is mapped into the namespace. We are &lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 87:             &lt;span style="COLOR: #008000"&gt;//&#xD;
comparing Authority and Path since the scheme might be http or https and we want to&#xD;
match&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 88:             &lt;span style="COLOR: #008000"&gt;//&#xD;
either.&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 89:             &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SyndicationItem&#xD;
requestedItem &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 90:                          from item &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; atomFeedFormatter.Feed.Items &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 91:                          from link &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; item.Links &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 92:                          where &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 93:                            (link.RelationshipType.Equals("&lt;span style="COLOR: #8b0000"&gt;alternate&lt;/span&gt;",&#xD;
StringComparison.OrdinalIgnoreCase) &amp;amp;&amp;amp; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 94:                             link.Uri.Authority.Equals(queueUri.Authority, StringComparison.OrdinalIgnoreCase) &amp;amp;&amp;amp;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 95:                             link.Uri.AbsolutePath.Equals(queueUri.AbsolutePath, StringComparison.OrdinalIgnoreCase)) ||&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 96:                            (link.RelationshipType.Equals("&lt;span style="COLOR: #8b0000"&gt;self&lt;/span&gt;",&#xD;
StringComparison.OrdinalIgnoreCase) &amp;amp;&amp;amp; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 97:                             link.Uri.Equals(queueUri))&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 98:                          select item)&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 99:             {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;100:                 &lt;span style="COLOR: #008000"&gt;//&#xD;
we found it. let's get the policy and the queue head URI&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;101:                 &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SyndicationLink&#xD;
queueSelfLink &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;102:                                from link &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; requestedItem.Links &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;103:                                where link.RelationshipType.Equals("&lt;span style="COLOR: #8b0000"&gt;self&lt;/span&gt;",&#xD;
StringComparison.OrdinalIgnoreCase) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;104:                                select link)&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;105:                 {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;106:                     queueSelfUri = queueSelfLink.Uri;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;107:                     &lt;span style="COLOR: #0000ff"&gt;break&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;108:                 }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;109: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;110:                 &lt;span style="COLOR: #0000ff"&gt;foreach&lt;/span&gt; (SyndicationLink&#xD;
queueHeadLink &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;111:                                from link &lt;span style="COLOR: #0000ff"&gt;in&lt;/span&gt; requestedItem.Links &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;112:                                where link.RelationshipType.Equals("&lt;span style="COLOR: #8b0000"&gt;queuehead&lt;/span&gt;",&#xD;
StringComparison.OrdinalIgnoreCase) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;113:                                select link)&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;114:                 {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;115:                     queueHeadUri = queueHeadLink.Uri;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;116:                     &lt;span style="COLOR: #0000ff"&gt;break&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;117:                 }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;118: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;119:                 &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; requestedItem.ElementExtensions.ReadElementExtensions&amp;lt;QueuePolicy&amp;gt;( &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;120:                      "&lt;span style="COLOR: #8b0000"&gt;QueuePolicy&lt;/span&gt;", &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;121:                      "&lt;span style="COLOR: #8b0000"&gt;http://schemas.microsoft.com/ws/2007/08/connect&lt;/span&gt;").FirstOrDefault(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;122:             }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;123:         }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;124:     }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;125:     &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;126: }&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
The “magic” that isn’t straight up Atom Pub is in lines 10-15 above. I’m attaching&#xD;
the policy object to the SyndicationItem abstraction that will be written out as an&#xD;
Atom 1.0 entry. [I know that copy/paste is difficult using this format – I need to&#xD;
clean up that expanded utility class and will post it in downloadable form within&#xD;
the next few days]&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The method returns the effective policy that the Service Bus is using, and yields&#xD;
the management URI for the queue where the Atom entry resides (self-link) as well&#xD;
as the head of the queue as output arguments. The &lt;em&gt;queueUri&lt;/em&gt; to which you applied&#xD;
the entry has morphed into the Queue’s tail when the method returns successfully.&#xD;
Having the Queue by its tail, submitting messages into it is very simple. Just do&#xD;
a plain POST. Here we’re just writing a simple string from the local variable &lt;em&gt;input&lt;/em&gt; as&#xD;
the entity body and send it.&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: &lt;span style="COLOR: #008000"&gt;//&#xD;
send&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: HttpWebRequest sendRequest = HttpWebRequest.Create(queueUri) &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; HttpWebRequest; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3: sendRequest.Method = "&lt;span style="COLOR: #8b0000"&gt;POST&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4: sendRequest.Headers.Add("&lt;span style="COLOR: #8b0000"&gt;X-MS-Identity-Token&lt;/span&gt;",&#xD;
token); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5: sendRequest.ContentType = "&lt;span style="COLOR: #8b0000"&gt;text/plain;charset=utf-8&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6: &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
sendStream = sendRequest.GetRequestStream()) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7: {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8:     &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
writer = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; StreamWriter(sendStream, Encoding.UTF8)) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9:     {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10:         writer.Write(input);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:         writer.Flush();&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:     }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13: }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 14: sendRequest.GetResponse().Close();&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
For a simple destructive read, you use the ‘queue head’ URI and do a DELETE:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: HttpWebRequest dequeueRequest = &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2:     HttpWebRequest.Create(queueHeadUri.AbsoluteUri+&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:                           "&lt;span style="COLOR: #8b0000"&gt;?encoding=asreply&amp;amp;maxmessages=1&amp;amp;timeout=60&lt;/span&gt;") &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; HttpWebRequest; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4: dequeueRequest.ConnectionGroupName = "&lt;span style="COLOR: #8b0000"&gt;dequeue&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5: dequeueRequest.Method = "&lt;span style="COLOR: #8b0000"&gt;DELETE&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6: dequeueRequest.ContentLength = 0;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7: dequeueRequest.Headers.Add("&lt;span style="COLOR: #8b0000"&gt;X-MS-Identity-Token&lt;/span&gt;",&#xD;
token); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8: &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (HttpWebResponse&#xD;
response = dequeueRequest.GetResponse() &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; HttpWebResponse) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9: {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10:     &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (response.StatusCode&#xD;
== HttpStatusCode.OK) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:     {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:         &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
responseBody = response.GetResponseStream()) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13:         {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 14:             &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
responseReader = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; StreamReader(responseBody,&#xD;
Encoding.UTF8)) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 15:             {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 16:                 &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; data&#xD;
= responseReader.ReadToEnd(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 17:                 Console.WriteLine(data);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 18:             }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 19:         }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 20:     }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 21: }&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
For a peek/lock read where you first lock the message and then delete the lock when&#xD;
you want to keep the message, you do a POST on the head and remember the &lt;em&gt;X-MS-Message-Lock&lt;/em&gt; header&#xD;
value:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: HttpWebRequest dequeueRequest = &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2:      HttpWebRequest.Create(queueHeadUri.AbsoluteUri+&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:                            "&lt;span style="COLOR: #8b0000"&gt;?encoding=asreply&amp;amp;maxmessages=1&amp;amp;timeout=60&lt;/span&gt;") &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; HttpWebRequest; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4: dequeueRequest.ConnectionGroupName = "&lt;span style="COLOR: #8b0000"&gt;dequeue&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5: dequeueRequest.Method = "&lt;span style="COLOR: #8b0000"&gt;POST&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6: dequeueRequest.ContentLength = 0;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7: dequeueRequest.Headers.Add("&lt;span style="COLOR: #8b0000"&gt;X-MS-Identity-Token&lt;/span&gt;",&#xD;
token); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8: &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (HttpWebResponse&#xD;
response = dequeueRequest.GetResponse() &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; HttpWebResponse) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9: {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10:     &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (response.StatusCode&#xD;
== HttpStatusCode.OK) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:     {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:         lockUri = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; Uri(response.Headers["&lt;span style="COLOR: #8b0000"&gt;X-MS-Message-Lock&lt;/span&gt;"]); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13:         &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
responseBody = response.GetResponseStream()) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 14:         {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 15:             &lt;span style="COLOR: #0000ff"&gt;using&lt;/span&gt; (var&#xD;
responseReader = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; StreamReader(responseBody,&#xD;
Encoding.UTF8)) &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 16:             {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 17:                 &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; data&#xD;
= responseReader.ReadToEnd(); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 18:                 Console.WriteLine(data);&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 19:             }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 20:         }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 21:     }&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 22: }&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
If you decide to keep the message (i.e. your app didn’t puke processing it), you DELETE&#xD;
the lock, otherwise you do a PUT. The code is practically the same except for the&#xD;
method so I’ll just quote DELETE:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: HttpWebRequest deleteLockedMessageRequest = HttpWebRequest.Create(lockUri) &lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt; HttpWebRequest; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: deleteLockedMessageRequest.ConnectionGroupName = "&lt;span style="COLOR: #8b0000"&gt;lock&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3: deleteLockedMessageRequest.Method = "&lt;span style="COLOR: #8b0000"&gt;DELETE&lt;/span&gt;"; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4: deleteLockedMessageRequest.KeepAlive=&lt;span style="COLOR: #0000ff"&gt;false&lt;/span&gt;; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5: deleteLockedMessageRequest.ContentLength = 0;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6: deleteLockedMessageRequest.Headers.Add("&lt;span style="COLOR: #8b0000"&gt;X-MS-Identity-Token&lt;/span&gt;",&#xD;
token); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7: deleteLockedMessageRequest.ContentLength = 0;&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8: deleteLockedMessageRequest.GetResponse().Close();&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
That’s it. Create, Enqueue, Destructive Read, Peek/Lock Read, and .. oh .. yes.. forgot&#xD;
Delete the Queue. Take the snippet above and swap out the lockUri for the queueSelfUri.&#xD;
Done.  &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Ah, yes, and please … don’t blame me for HTTP or HttpWebRequest or Clemens’ demo coding&#xD;
style requiring too many lines of code. I could have applied a bit of code-compression&#xD;
here, but I’m intentionally trying not to abstract away too much of the protocol here.&#xD;
I’m generally with you, though. The guys putting together the &lt;a href="http://msdn.microsoft.com/wcf/rest"&gt;WCF&#xD;
REST Starter Kit&lt;/a&gt; are working on making code like that shrink.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=4aefc36e-4476-4543-9574-13727c8f615d"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=n3vSBettHgA:0RXhDqqncxg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=n3vSBettHgA:0RXhDqqncxg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=n3vSBettHgA:0RXhDqqncxg:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=n3vSBettHgA:0RXhDqqncxg:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=n3vSBettHgA:0RXhDqqncxg:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=n3vSBettHgA:0RXhDqqncxg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=n3vSBettHgA:0RXhDqqncxg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=n3vSBettHgA:0RXhDqqncxg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=n3vSBettHgA:0RXhDqqncxg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=n3vSBettHgA:0RXhDqqncxg:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=n3vSBettHgA:0RXhDqqncxg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=n3vSBettHgA:0RXhDqqncxg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/n3vSBettHgA" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,4aefc36e-4476-4543-9574-13727c8f615d.aspx</comments>
      <category>.NET Services</category>
      <category>Azure</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,4aefc36e-4476-4543-9574-13727c8f615d.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=19e938fc-e6ec-42df-96d9-e2f6a31f7399</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,19e938fc-e6ec-42df-96d9-e2f6a31f7399.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,19e938fc-e6ec-42df-96d9-e2f6a31f7399.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=19e938fc-e6ec-42df-96d9-e2f6a31f7399</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>The .NET Service Bus REST protocol for Queues - Some comments, some answers</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,19e938fc-e6ec-42df-96d9-e2f6a31f7399.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/QIQ93P_kjrA/PermaLink,guid,19e938fc-e6ec-42df-96d9-e2f6a31f7399.aspx</link>
      <pubDate>Tue, 07 Apr 2009 04:14:16 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.innoq.com/blog/st/2009/04/net_services_rest_queue_protoc.html"&gt;Stefan&#xD;
Tilkov has several interesting remarks&lt;/a&gt; regarding our &lt;a href="http://vasters.com/clemensv/PermaLink,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx"&gt;.NET&#xD;
Service Bus REST Queue Protocol&lt;/a&gt; that are worth addressing.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      Putting a password in the&#xD;
URI to get an identity token seems to expose information unnecessarily&lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
That’s an area where we know that we’re going to change the protocol. We’ve already&#xD;
labeled that protocol as temporary in the documentation for the PDC CTP and we didn’t&#xD;
get all the pieces in the .NET Access Control service together, yet. Since it’s a&#xD;
HTTPS call, the data doesn’t get exposed on the wire, though. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      &lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;em&gt;&#xD;
            &lt;font color="#0080c0"&gt;Queue&#xD;
creation seems fine, even though I feel a little uneasy about wrapping this in an&#xD;
Atom entry &lt;/font&gt;&#xD;
          &lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Using Atom 1.0 and the Atom Publishing Protocol as the framework for managing the&#xD;
namespace is very intentional - for several reasons. First of all, it’s a standardized&#xD;
protocol for managing generic lists and the elements in those lists. With that we&#xD;
have a stable and accepted protocol framework and there’s plenty of tooling and framework&#xD;
support around it. That’s worth something. All we need to do is to add some simple&#xD;
extensions – the policies – on top of that stack. Beats having to define, version,&#xD;
and maintain a whole protocol.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      &lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;em&gt;&#xD;
            &lt;font color="#0080c0"&gt;On&#xD;
the other hand, Atom seems reasonable considering you get an Atom feed from the queue’s&#xD;
“parent” resource &lt;/font&gt;&#xD;
          &lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
That’s what I mean. All sorts of tools know how to navigate and display Atom.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      &lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;em&gt;&#xD;
            &lt;font color="#0080c0"&gt;Very&#xD;
nice to see the use of link/rel to get to the detailed Queue URIs; it would be even&#xD;
better if the rel values themselves were URIs in an MS namespace &lt;/font&gt;&#xD;
          &lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;br&gt;&#xD;
I don’t see much potential for collision here and I would find it odd to have something&#xD;
as simple “self” and “alternate” and then add some unsightly QName for my rel expressions.&#xD;
Simple is good.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      &lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;em&gt;&#xD;
            &lt;font color="#0080c0"&gt;Using&#xD;
“alternate” for the tail seems strange &lt;/font&gt;&#xD;
          &lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
“self” refers to the location where the Atom &amp;lt;entry&amp;gt; resides. “alternate” is&#xD;
what the entry points to. Since the Queue gets mapped into the namespace by “sticking&#xD;
its tail out”, the choice of the alternate link is the simplest possible mapping I&#xD;
could think of.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      &lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;em&gt;&#xD;
            &lt;font color="#0080c0"&gt;“The&#xD;
queue’s tail endpoint accepts requests with any HTTP Content-Type and any HTTP method&#xD;
except GET, HEAD, and OPTIONS.” The tail does not accept GET. Why not? Can’t think&#xD;
of a reason. Also, I don’t get why any method is allowed. It seems to me a POST/PUT&#xD;
combination or an idempotent POST variant would be the way to go. &lt;/font&gt;&#xD;
          &lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The way to look at this is that the Queue’s tail is acting on behalf of the receiver/resource&#xD;
that’ll eventually pick up and process the messages. POST, PUT, DELETE, and BOOYAH&#xD;
are all operations that cleanly map to processing operations and can often be delivered&#xD;
asynchronously with a 202 receipt reply. GET and HEAD don’t make much sense when executed&#xD;
in an asynchronous fashion without getting a reply that’s backed by a response for&#xD;
the receiver. OPTIONS is simply reserved for future use. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      &lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;em&gt;&#xD;
            &lt;font color="#0080c0"&gt;“DELETE&#xD;
performing a destructive read” – huh? What happens if I don’t get back a response?&#xD;
How can I retry (as I can’t tell whether I get the same or a different message)? Maybe&#xD;
it’s intended to be used only if you don’t care about losing messages. &lt;/font&gt;&#xD;
          &lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
DELETE is indeed the dequeue operation variant that you’d use if you are ok with occasional&#xD;
message loss and want to trade transfer reliability for fewer roundtrips. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      &lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;em&gt;&#xD;
            &lt;font color="#0080c0"&gt;The&#xD;
POST lock/delete approach, on the other hand, is very nice. Maybe it should be made&#xD;
idempotent, again e.g. using POE &lt;/font&gt;&#xD;
          &lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
POST lock/delete is the dequeue variant where you are doing the trade the other way&#xD;
around. More reliability bought with an extra roundtrip. In my view, idempotent access&#xD;
to individual messages isn’t much of a practical priority for a competing consumer&#xD;
queue. You’ll get a message or a set of messages to look at under a lock and if you&#xD;
walk away from the message(s), those messages pop back into the queue for someone&#xD;
else to look at. There are obviously scenarios where you want to look at a message&#xD;
sequence in other ways than an ordered queue where you can only get at messages as&#xD;
they appear on the head of the sequence – direct message access and per-message idempotent&#xD;
access matter in those scenarios and we’re looking to give you a capability of that&#xD;
sort in a different kind of messaging primitive.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      &lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;em&gt;&#xD;
            &lt;font color="#0080c0"&gt;“The&#xD;
Delete request is sent without any entity body and MUST have a Content-Length header&#xD;
that is set to zero (0)”; although my immediate reaction was to question whether DELETE&#xD;
ever carries a body, the HTTP spec indeed doesn’t say anything about this &lt;/font&gt;&#xD;
          &lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
One of the great things about working here is that there are all sorts of interesting&#xD;
people around. I’ve discussed the use of DELETE and whether you can provide an entity&#xD;
body in either direction with &lt;a href="http://en.wikipedia.org/wiki/Henrik_Frystyk_Nielsen"&gt;Henrik&#xD;
Frystyk Nielsen&lt;/a&gt;, who works as an architect on the WCF team and is one of the co-authors&#xD;
of HTTP 1.1. Henrik’s stance is that all operations allow entity-bodies unless it’s&#xD;
explicitly forbidden in the spec. I don’t have a better authority to talk to.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font color="#0080c0"&gt;&#xD;
            &lt;em&gt;      &lt;/em&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;em&gt;&#xD;
            &lt;font color="#0080c0"&gt;“The&#xD;
DELETE and POST operation have a set of options that are expressed as query parameters&#xD;
appended to the queue’s head URI” - the wording is worse than the actual approach.&lt;/font&gt;&#xD;
          &lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’m sorry that my writing is so clumsy ;-)&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=19e938fc-e6ec-42df-96d9-e2f6a31f7399"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=QIQ93P_kjrA:3hqD_pmsnlI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=QIQ93P_kjrA:3hqD_pmsnlI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=QIQ93P_kjrA:3hqD_pmsnlI:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=QIQ93P_kjrA:3hqD_pmsnlI:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=QIQ93P_kjrA:3hqD_pmsnlI:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=QIQ93P_kjrA:3hqD_pmsnlI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=QIQ93P_kjrA:3hqD_pmsnlI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=QIQ93P_kjrA:3hqD_pmsnlI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=QIQ93P_kjrA:3hqD_pmsnlI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=QIQ93P_kjrA:3hqD_pmsnlI:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=QIQ93P_kjrA:3hqD_pmsnlI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=QIQ93P_kjrA:3hqD_pmsnlI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/QIQ93P_kjrA" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,19e938fc-e6ec-42df-96d9-e2f6a31f7399.aspx</comments>
      <category>.NET Services</category>
      <category>Azure</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,19e938fc-e6ec-42df-96d9-e2f6a31f7399.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=4ad4d780-97aa-45e8-8615-c22c3ad6c5d5</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,4ad4d780-97aa-45e8-8615-c22c3ad6c5d5.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,4ad4d780-97aa-45e8-8615-c22c3ad6c5d5.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=4ad4d780-97aa-45e8-8615-c22c3ad6c5d5</wfw:commentRss>
      
      <title>Hang In There. Not Done With Explaining Routers and Queues, Yet :)</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,4ad4d780-97aa-45e8-8615-c22c3ad6c5d5.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/a0dRfsDdE4I/PermaLink,guid,4ad4d780-97aa-45e8-8615-c22c3ad6c5d5.aspx</link>
      <pubDate>Tue, 07 Apr 2009 03:20:24 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I’m far from being done with my blog series on Queues and Routers. Here’s how far&#xD;
I’ve yet gotten: &lt;a href="http://vasters.com/clemensv/PermaLink,guid,8e30d2eb-6e2d-4dc5-8aba-5aa410e450de.aspx"&gt;Part&#xD;
1 – Fundamentals&lt;/a&gt;, &lt;a href="http://vasters.com/clemensv/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx"&gt;Part&#xD;
2 - Queue Policies&lt;/a&gt;, &lt;a href="http://vasters.com/clemensv/PermaLink,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx"&gt;Part&#xD;
3 - Queue REST Protocol&lt;/a&gt;. I still owe you the Queue API, the Router Policies, the&#xD;
Router REST Protocol, and the Router API. It’s simply that the planning work for the&#xD;
next milestone slows me down a bit - sorry. If you also want the smaller bits of info,&#xD;
start &lt;a href="http://twitter.com/clemensv"&gt;following me on Twitter&lt;/a&gt; in the meantime.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=4ad4d780-97aa-45e8-8615-c22c3ad6c5d5"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=a0dRfsDdE4I:ZUeV8Hk7g48:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=a0dRfsDdE4I:ZUeV8Hk7g48:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=a0dRfsDdE4I:ZUeV8Hk7g48:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=a0dRfsDdE4I:ZUeV8Hk7g48:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=a0dRfsDdE4I:ZUeV8Hk7g48:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=a0dRfsDdE4I:ZUeV8Hk7g48:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=a0dRfsDdE4I:ZUeV8Hk7g48:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=a0dRfsDdE4I:ZUeV8Hk7g48:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=a0dRfsDdE4I:ZUeV8Hk7g48:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=a0dRfsDdE4I:ZUeV8Hk7g48:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=a0dRfsDdE4I:ZUeV8Hk7g48:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=a0dRfsDdE4I:ZUeV8Hk7g48:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/a0dRfsDdE4I" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,4ad4d780-97aa-45e8-8615-c22c3ad6c5d5.aspx</comments>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,4ad4d780-97aa-45e8-8615-c22c3ad6c5d5.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=83edb04a-5696-401c-a919-8c1f379d130c</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,83edb04a-5696-401c-a919-8c1f379d130c.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,83edb04a-5696-401c-a919-8c1f379d130c.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=83edb04a-5696-401c-a919-8c1f379d130c</wfw:commentRss>
      
      <title>.NET Services March 2009 CTP: Host a Public Website At The Kitchen Table or from a Coffee Shop! No Kidding.</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,83edb04a-5696-401c-a919-8c1f379d130c.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/-3yW45j_EiA/PermaLink,guid,83edb04a-5696-401c-a919-8c1f379d130c.aspx</link>
      <pubDate>Sun, 05 Apr 2009 19:41:36 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;div style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; FLOAT: none; PADDING-TOP: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:2fa07bff-113a-425e-98ba-b07fc54b0584" class="wlWriterEditableSmartContent"&gt;&#xD;
          &lt;p&gt;&#xD;
.NET Service Bus Reverse Web Proxy: &lt;a href="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/NETServicesMarch2009CTPHostaPublicWebs_9AB2/ServiceBusReverseWebProxy.zip"&gt;Click&#xD;
here to download the source&lt;/a&gt;&lt;/p&gt;&#xD;
        &lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;&#xD;
          &lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/NETServicesMarch2009CTPHostaPublicWebs_9AB2/image_2.png"&gt;&#xD;
            &lt;img style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 10px 20px 10px 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="image" border="0" alt="image" align="left" src="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/NETServicesMarch2009CTPHostaPublicWebs_9AB2/image_thumb.png" width="383" height="500"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
Using the application/service built from the sample linked at the top of this post&#xD;
you can &lt;strong&gt;host&lt;/strong&gt; a &lt;strong&gt;publicly discoverable and accessible website&lt;/strong&gt; or&#xD;
Web service &lt;strong&gt;from your Windows notebook&lt;/strong&gt; or desktop machine from within&#xD;
most network environments &lt;strong&gt;without&lt;/strong&gt; having to &lt;strong&gt;open up a port&#xD;
on the firewall&lt;/strong&gt;, mapping a port on your NAT, or using some type of dynamic&#xD;
DNS service to make the site discoverable. All those essential connectivity features&#xD;
are provided by the .NET Service Bus and with the help of the included sample code.&#xD;
&lt;/p&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
I’m intentionally not bundling this up as a conveniently installable binary along&#xD;
with a nice configuration UI – that’s not my role here. If &lt;strong&gt;you&lt;/strong&gt; want&#xD;
to grab the code and make it part of a cool personal media sharing app, provide external&#xD;
access to a departmental enterprise app, put a prototype out there for a client to&#xD;
play with, host a web service you want to show off, or or provide an installable version&#xD;
with a nice configuration UI – go ahead. &#xD;
&lt;/p&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
The attached sample application/service has two key capabilities that I’ve repeatedly&#xD;
been asked for:&#xD;
&lt;/p&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
a) It is a &lt;strong&gt;reverse web proxy&lt;/strong&gt; that can run either as a console application&#xD;
or as a Windows (NT-) service. The reverse web proxy can sit in front of any web server&#xD;
and forward requests to it. I’ve tested this only with IIS as the backend, but I don’t&#xD;
see a reason why this shouldn’t work with Apache or the Web Server built into some&#xD;
J2EE application server. &#xD;
&lt;/p&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
b) It is a scripting &lt;strong&gt;policy host&lt;/strong&gt; that projects the &lt;em&gt;crossdomain.xml&lt;/em&gt; and &lt;em&gt;ClientPolicyAccess.xml&lt;/em&gt; files&#xD;
required by &lt;strong&gt;Adobe Flash&lt;/strong&gt; and &lt;strong&gt;Microsoft Silverlight&lt;/strong&gt; into&#xD;
the root of a .NET Services namespace, permitting cross-domain script access from&#xD;
Flash and Silverlight for all endpoints hosted within the namespace. You can easily&#xD;
adjust the code in the sample to restrict access to particular resources within the&#xD;
namespace.&#xD;
&lt;/p&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
The fundamental architecture is illustrated in the picture. The web application that&#xD;
you want to project out to the public internet sits on some web server on your machine.&#xD;
“Your machine” may be a desktop machine at home or at work or a notebook in a hotel&#xD;
lobby or an airport on WiFi. As long as you’ve got line-of-sight to the .NET Service&#xD;
Bus and the TCP ports 828 and 818 are available for outbound traffic, you’re good.&#xD;
The reverse web proxy app will map any local HTTP server to a name in the .NET Service&#xD;
Bus and forward the traffic between the .NET Service Bus and the HTTP server. The&#xD;
client (any web browser, but also any HTTP Web Service client) will talk to the .NET&#xD;
Service Bus at the given name, the traffic flows to the reverse proxy on your machine&#xD;
and from there to the HTTP server.&#xD;
&lt;/p&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
I’m hosting (for a few days) a sample &lt;a href="http://www.dasblog.info"&gt;dasBlog&lt;/a&gt; site&#xD;
instance at &lt;a title="http://clemensv6.servicebus.windows.net/dasblog/" href="http://clemensv6.servicebus.windows.net/dasblog/"&gt;http://clemensv6.servicebus.windows.net/dasblog/&lt;/a&gt;.&#xD;
The hosting machine for that blog is one of my personal machines. It’s got a local&#xD;
network address assigned by DHCP, it’s not listed in any NAT mappings, and it’s local&#xD;
Firewall isn’t even open for inbound HTTP traffic.  &#xD;
&lt;/p&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
          &lt;strong&gt;How to install, build, and run&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
As a prerequisite you will need three things:&#xD;
&lt;/p&gt;&#xD;
        &lt;ol&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;div style="MARGIN-TOP: 5px"&gt;Visual Studio 2008 SP1 with the .NET Framework 3.5 SP1.&#xD;
&lt;/div&gt;&#xD;
          &lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;div style="MARGIN-TOP: 5px"&gt;A .NET Services project account. The quickest route is&#xD;
to go to &lt;a href="http://portal.ex.azure.microsoft.com"&gt;http://portal.ex.azure.microsoft.com&lt;/a&gt; and&#xD;
click “Sign up”. The approval/provisioning is pretty much instantaneous (plus 20 seconds&#xD;
for the provisioning to run through) once you provide your Windows Live ID. No more&#xD;
access codes.&#xD;
&lt;/div&gt;&#xD;
          &lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;div style="MARGIN-TOP: 5px"&gt;The .NET Services SDK for the March 2009 CTP. &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8D1D1D5E-1332-4186-B33F-26D053759E49&amp;amp;displaylang=en"&gt;Click&#xD;
here to get it&lt;/a&gt;.&#xD;
&lt;/div&gt;&#xD;
          &lt;/li&gt;&#xD;
        &lt;/ol&gt;&#xD;
        &lt;p style="MARGIN-TOP: 5px"&gt;&#xD;
Unpack the files, and open &lt;em&gt;ServiceBusReverseWebProxy.sln&lt;/em&gt; with Visual Studio&#xD;
2008. In the ServiceBusReverseWebProxy project, find the &lt;strong&gt;app.config&lt;/strong&gt; file&#xD;
and open it. Here’s where you need to put your project name and password and where&#xD;
you map your sites:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: &lt;span style="COLOR: #0000ff"&gt;&amp;lt;?&lt;/span&gt;xml&#xD;
version="1.0" encoding="utf-8" &lt;span style="COLOR: #0000ff"&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;configuration&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:     &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;configSections&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:         &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;section&lt;/span&gt;&lt;span style="COLOR: #ff0000"&gt;name&lt;/span&gt;=&lt;span style="COLOR: #0000ff"&gt;"reverseWebProxy"&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:                  &lt;span style="COLOR: #ff0000"&gt;type&lt;/span&gt;=&lt;span style="COLOR: #0000ff"&gt;"Microsoft.Samples.ServiceBusReverseWebProxy.ReverseWebProxySection,&#xD;
ServiceBusReverseWebProxy"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6:     &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;configSections&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7:     &lt;span style="COLOR: #008000"&gt;&amp;lt;!--&#xD;
Add your .NET Services project account information here --&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8:     &lt;span style="COLOR: #008000"&gt;&amp;lt;!--&#xD;
Create a project at http://portal.ex.azure.microsoft.com/ --&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9:     &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;reverseWebProxy&lt;/span&gt;&lt;span style="COLOR: #ff0000"&gt;netServicesProjectName&lt;/span&gt;=&lt;span style="COLOR: #0000ff"&gt;"!!myproject!!"&lt;/span&gt;&lt;span style="COLOR: #ff0000"&gt;netServicesProjectPassword&lt;/span&gt;=&lt;span style="COLOR: #0000ff"&gt;"!!mypassword!!"&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10:                      &lt;span style="COLOR: #ff0000"&gt;enableSilverlightPolicy&lt;/span&gt;=&lt;span style="COLOR: #0000ff"&gt;"true"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:     &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;pathMappings&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:       &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;add&lt;/span&gt;&lt;span style="COLOR: #ff0000"&gt;namespacePath&lt;/span&gt;=&lt;span style="COLOR: #0000ff"&gt;"mysite"&lt;/span&gt;&lt;span style="COLOR: #ff0000"&gt;localUri&lt;/span&gt;=&lt;span style="COLOR: #0000ff"&gt;"http://localhost/mysite/"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13:     &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;pathMappings&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 14:   &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;reverseWebProxy&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 15: &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;configuration&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
Put your .NET Services project/solution name into the &lt;em&gt;netServicesProjectName&lt;/em&gt; and&#xD;
the password into &lt;em&gt;netServicesProjectPassword&lt;/em&gt;. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Then pick a local HTTP server or site and give it a name in your .NET Service Bus&#xD;
namespace. That mapping is done in the &lt;em&gt;&amp;lt;pathMappings&amp;gt;&lt;/em&gt; section. There&#xD;
are a few things that are important to note here:&#xD;
&lt;/p&gt;&#xD;
        &lt;ol&gt;&#xD;
          &lt;li&gt;&#xD;
If your project name were ‘&lt;strong&gt;clemensv6&lt;/strong&gt;’ and you map some local URI&#xD;
to the namespacePath ‘&lt;strong&gt;dasBlog&lt;/strong&gt;’, the resulting .NET Service Bus URI&#xD;
would be &lt;a title="http://clemensv6.servicebus.windows.net/dasblog/" href="http://clemensv6.servicebus.windows.net/dasblog/"&gt;http://&lt;strong&gt;clemensv6&lt;/strong&gt;.servicebus.windows.net/&lt;strong&gt;dasblog&lt;/strong&gt;/&lt;/a&gt;. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
The web application should only emit relative paths for links or, otherwise, should&#xD;
have a way to specify the external host address for links. That means that the web&#xD;
application needs to be able to deal with the presence of a reverse proxy. There is&#xD;
no content-level URL rewriter in this sample that would make any corrections to HTML&#xD;
or XML that’s handed upstream. DasBlog allows you to specify the blog site address&#xD;
as some external address and therefore satisfies that requirements. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Redirects and any other HTTP responses that emit the HTTP ‘Location’ header or any&#xD;
other HTTP headers where URIs are returned are rewritten to map the internal view&#xD;
to the external view. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
If you set &lt;em&gt;enableSilverlightPolicy&lt;/em&gt; to &lt;em&gt;true&lt;/em&gt;, there will be &lt;em&gt;crossdomain.xml&lt;/em&gt; and &lt;em&gt;ClientPolicyAccess.xml&lt;/em&gt; endpoints&#xD;
projected into the root of your project’s namespace, ie. &lt;a title="http://clemensv6.servicebus.windows.net/dasblog/" href="http://clemensv6.servicebus.windows.net/crossdomain.xml"&gt;http://clemensv6.servicebus.windows.net/crossdomain.xml&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/li&gt;&#xD;
        &lt;/ol&gt;&#xD;
        &lt;p&gt;&#xD;
Build. Run. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
By default, the ServiceBusReverseWebProxy.exe application will simply run as a console&#xD;
application. If you use &lt;strong&gt;installutil –i ServiceBusReverseWebProxy.exe&lt;/strong&gt; the&#xD;
application will be installed as a Windows Service. The default identity that it is&#xD;
installed under is ‘NETWORK SERVICE’. In restricted networks with constrained IPSec&#xD;
policies (such as the Microsoft Corporate Network), you may have to use a user account&#xD;
instead. You may also have to use some special Firewall-gateway software such as the&#xD;
ISA Firewall client to allow for outbound access to ports 828 and 818. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The actual application code isn’t really all that complicated. The ‘beef’ is in &lt;strong&gt;ReverseWebProxy.cs&lt;/strong&gt;.&#xD;
What might be surprising here is that this class doesn’t use the WCF Service Model,&#xD;
but is using naked WCF channels for the upstream traffic to .NET Services and it’s&#xD;
using HttpWebRequest for the downstream traffic to the local Web Server. The reason&#xD;
for using channels is that the app is never doing any processing on the messages,&#xD;
so the channel model is the most straightforward and efficient way. The reason for&#xD;
using HttpWebRequest is that you can’t suppress auto-redirects on a WCF HTTP client.&#xD;
Since the stack needs to be completely transparent to redirects so that it’s the browser&#xD;
client up on top that gets redirected instead of someone on the way, I simply couldn’t&#xD;
use a WCF channel downstream. Seems to be one of these edge cases that the WCF team&#xD;
downstairs didn’t think anyone would ever need.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Let me know whether and how this works for you. Share the code, improve it, re-blog,&#xD;
let me know. @clemensv on Twitter, same name @microsoft.com for email.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=83edb04a-5696-401c-a919-8c1f379d130c"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-3yW45j_EiA:HmKubiJorcQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-3yW45j_EiA:HmKubiJorcQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-3yW45j_EiA:HmKubiJorcQ:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=-3yW45j_EiA:HmKubiJorcQ:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-3yW45j_EiA:HmKubiJorcQ:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-3yW45j_EiA:HmKubiJorcQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=-3yW45j_EiA:HmKubiJorcQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-3yW45j_EiA:HmKubiJorcQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=-3yW45j_EiA:HmKubiJorcQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-3yW45j_EiA:HmKubiJorcQ:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-3yW45j_EiA:HmKubiJorcQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=-3yW45j_EiA:HmKubiJorcQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/-3yW45j_EiA" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,83edb04a-5696-401c-a919-8c1f379d130c.aspx</comments>
      <category>.NET Services</category>
      <category>Architecture</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,83edb04a-5696-401c-a919-8c1f379d130c.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=679ca50b-c907-4831-81c4-369ef7b85839</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,679ca50b-c907-4831-81c4-369ef7b85839.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,679ca50b-c907-4831-81c4-369ef7b85839.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=679ca50b-c907-4831-81c4-369ef7b85839</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>XML-RPC with WCF (Updated)</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,679ca50b-c907-4831-81c4-369ef7b85839.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/uzpezDDEcko/PermaLink,guid,679ca50b-c907-4831-81c4-369ef7b85839.aspx</link>
      <pubDate>Fri, 03 Apr 2009 17:09:14 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;div style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; FLOAT: none; PADDING-TOP: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:f13e6b20-a745-4e1c-be87-d241bbf94d4b" class="wlWriterEditableSmartContent"&gt;&#xD;
          &lt;p&gt;&#xD;
XML-RPC for WCF &lt;a href="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/XMLRPCwithWCFUpdated_8EB8/XmlRpcForWCF.zip" target="_blank"&gt;Download&#xD;
here&lt;/a&gt;&lt;/p&gt;&#xD;
        &lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I had updated my WCF XML-RPC stack for PDC’08 but never got around to post it (either&#xD;
too busy or too lazy when not busy). The updated source code is attached to this post. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Contrary to the code that I’ve posted a while back, the new XML-RPC implementation&#xD;
is no longer a binding with a special encoder, but is implemented entirely as a set&#xD;
of behaviors and extensions for the WCF Service Model. The behavior will work with&#xD;
WCF 3.5 as it ships in the framework and also with the .NET Service Bus March 2009&#xD;
CTP.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The resulting Service Model programming experience is completely "normal". That means&#xD;
you can also expose the XML-RPC contracts as SOAP endpoints with all the advanced&#xD;
WCF bindings and features if you like. The behaviors support client and service side.&#xD;
I stripped the config support from this version – I’ll add that back once I get around&#xD;
to it. Here's a snippet from the MetaWeblog contract:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: [ServiceContract(Namespace = http:&lt;span style="COLOR: #008000"&gt;//www.xmlrpc.com/metaWeblogApi)]&lt;/span&gt;&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;interface&lt;/span&gt; IMetaWeblog&#xD;
: IBlogger &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3: {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:    [OperationContract(Action="&lt;span style="COLOR: #8b0000"&gt;metaWeblog.editPost&lt;/span&gt;")] &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:    &lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt; metaweblog_editPost(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; postid, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6:                              &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; username, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7:                              &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; password, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8:                              Post post,&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9:                              &lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt; publish); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:    [OperationContract(Action="&lt;span style="COLOR: #8b0000"&gt;metaWeblog.getCategories&lt;/span&gt;")] &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:    CategoryInfo[] metaweblog_getCategories( &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; blogid, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13:                                             &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; username, &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 14:                                             &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; password); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 15:     ...&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 16: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 17: }&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
Setting up the endpoint is very easy. Pick the WebHttpBinding (or the WebHttpRelayBinding&#xD;
for .NET Service Bus), create an endpoint, add the XmlRpcEndpointBehavior to the endpoint&#xD;
and you’re good to go.&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: Uri baseAddress = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; UriBuilder(Uri.UriSchemeHttp,&#xD;
Environment.MachineName, -1, "&lt;span style="COLOR: #8b0000"&gt;/blogdemo/&lt;/span&gt;").Uri; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3: ServiceHost serviceHost = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; ServiceHost(&lt;span style="COLOR: #0000ff"&gt;typeof&lt;/span&gt;(BloggerAPI)); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4: var epXmlRpc = serviceHost.AddServiceEndpoint(&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:                   &lt;span style="COLOR: #0000ff"&gt;typeof&lt;/span&gt;(IBloggerAPI), &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6:                   &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; WebHttpBinding(WebHttpSecurityMode.None), &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7:                   &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; Uri(baseAddress,&#xD;
"&lt;span style="COLOR: #8b0000"&gt;./blogger&lt;/span&gt;")); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8: epXmlRpc.Behaviors.Add(&lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; XmlRpcEndpointBehavior());&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
The client is just as simple:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1: Uri blogAddress = &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; UriBuilder(Uri.UriSchemeHttp,&#xD;
Environment.MachineName, -1, "&lt;span style="COLOR: #8b0000"&gt;/blogdemo/blogger&lt;/span&gt;").Uri; &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2:             &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3: ChannelFactory&amp;lt;IBloggerAPI&amp;gt; bloggerAPIFactory = &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:      &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; ChannelFactory&amp;lt;IBloggerAPI&amp;gt;( &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:              &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; WebHttpBinding(WebHttpSecurityMode.None), &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6:              &lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; EndpointAddress(blogAddress)); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7: bloggerAPIFactory.Endpoint.Behaviors.Add(&lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt; XmlRpcEndpointBehavior()); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8: &#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9: IBloggerAPI bloggerAPI = bloggerAPIFactory.CreateChannel();&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10: &lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
For your convenience I've included complete Blogger, MetaWeblog, and MovableType API&#xD;
contracts along with the respective data types in the test applications. The test&#xD;
app is a small in-memory blog that you can use with the blogging function of Word&#xD;
2007 or Windows Live Writer or some other blogging client for testing. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Of the other interesting XML-RPC APIs, the &lt;a href="http://www.hixie.ch/specs/pingback/pingback"&gt;Pingback&#xD;
API&lt;/a&gt; has the following contract:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1:  [ServiceContract(Namespace="&lt;span style="COLOR: #8b0000"&gt;http://www.hixie.ch/specs/pingback/pingback&lt;/span&gt;")] &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2:  &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;interface&lt;/span&gt; IPingback &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:  {&#xD;
&lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:      [OperationContract(Action="&lt;span style="COLOR: #8b0000"&gt;pingback.ping&lt;/span&gt;")] &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:      &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; ping(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; sourceUri, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; targetUri); &lt;/pre&gt;&#xD;
          &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6:  }&lt;/pre&gt;&#xD;
        &lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
and the &lt;a href="http://www.xmlrpc.com/weblogsCom"&gt;WeblogUpdates API&lt;/a&gt; looks like&#xD;
this:&#xD;
&lt;/p&gt;&#xD;
        &lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: consolas; FONT-SIZE: 8pt; mso-bidi-font-family: 'Times New Roman'; 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; mso-no-proof: yes"&gt;&#xD;
          &lt;pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  1:     [DataContract]&lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  2:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;struct&lt;/span&gt; WeblogUpdatesReply &lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  3:     {&#xD;
&lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  4:         [DataMember]&#xD;
&lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  5:         &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt; flerror; &lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  6:         [DataMember]&#xD;
&lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  7:         &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; message; &lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  8:     }&#xD;
&lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;  9: &#xD;
&lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 10:     [ServiceContract]&#xD;
&lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 11:     &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;interface&lt;/span&gt; IWeblogUpdates &lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 12:     {&#xD;
&lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 13:         [OperationContract(Action = "&lt;span style="COLOR: #8b0000"&gt;weblogUpdates.extendedPing&lt;/span&gt;")] &lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 14:         WeblogUpdatesReply ExtendedPing(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; weblogName, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; weblogUrl, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; checkUrl, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; rssUrl); &lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 15:         [OperationContract(Action="&lt;span style="COLOR: #8b0000"&gt;weblogUpdates.ping&lt;/span&gt;")] &lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 16:         WeblogUpdatesReply Ping(&lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; weblogName, &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; weblogUrl); &lt;/pre&gt;&#xD;
            &lt;pre style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt; 17:     }&lt;/pre&gt;&#xD;
          &lt;/pre&gt;&#xD;
          &lt;p&gt;&#xD;
          &lt;/p&gt;&#xD;
        &lt;/span&gt;The code is subject to the Microsoft samples license, which means that&#xD;
you can freely put it into your (blogging) apps as long as you keep the house out&#xD;
of trouble.&#xD;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=679ca50b-c907-4831-81c4-369ef7b85839"&gt;&lt;/img&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=uzpezDDEcko:u4RnXRoYymU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=uzpezDDEcko:u4RnXRoYymU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=uzpezDDEcko:u4RnXRoYymU:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=uzpezDDEcko:u4RnXRoYymU:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=uzpezDDEcko:u4RnXRoYymU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=uzpezDDEcko:u4RnXRoYymU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=uzpezDDEcko:u4RnXRoYymU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=uzpezDDEcko:u4RnXRoYymU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=uzpezDDEcko:u4RnXRoYymU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=uzpezDDEcko:u4RnXRoYymU:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=uzpezDDEcko:u4RnXRoYymU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=uzpezDDEcko:u4RnXRoYymU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/uzpezDDEcko" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,679ca50b-c907-4831-81c4-369ef7b85839.aspx</comments>
      <category>.NET Services</category>
      <category>Technology/WCF</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,679ca50b-c907-4831-81c4-369ef7b85839.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=6bd1cf32-05e0-455d-84d7-9147c66815be</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,6bd1cf32-05e0-455d-84d7-9147c66815be.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,6bd1cf32-05e0-455d-84d7-9147c66815be.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=6bd1cf32-05e0-455d-84d7-9147c66815be</wfw:commentRss>
      
      <title>How do I use the .NET Services "December 2008" CTP SDK with the "March 2009" CTP Services?</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,6bd1cf32-05e0-455d-84d7-9147c66815be.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/2SbxNZXfvU8/PermaLink,guid,6bd1cf32-05e0-455d-84d7-9147c66815be.aspx</link>
      <pubDate>Fri, 03 Apr 2009 00:36:18 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Short answer: You can’t. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
There is a range of breaking protocol changes between the December bits and the March&#xD;
bits. Your app won’t work until you upgrade (uninstall/install) to the March 2009&#xD;
CTP &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4eff38b3-fca0-4940-a014-461631152e5d&amp;amp;displaylang=en"&gt;client&#xD;
bits&lt;/a&gt; and/or &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=8D1D1D5E-1332-4186-B33F-26D053759E49&amp;amp;displaylang=en"&gt;SDK&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=6bd1cf32-05e0-455d-84d7-9147c66815be"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=2SbxNZXfvU8:zHg7QxdimPA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=2SbxNZXfvU8:zHg7QxdimPA:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=2SbxNZXfvU8:zHg7QxdimPA:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=2SbxNZXfvU8:zHg7QxdimPA:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=2SbxNZXfvU8:zHg7QxdimPA:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=2SbxNZXfvU8:zHg7QxdimPA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=2SbxNZXfvU8:zHg7QxdimPA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=2SbxNZXfvU8:zHg7QxdimPA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=2SbxNZXfvU8:zHg7QxdimPA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=2SbxNZXfvU8:zHg7QxdimPA:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=2SbxNZXfvU8:zHg7QxdimPA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=2SbxNZXfvU8:zHg7QxdimPA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/2SbxNZXfvU8" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,6bd1cf32-05e0-455d-84d7-9147c66815be.aspx</comments>
      <category>.NET Services</category>
      <category>Azure</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,6bd1cf32-05e0-455d-84d7-9147c66815be.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=413c6128-a6a6-4894-9cc9-701ffb674ab0</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=413c6128-a6a6-4894-9cc9-701ffb674ab0</wfw:commentRss>
      <slash:comments>2</slash:comments>
      
      <title>.NET Services March 2009 CTP - Service Bus Routers And Queues - Part 3: The REST Queue Protocol</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/eSvt-Cj6QfE/PermaLink,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx</link>
      <pubDate>Thu, 02 Apr 2009 22:08:13 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
[If this text looks vaguely familiar you’ve read the HttpQueueSample Readme doc from&#xD;
the SDK. Good job!]&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Here is the Service Bus Queue REST protocol. I apologize if this is a bit dry, but&#xD;
I want to give you the bare protocol facts first and will follow-up with code samples&#xD;
later. Look at the HTTP Queue &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=8D1D1D5E-1332-4186-B33F-26D053759E49&amp;amp;displaylang=en"&gt;SDK&#xD;
sample&lt;/a&gt; if you can’t wait for code ;-)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You can find the HTTP Queue sample in the SDK install path under &lt;em&gt;.\Samples\ServiceBus\ExploringFeatures\Queues\HttpMessages\&lt;/em&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The beauty of REST is that there’s a uniform interface. It’s all just GET, POST, PUT,&#xD;
DELETE, a set of resources, and a rigorous application of the RFC2616 / HTTP 1.1 rules.&#xD;
That doesn’t make the description particularly entertaining, but it does yield a pretty&#xD;
consistent interaction model:&#xD;
&lt;/p&gt;&#xD;
        &lt;h5&gt;Authorization&#xD;
&lt;/h5&gt;&#xD;
        &lt;p&gt;&#xD;
All Queue operations require the client to be appropriately authorized. The client&#xD;
must therefore acquire an lightweight identity token from the Microsoft .NET Access&#xD;
Control Service using the .NET Services solution name and the solution password and&#xD;
include the acquired token with each request. The tokens are added to requests using&#xD;
the &lt;strong&gt;X-MS-Identity-Token&lt;/strong&gt; HTTP header. The value for this header is&#xD;
a short-lived token which can be used for a period of up to 8 hours and must be acquired&#xD;
from the .NET Access Control Service. We strongly encourage you to guard the acquired&#xD;
tokens in the same fashion as you would guard a credential and &lt;strong&gt;you should&#xD;
not&lt;/strong&gt; openly expose them unprotected on the network or web-pages or embedded&#xD;
in a Flash or Silverlight application. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The request for acquiring the token is an HTTPS &lt;strong&gt;GET&lt;/strong&gt; on the URI &lt;em&gt;&lt;strong&gt;https://accesscontrol.windows.net/issuetoken.aspx?u={solutionName}&amp;amp;p={solutionPassword}&lt;/strong&gt;&lt;/em&gt; whereby&#xD;
you replace the arguments for solution name and the solution password with your .NET&#xD;
Services solution credentials. If a token is successfully issued to you the request&#xD;
returns with a 200 (OK) status code and contains a &lt;em&gt;&lt;strong&gt;text/plain&lt;/strong&gt;&lt;/em&gt; entity&#xD;
body with a short, base64 encoded token hash as a single line of text, which you for&#xD;
the value of the X-MS-Identity-Token header. &#xD;
&lt;/p&gt;&#xD;
        &lt;h5&gt;Creating a Queue&#xD;
&lt;/h5&gt;&#xD;
        &lt;p&gt;&#xD;
A Queue is created on the Service Bus in four simple steps. I’ve discussed most of&#xD;
this in the post on &lt;a href="http://vasters.com/clemensv/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx"&gt;Queue&#xD;
Policies&lt;/a&gt;: &#xD;
&lt;/p&gt;&#xD;
        &lt;ol&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;p&gt;&#xD;
Select a name in the Service Bus naming hierarchy where the Queue should be located,&#xD;
i.e. &lt;strong&gt;https://&lt;/strong&gt;&lt;em&gt;&lt;strong&gt;mysolution&lt;/strong&gt;&lt;/em&gt;&lt;strong&gt;.servicebus.windows.net/myapp/q1&lt;/strong&gt;&lt;/p&gt;&#xD;
          &lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;p&gt;&#xD;
              &lt;a href="http://vasters.com/clemensv/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx"&gt;Create&#xD;
a Queue policy&lt;/a&gt; and define the desired properties of the Queue. &#xD;
&lt;/p&gt;&#xD;
          &lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;p&gt;&#xD;
Embed the Queue policy into an ATOM 1.0 &lt;em&gt;&lt;strong&gt;&amp;lt;atom:entry&amp;gt;&lt;/strong&gt;&lt;/em&gt; as&#xD;
an extension and &lt;strong&gt;POST&lt;/strong&gt; the entry to the designated Queue URI with&#xD;
the content-type &lt;em&gt;&lt;strong&gt;application/atom+xml;type=entry&lt;/strong&gt;.&lt;/em&gt;&lt;em&gt;&lt;/em&gt;The&#xD;
request must carry an X-MS-Identity-Token header and the respective identity must&#xD;
have 'Manage' permission on for scope covering the Queue URI.&#xD;
&lt;/p&gt;&#xD;
          &lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;p&gt;&#xD;
If the queue was successfully created, the POST request returns with a &lt;strong&gt;201&lt;/strong&gt; 'created'&#xD;
status code along with a &lt;strong&gt;Location&lt;/strong&gt; header. The response entity body&#xD;
contains the effective Queue policy as applied to the name by the Service Bus. &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
The location header contains the queue's management URI that you need to retain in&#xD;
your application state to have access to the queue's metadata and management functions.&#xD;
If the queue could not be created successfully, the request may yield the following&#xD;
status codes: &#xD;
&lt;/p&gt;&#xD;
            &lt;ul&gt;&#xD;
              &lt;li&gt;&#xD;
                &lt;p&gt;&#xD;
                  &lt;strong&gt;400&lt;/strong&gt; - Bad Request. The policy was malformed or invalid.&#xD;
&lt;/p&gt;&#xD;
              &lt;/li&gt;&#xD;
              &lt;li&gt;&#xD;
                &lt;p&gt;&#xD;
                  &lt;strong&gt;403&lt;/strong&gt; - Forbidden. The client did not provide a X-MS-Identity-Token&#xD;
header, the provided token is no longer valid for use, or the provided identity is&#xD;
not authorized to create a Queue at this location.&#xD;
&lt;/p&gt;&#xD;
              &lt;/li&gt;&#xD;
              &lt;li&gt;&#xD;
                &lt;p&gt;&#xD;
                  &lt;strong&gt;409&lt;/strong&gt; - Conflict.  There is already a Queue with an incompatible&#xD;
policy at the given location or the location is occupied by a Router or a Service&#xD;
Bus listener.&#xD;
&lt;/p&gt;&#xD;
              &lt;/li&gt;&#xD;
              &lt;li&gt;&#xD;
                &lt;p&gt;&#xD;
                  &lt;strong&gt;415&lt;/strong&gt; - Unsupported Media Type. The request did not carry the required&#xD;
content-type header.&#xD;
&lt;/p&gt;&#xD;
              &lt;/li&gt;&#xD;
              &lt;li&gt;&#xD;
                &lt;p&gt;&#xD;
                  &lt;strong&gt;500&lt;/strong&gt; - Internal Server Error. The processing failed to to a condition&#xD;
internal to the Service Bus service.&#xD;
&lt;/p&gt;&#xD;
              &lt;/li&gt;&#xD;
            &lt;/ul&gt;&#xD;
          &lt;/li&gt;&#xD;
        &lt;/ol&gt;&#xD;
        &lt;h5&gt;REST Anatomy of a Queue&#xD;
&lt;/h5&gt;&#xD;
        &lt;p&gt;&#xD;
Each Queue has five distinct types of resources: &lt;strong&gt;Policy&lt;/strong&gt;, &lt;strong&gt;Tail&lt;/strong&gt;, &lt;strong&gt;Head&lt;/strong&gt;, &lt;strong&gt;Locks&lt;/strong&gt;,&#xD;
and &lt;strong&gt;Control&lt;/strong&gt;. The concrete URIs are discoverable using the Service&#xD;
Registry's Atom Publishing protocol. you should not make any assumptions about the&#xD;
particular format of the URIs spelled out below since the particular format might&#xD;
change.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The Atom 1.0 entry shown below is also enclosed in the response entity body of the&#xD;
create request (POST) explained above. A Queue's representation in the registry feed&#xD;
as seen when doing a &lt;strong&gt;GET&lt;/strong&gt; (discovery-) request on the queue's parent&#xD;
URI is commonly as follows:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;&amp;lt;feed xmlns="http://www.w3.org/2005/Atom"&amp;gt;&#xD;
  ...&#xD;
  &amp;lt;entry&amp;gt;&#xD;
    &amp;lt;id&amp;gt;{id}&amp;lt;/id&amp;gt;&#xD;
    &amp;lt;title type="text"&amp;gt;MyHttpQueue&amp;lt;/title&amp;gt;&#xD;
    &amp;lt;updated&amp;gt;{date}&amp;lt;/updated&amp;gt;&#xD;
    &amp;lt;link rel="alternate" href="https://solution.servicebus.windows.net/myapp/q1" /&amp;gt;&#xD;
    &amp;lt;link rel="self" href="https://solution.servicebus.windows.net/myapp/q1!(queue)" /&amp;gt;&#xD;
    &amp;lt;link rel="queuehead" href="https://solution.servicebus.windows.net/myapp/q1!(queue/head)" /&amp;gt;&#xD;
    &amp;lt;link rel="queuecontrol" href="https://solution.servicebus.windows.net/myapp/q1!(queue/control)" /&amp;gt;&#xD;
    &amp;lt;QueuePolicy xmlns="http://schemas.microsoft.com/ws/2007/08/connect"&amp;gt;&#xD;
      &amp;lt;Discoverability&amp;gt;Public&amp;lt;/Discoverability&amp;gt;&#xD;
      &amp;lt;ExpirationInstant&amp;gt;{expiration}&amp;lt;/ExpirationInstant&amp;gt;&#xD;
    &amp;lt;/QueuePolicy&amp;gt;&#xD;
  &amp;lt;/entry&amp;gt;&#xD;
&amp;lt;/feed&amp;gt;&lt;/pre&gt;&#xD;
        &lt;h5&gt;&#xD;
        &lt;/h5&gt;&#xD;
        &lt;h5&gt;Managing The Queue&#xD;
&lt;/h5&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;em&gt;&amp;lt;link rel="self" href="https://solution.servicebus.windows.net/myapp/q1!(queue)"&#xD;
/&amp;gt; &#xD;
&lt;br&gt;&lt;/em&gt;&#xD;
          &lt;br&gt;&#xD;
The "&lt;strong&gt;self&lt;/strong&gt;" link in the entry above is the queue's management URI&#xD;
that allows you to interact with the queue's policy. &#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;p&gt;&#xD;
To renew a queue and extend its expiration you &lt;strong&gt;PUT&lt;/strong&gt; an updated Atom&#xD;
1.0 entry with the effective policy and an updated &lt;em&gt;ExpirationInstant&lt;/em&gt; value&#xD;
to the "self" URI.  The "self" URI is the same URI as the one returned in the &lt;strong&gt;Location&lt;/strong&gt; header&#xD;
returned by the create POST explained above. The request will yield a &lt;strong&gt;200&lt;/strong&gt; status&#xD;
code if the renewal is successful. It will yield a&lt;strong&gt; 404&lt;/strong&gt; if the queue&#xD;
no longer exists.&#xD;
&lt;/p&gt;&#xD;
          &lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;p&gt;&#xD;
To delete a queue you issue a&lt;strong&gt; DELETE &lt;/strong&gt;request on  the queue's&#xD;
management URI. The Delete request is sent without any entity body and MUST have a&#xD;
Content-Length header that is set to zero (0). Not setting this header will yield&#xD;
a &lt;strong&gt;411&lt;/strong&gt; status code. The request yields a &lt;strong&gt;204&lt;/strong&gt; response&#xD;
if the queue was deleted successfully.&#xD;
&lt;/p&gt;&#xD;
          &lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;h5&gt;Enqueue&#xD;
&lt;/h5&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;em&gt;&amp;lt;link rel="alternate" href="https://solution.servicebus.windows.net/myapp/q1"&#xD;
/&amp;gt;&lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The "&lt;strong&gt;alternate&lt;/strong&gt;" link refers to the tail of the queue. The Queue's &lt;em&gt;tail&lt;/em&gt; resource&#xD;
is where senders submit messages into the Queue. The queue's tail URI is identical&#xD;
to the URI where the queue was initially created. The queue's tail endpoint accepts&#xD;
requests with any HTTP Content-Type and any HTTP method except GET, HEAD, and OPTIONS.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The endpoint should be considered a 'delegate' of the message recipient and not the&#xD;
resource that the respective operations have an immediate effect on. That means that&#xD;
the HTTP method applied to the Queue tail doesn’t have any particular semantic. If&#xD;
a message has been successfully accepted into the queue, the request returns a &lt;strong&gt;202&lt;/strong&gt; status&#xD;
code. Otherwise it will return a &lt;strong&gt;500&lt;/strong&gt;&lt;/p&gt;&#xD;
        &lt;h5&gt;Dequeue and Peek/Lock&#xD;
&lt;/h5&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;em&gt;&amp;lt;link rel="queuehead" href="https://solution.servicebus.windows.net/myapp/q1!(queue/head)"&#xD;
/&amp;gt;&lt;br&gt;&lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The "&lt;strong&gt;queuehead&lt;/strong&gt;" link refers to the head of the Queue. The Queue's &lt;em&gt;head&lt;/em&gt; resource&#xD;
is where receivers retrieve messages from the queue. It is modeled as a resource whose&#xD;
current representation corresponds to the message(s) that reside at the head of the&#xD;
queue and which is/are next in line to be retrieved by consumers. Permitted operations&#xD;
on the head are: &#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;DELETE&lt;/strong&gt;:  Delete performs a destructive read on the queue whereby&#xD;
the message(s) at the head of the queue are permanently deleted and returned as the&#xD;
entity body of the response to the request. The content type and formatting of the&#xD;
response depends on a set of query parameters that are discussed below. The DELETE&#xD;
request's response status code is &lt;strong&gt;200&lt;/strong&gt; if at least one message could&#xD;
be retrieved and deleted from the queue and the message content is enclosed in the&#xD;
response's entity body. The response status code is &lt;strong&gt;204&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;if&#xD;
no message could be retrieved/deleted. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;POST:&lt;/strong&gt; Post creates a lock on the message(s) at the head of the queue&#xD;
and returns the locked messages. Locked messages are temporarily removed from the&#xD;
head of the queue for a period of 1 minute during which time the receiver can decide&#xD;
whether to return the message to the head of the queue or whether to permanently delete&#xD;
it. The POST request's response status code is &lt;strong&gt;200&lt;/strong&gt; if at least one&#xD;
message could be retrieved and locked on the queue and the message content is enclosed&#xD;
in the response's entity body. The response status code is &lt;strong&gt;204&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;if&#xD;
no message could be retrieved/locked.&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;h5&gt;Releasing and Deleting Peek/Lock Message Locks &#xD;
&lt;/h5&gt;&#xD;
        &lt;p&gt;&#xD;
Any retrieved, peek/locked message (POST on “queuehead”) contains an HTTP header &lt;strong&gt;X-MS-Message-Lock &lt;/strong&gt;whose&#xD;
value is a URI. The following operations can be performed on this URI:&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;DELETE: &lt;/strong&gt;The message has been accepted/processed by the receiver and&#xD;
the lock shall be deleted. The deletion of the lock discards the message permanently&#xD;
from the queue. The Delete request is sent without any entity body and MUST have a&#xD;
Content-Length header that is set to zero (0). Not setting this header will yield&#xD;
a &lt;strong&gt;411&lt;/strong&gt; status code. The request yields a &lt;strong&gt;204&lt;/strong&gt; response&#xD;
if the lock was deleted successfully. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;PUT:&lt;/strong&gt;  The message has been not been accepted/processed by the&#xD;
receiver and the message shall be put back at the head of the queue. This operation&#xD;
transitions the lock from the locked state into the unlocked state which releases&#xD;
the message back into the queue. The lock itself is discarded afterwards. The Put&#xD;
request is sent without any entity body and MUST have a Content-Length header that&#xD;
is set to zero (0). Not setting this header will yield a &lt;strong&gt;411&lt;/strong&gt; status&#xD;
code. The request yields a &lt;strong&gt;204&lt;/strong&gt; response if the lock was released&#xD;
successfully.&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;h5&gt;Options for Dequeue and Peek/Lock&#xD;
&lt;/h5&gt;&#xD;
        &lt;p&gt;&#xD;
The &lt;strong&gt;DELETE&lt;/strong&gt; and &lt;strong&gt;POST&lt;/strong&gt; operation have a set of options&#xD;
that are expressed as query parameters appended to the queue's head URI. The options&#xD;
are the same for both operations:&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;p&gt;&#xD;
              &lt;strong&gt;timeout=&lt;/strong&gt;&#xD;
              &lt;em&gt;&#xD;
                &lt;strong&gt;value&lt;/strong&gt; - &lt;/em&gt;The value is a numerical&#xD;
value (expressed in seconds) that indicates how long the client is willing to wait&#xD;
for the polling request to complete. The value should not exceed 60 seconds and a&#xD;
value of 30 seconds is a safer choice with intermediate proxies in place. If the timeout&#xD;
expires and no message is available, the request completes with a&lt;strong&gt; 204 &lt;/strong&gt;response&#xD;
code. &lt;strong&gt;&lt;/strong&gt;The default value is zero (0), which means that the request&#xD;
returns immediately.&lt;br&gt;&lt;/p&gt;&#xD;
          &lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;p&gt;&#xD;
              &lt;strong&gt;maxmessages=&lt;em&gt;value&lt;/em&gt;&lt;/strong&gt;&#xD;
              &lt;em&gt; - &lt;/em&gt;Indicates how many messages&#xD;
the client is willing to accept in a single response. The default is 1. The service&#xD;
will return at most 10 messages at a time and a value greater than zero &lt;em&gt;requires&lt;/em&gt; encoding=multipart&#xD;
(see below)&lt;br&gt;&lt;/p&gt;&#xD;
          &lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;p&gt;&#xD;
              &lt;strong&gt;encoding=&lt;em&gt;value&lt;/em&gt;&lt;/strong&gt;&#xD;
              &lt;em&gt; - &lt;/em&gt;There are three supported encoding&#xD;
modes for the REST retrieval model &#xD;
&lt;/p&gt;&#xD;
            &lt;ul&gt;&#xD;
              &lt;li&gt;&#xD;
                &lt;p&gt;&#xD;
                  &lt;strong&gt;asreply&lt;/strong&gt; - The request stored in the Queue is mapped onto the response&#xD;
to the DELETE/POST request returning the message from the queue. This option requires&#xD;
maxmessages=1 or omission of the maxmessages option.&#xD;
&lt;/p&gt;&#xD;
              &lt;/li&gt;&#xD;
              &lt;li&gt;&#xD;
                &lt;p&gt;&#xD;
                  &lt;strong&gt;single&lt;/strong&gt; - The request stored in the queue is returned as a complete&#xD;
HTTP request frame on the response to the DELETE/POST request using Content-Type &lt;strong&gt;&lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.1"&gt;application/http&lt;/a&gt;&lt;/strong&gt;.&#xD;
This option requires maxmessages=1 or omission of the maxmessages option.&#xD;
&lt;/p&gt;&#xD;
              &lt;/li&gt;&#xD;
              &lt;li&gt;&#xD;
                &lt;p&gt;&#xD;
                  &lt;strong&gt;multipart&lt;/strong&gt; - The request(s) stored in the queue are returned as a&#xD;
complete HTTP request frames on the response to the DELETE/POST request using Content-Type &lt;strong&gt;&lt;a href="http://www.ietf.org/rfc/rfc2046.txt"&gt;multipart/mixed&lt;/a&gt;&lt;/strong&gt; with&#xD;
MIME parts of Content-Type &lt;strong&gt;&lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.1"&gt;application/http&lt;/a&gt;&lt;/strong&gt;. &#xD;
&lt;/p&gt;&#xD;
              &lt;/li&gt;&#xD;
            &lt;/ul&gt;&#xD;
          &lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;h5&gt;Queue Content Control&#xD;
&lt;/h5&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;em&gt;&amp;lt;link rel="queuecontrol" href="https://solution.servicebus.windows.net/myapp/q1!(queue/control)"&#xD;
/&amp;gt;&lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The "&lt;strong&gt;queuecontrol&lt;/strong&gt;" link refers to the &lt;em&gt;control&lt;/em&gt; resource provides&#xD;
information about the status of the queue and allows for purging all of the queue's&#xD;
contents. The control resource is present in the current CTP, but you cannot perform&#xD;
any operations on it. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=413c6128-a6a6-4894-9cc9-701ffb674ab0"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=eSvt-Cj6QfE:g5Kl1bWZT2k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=eSvt-Cj6QfE:g5Kl1bWZT2k:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=eSvt-Cj6QfE:g5Kl1bWZT2k:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=eSvt-Cj6QfE:g5Kl1bWZT2k:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=eSvt-Cj6QfE:g5Kl1bWZT2k:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=eSvt-Cj6QfE:g5Kl1bWZT2k:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=eSvt-Cj6QfE:g5Kl1bWZT2k:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=eSvt-Cj6QfE:g5Kl1bWZT2k:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=eSvt-Cj6QfE:g5Kl1bWZT2k:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=eSvt-Cj6QfE:g5Kl1bWZT2k:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=eSvt-Cj6QfE:g5Kl1bWZT2k:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=eSvt-Cj6QfE:g5Kl1bWZT2k:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/eSvt-Cj6QfE" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx</comments>
      <category>.NET Services</category>
      <category>Azure</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,413c6128-a6a6-4894-9cc9-701ffb674ab0.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=0f64f592-7239-42fc-aed2-f0993701c5f6</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=0f64f592-7239-42fc-aed2-f0993701c5f6</wfw:commentRss>
      
      <title>.NET Services March 2009 CTP - Service Bus Routers And Queues - Part 2: Queue Policies</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/9dkjQaEK1Ys/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx</link>
      <pubDate>Thu, 02 Apr 2009 20:10:25 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://vasters.com/clemensv/PermaLink,guid,8e30d2eb-6e2d-4dc5-8aba-5aa410e450de.aspx"&gt;In&#xD;
the previous post in this series&lt;/a&gt; I’ve discussed some of the foundational principles&#xD;
of the new Queue and Router features of the .NET Services Bus and the role that policies&#xD;
play in turning names in the namespace into messaging primitives. In this post I’ll&#xD;
start drilling into the capabilities of the Queue feature and will discuss what’s&#xD;
in the queue policy. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The capabilities of the Queue are best explored by looking at the Queue policy. Policies&#xD;
can be expressed in two ways: You can either you use the .NET Services SDK’s &lt;strong&gt;Microsoft.ServiceBus.QueuePolicy&lt;/strong&gt; class&#xD;
with a .NET application or you can just whip up a bit of XML. The structure and the&#xD;
serialized representation of that class is exactly equivalent to an XML queue policy&#xD;
you’d wire up “by hand” and thus I’ll discuss the policy in terms of its XML elements:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The queue policy has the element name “&lt;strong&gt;QueuePolicy&lt;/strong&gt;” within the XML&#xD;
namespace “&lt;em&gt;&lt;strong&gt;http://schemas.microsoft.com/ws/2007/08/connect&lt;/strong&gt;”. &lt;/em&gt;That’s&#xD;
the namespace we use for most protocols and data structures in the .NET Service Bus&#xD;
at this development stage and you should expect that we’re migrating to the “final”&#xD;
V1 namespaces in one of the next CTPs.  If you use the .NET class you’ll just&#xD;
have to recompile to snap to new namespaces once they come around.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Below is a list of the policy’s elements and the permitted values. All elements are&#xD;
optional and can appear at most once. The default value applies when an element is&#xD;
omitted. It’s perfectly ok to send an empty &lt;em&gt;QueuePolicy&lt;/em&gt; and accept the default&#xD;
values to keep things simple. I’d recommend to always set the &lt;em&gt;ExpirationInstant&lt;/em&gt; value,&#xD;
however. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
One required forward reference: Don’t get confused or distracted trying to figure&#xD;
out from here what it means “to provide an authorization token”. The docs explain&#xD;
this and I’ll also address this in the next blog post when I dive into the protocol. &#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;Authorization&lt;/strong&gt; – The authorization setting indicates whether sender&#xD;
and/or consumers must provide a security token when interacting with the queue. You&#xD;
can explicitly permit the .NET Service Bus to allow anonymous consumers and/or anonymous&#xD;
senders on a Queue. If a token is required, a sender must present a token with “Send”&#xD;
permission that is issued by the .NET Access Control service and the consumer must&#xD;
present a token with “Listen” permission that is issued by the .NET Access Control&#xD;
service. The respective rules are set up in the .NET Access Control service on your&#xD;
project’s “Service Bus” scope. Mind that all anonymous traffic is attributed to the&#xD;
“manager” of a Queue, i.e. to whoever sets the policy; all traffic is metered and&#xD;
accounted for. The permitted values for this element are: &#xD;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Required&lt;/strong&gt; – (default) Senders and Consumers must provide an authorization&#xD;
token to send/retrieve messages. &#xD;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;RequiredToSend&lt;/strong&gt; – Senders must provide an authorization token with&#xD;
a “Send” claim to send messages, consumers don’t. &#xD;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;RequiredToReceive&lt;/strong&gt; – Consumers must provide an authorization token&#xD;
with a “Listen” claim to receiver messages, senders don’t. &#xD;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;NotRequired&lt;/strong&gt; – Neither senders nor consumers must provide a token,&#xD;
i.e. the queue is set up for anonymous traffic.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;Discoverability&lt;/strong&gt; – The discoverability setting defines under which&#xD;
conditions the Queue and its policy are visible in the Service Registry Atom feed&#xD;
and any forthcoming discoverability mechanisms. When you are browsing the Service&#xD;
Registry feed from within a browser, the only setting that will make the Queue visible&#xD;
is &lt;em&gt;Public&lt;/em&gt; since the browser isn’t able to attach an authorization token without&#xD;
some scripting assistance.  &#xD;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Managers&lt;/strong&gt; - (default) The Queue and its policy are only discoverable&#xD;
if you provide an authorization token with the request and the token carries a “Manage”&#xD;
claim. &#xD;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ManagersListeners&lt;/strong&gt; – The Queue and its policy are only discoverable&#xD;
if you provide and authorization token with the request and the token carries a “Manage”&#xD;
and/or “Listen” claim. &#xD;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ManagersListenersSenders&lt;/strong&gt; – The Queue and its policy are only discoverable&#xD;
if you provide and authorization token with the request and the token carries a “Manage”&#xD;
and/or “Listen” and/or “Send” claim. &#xD;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Public&lt;/strong&gt; – The Queue and its policy are discoverable without any authorization&#xD;
requirement, i.e. the general public.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;ExpirationInstant&lt;/strong&gt; – This is an XML dateTime value indicating the&#xD;
TTL (time-to-live) for the Queue. You can make Queues long-lived or short-lived. A&#xD;
Queue’s lifetime may be extended by changing this policy value and reapplying the&#xD;
policy. Once a Queue expires it is removed from the system along with all the messages&#xD;
that reside in it. The system may limit the Queue lifetime in the effective policy&#xD;
that you get back from the create/update request, but we’ll typically allow at least&#xD;
24 hours without renewal. This value has a default of 24 hours, a maximum of 21 days&#xD;
and a minimum of 30 seconds. The value must represent a future dateTime and must be&#xD;
expressed in UTC. &#xD;
&lt;br&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;MaxMessageSize&lt;/strong&gt; – This is a numeric value defining the maximum size&#xD;
of any individual message that can be accepted into the Queue. The maximum message&#xD;
size is expressed in bytes and includes all infrastructure-imposed and encoding-related&#xD;
overhead. The actual overhead varies significantly based on whether messages are sent&#xD;
as SOAP 1.1, SOAP 1.2, or plain HTTP frames using text or binary encoding and whether&#xD;
a security token is required. A very defensive assumption is to reserve 10-12KB for&#xD;
protocol overhead in complex cases with WS* Security; the minimal allocation for protocol&#xD;
overhead should be around 4KB. The &lt;strong&gt;default&lt;/strong&gt; and &lt;strong&gt;maximum&lt;/strong&gt; values&#xD;
for the maximum message size is &lt;strong&gt;60KB&lt;/strong&gt; (60*1024 bytes). The minimum&#xD;
value is &lt;strong&gt;8KB&lt;/strong&gt;. We suggest that the &lt;strong&gt;payload size&lt;/strong&gt; for&#xD;
an individual message does &lt;strong&gt;not exceed&lt;/strong&gt;&lt;strong&gt;48KB&lt;/strong&gt;, even&#xD;
though you can try to push it a bit. The expectation is that these values will trend&#xD;
up but I don’t see them more than doubling due to throughput, timeliness and scale&#xD;
considerations. If your data is larger you should consider how you can chunk it up. &#xD;
&lt;br&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;TransportProtection&lt;/strong&gt; – The transport protection setting defines whether&#xD;
senders and consumers &lt;strong&gt;must&lt;/strong&gt; use HTTPS to interact with the Queue.&#xD;
This is the default setting. You would modify this to accommodate clients – typically&#xD;
on devices - that don’t do HTTPS all that well. Permitted values:  &#xD;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;AllPaths&lt;/strong&gt; - (default) Any interaction with the queue requires HTTPS. &#xD;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;None&lt;/strong&gt; – Any interaction may be performed using either HTTP or HTTPS.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;EnqueueTimeout&lt;/strong&gt; – The enqueue timeout is an XML duration value that&#xD;
specifies how long an enqueue operation will hang if the queue is at capacity (full).&#xD;
The default value is 10 seconds, the minimum is 0 seconds, and the maximum is 60 seconds.&#xD;
If the timeout expires and the message could not be added to the queue during that&#xD;
time, the queue will act according to the &lt;strong&gt;Overflow&lt;/strong&gt; policy setting. &#xD;
&lt;br&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;MaxConcurrentReaders&lt;/strong&gt; - &lt;font color="#ff8000"&gt;[this setting not supported/enforced&#xD;
in the March 2009 CTP]&lt;/font&gt; The &lt;em&gt;maximum concurrent readers&lt;/em&gt; value defines&#xD;
how many concurrent readers are permitted on the queue. If this numeric value is smaller&#xD;
than the default value of 2^31 (max int), the queue protocol will switch into ‘session&#xD;
mode’ that grants a limited number of read-locks on the queue. The minimum value is&#xD;
1. &#xD;
&lt;br&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;MaxDequeueRetries&lt;/strong&gt; - &lt;font color="#ff8000"&gt;[this setting not supported/enforced&#xD;
in the March 2009 CTP]&lt;/font&gt; The &lt;em&gt;maximum dequeue retries&lt;/em&gt; value defines how&#xD;
often a message may be peek/locked and put back into the queue until it is considered&#xD;
poisonous, i.e. after how many retries it should be expected the the consumer will&#xD;
not be able to ever consume the message successfully, because it is malformed or the&#xD;
consumer experiences an error condition that requires some form of manual intervention&#xD;
(including a bug fix). If the message is found to be poisonous it will be sent once&#xD;
and without any retries to the endpoint specified in the policy’s &lt;strong&gt;PoisonMessageDrop&lt;/strong&gt; value. &#xD;
&lt;br&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;MaxMessageAge&lt;/strong&gt; – The &lt;em&gt;maximum message age&lt;/em&gt; is an XML duration&#xD;
value indicating after what time any enqueued message is considered ‘stale” and will&#xD;
be automatically dropped and removed from the queue. The default value is 10 minutes&#xD;
(600 seconds), the minimum value is 0 seconds (which effectively means that all incoming&#xD;
messages get dropped), the maximum value is 7 days. &#xD;
&lt;br&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;MaxQueueCapacity&lt;/strong&gt; – This numeric value indicates the maximum size&#xD;
of the Queue in bytes. This is a system-calculated value that cannot be set on the&#xD;
.NET class and should not be set by clients creating policies from scratch. The default&#xD;
and &lt;strong&gt;maximum capacity&lt;/strong&gt; of any queue is currently capped at &lt;strong&gt;2MB&lt;/strong&gt;.&#xD;
This is a limitation specific to the March 2009 CTP , it’s been painful to impose&#xD;
this constraint, and it’s absolutely expected that this limit will be expanded significantly.&#xD;
2MB still allow for a several hundred notification messages of a 2-4KB. If you need&#xD;
to store more data you can absolutely create several queues and partition data across&#xD;
them either explicitly or using Routers with a load-balancing message distribution&#xD;
policy (more on that in a subsequent post). &#xD;
&lt;br&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;MaxQueueLength&lt;/strong&gt; – This numeric value indicates the maximum queue length.&#xD;
The maximum and default value is 2^31, the minimum value is 1. &lt;font color="#ff8000"&gt;We’re&#xD;
not enforcing the exact queue length in the March 2009 CTP&lt;/font&gt;, but your code should&#xD;
assume that we do. The queue length value is the basis for the calculation of the &lt;strong&gt;MaxQueueCapacity&lt;/strong&gt;,&#xD;
with MaxQueueCapacity = min(MaxQueueLength * MaxMessageSize, 2MB) enforcing the hard&#xD;
2MB limit that is currently in effect. You don’t need to touch this value unless you’d&#xD;
really want a Queue that’s even more size-constrained. &#xD;
&lt;br&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;Overflow&lt;/strong&gt; – The overflow policy setting becomes relevant when the&#xD;
queue is at capacity and the &lt;strong&gt;EnqueueTimeout&lt;/strong&gt; has expired. It tells&#xD;
the Queue what to do with the message that just came in and that can’t be put into&#xD;
the queue because it’s full. Permitted values:  &#xD;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;RejectIncomingMessage&lt;/strong&gt; - (default) The message will be rejected and&#xD;
an error status code or SOAP fault will be sent to the sender. &#xD;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DiscardIncomingMessage&lt;/strong&gt; – The sender will get an indication that the&#xD;
message has been accepted, but the message will be dropped on the floor. &#xD;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DiscardExistingMessage&lt;/strong&gt; – The Queue will remove and discard messages&#xD;
from the head of the Queue until the new, incoming message fits in the Queue.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;strong&gt;PoisonMessageDrop&lt;/strong&gt; – &lt;font color="#ff8000"&gt;[this setting not supported&#xD;
in the March 2009 CTP]&lt;/font&gt; This value is a WS-Addressing 1.0 EndpointReference&#xD;
referring to an endpoint that any poison messages will be sent to once the &lt;strong&gt;MaxDequeueRetries&lt;/strong&gt; limit&#xD;
has been exceeded. The EndpointReference may point to any SOAP or plain HTTP endpoint&#xD;
that can accept ‘any’ message. &#xD;
&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
Phew! Lots of options. The good thing is that most apps should be ok with the defaults. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I know that the 2MB capacity limit is somewhat disappointing and I’m certainly not&#xD;
happy with it. There’s a particular behavior (with bug number) that may occur under&#xD;
very rare circumstances in the underlying replication system, which caused us to play&#xD;
it very safe instead of risking data loss. I don’t think the limit is a showstopper&#xD;
for apps that send notifications and events around – it is a showstopper for apps&#xD;
that want to exchange larger payloads and we’re working to relax that limit and make&#xD;
Queues much, much larger as soon as we can. You can obviously always spool larger&#xD;
data into SDS or one of the Azure storage systems and then send a reference to that&#xD;
data as a message, but it’d be strange for a messaging system to make that a required&#xD;
pattern for data of all sizes. If we’re talking hundreds of megabytes it makes sense,&#xD;
though.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
With the due apology out of the way, let’s look at how a policy may be applied to&#xD;
a namespace name – or in other words, how a queue is created in the simplest case&#xD;
(this must be done via HTTPS). The model here is that the client &lt;em&gt;proposes&lt;/em&gt; a&#xD;
policy and Service Bus is at liberty to adjust the policy. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If you are intimately familiar with Atom, you’ll notice that the &amp;lt;QueuePolicy&amp;gt;&#xD;
is an extension and isn’t carried as &amp;lt;content&amp;gt;. That’s by intent. &amp;lt;content&amp;gt;&#xD;
is for people, extensions are for apps. We’ll start using &amp;lt;content&amp;gt; in a later&#xD;
milestone, so consider that being &lt;em&gt;reserved&lt;/em&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font face="Courier New"&gt;&#xD;
            &lt;strong&gt;HTTP/1.1 POST /myapp/q1&lt;br&gt;&#xD;
Host: clemensv.servicebus.windows.net&lt;br&gt;&#xD;
X-MS-Identity-Token: A6hbJklu18hsnHRql61k1==&lt;br&gt;&#xD;
Content-Type: application/atom+xml;type=entry;charset=utf-8&lt;br&gt;&#xD;
Content-Length: nnn&lt;br&gt;&lt;br&gt;&#xD;
&amp;lt;entry xmlns=”&lt;em&gt;http://www.w3.org/2005/Atom&lt;/em&gt;”&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;QueuePolicy xmlns=”&lt;/strong&gt;&#xD;
            &lt;strong&gt;&#xD;
              &lt;em&gt;http://schemas.microsoft.com/ws/2007/08/connect”&amp;gt;&lt;br&gt;&#xD;
      &amp;lt;ExpirationInstant&amp;gt;2009-04-03T12:00:00&amp;lt;/ExpirationInstant&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;/QueuePolicy&amp;gt; &lt;/em&gt;&#xD;
              &lt;br&gt;&#xD;
&amp;lt;/entry&amp;gt;&lt;/strong&gt;&#xD;
          &lt;/font&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If the queue can be created, the response is a 200 and you get the policy back along&#xD;
with any adjustments that the service may make. This is called the “effective” policy,&#xD;
i.e. that’s what the server is using. You also learn about where you can modify the&#xD;
policy, since – &lt;a href="http://vasters.com/clemensv/PermaLink,guid,8e30d2eb-6e2d-4dc5-8aba-5aa410e450de.aspx"&gt;as&#xD;
I explained before&lt;/a&gt; – the endpoint where you POST the policy to is morphing into&#xD;
the Queue’s tail.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font face="Courier New"&gt;&#xD;
            &lt;strong&gt;HTTP/1.1 200 OK&lt;br&gt;&#xD;
Location: https://project-name.servicebus.windows.net/myapp/q1!(queue)&lt;br&gt;&#xD;
Content-Type: application/atom+xml;type=entry;charset=utf-8&lt;br&gt;&#xD;
Content-Length: nnn&lt;br&gt;&lt;br&gt;&#xD;
&amp;lt;entry xmlns=”&lt;em&gt;http://www.w3.org/2005/Atom&lt;/em&gt;”&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;link rel=”self” href=”https://project-name.servicebus.windows.net/myapp/q1!(queue)”&#xD;
/&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;link rel=”alternate” href=”https://project-name.servicebus.windows.net/myapp/q1”&#xD;
/&amp;gt; &#xD;
&lt;br&gt;&#xD;
   &amp;lt;link rel=”queuehead” href=”https://project-name.servicebus.windows.net/myapp/q1!(queue/head)”&#xD;
/&amp;gt; &#xD;
&lt;br&gt;&#xD;
   &amp;lt;QueuePolicy xmlns=”&lt;/strong&gt;&#xD;
          &lt;/font&gt;&#xD;
          &lt;font face="Courier New"&gt;&#xD;
            &lt;strong&gt;&#xD;
              &lt;em&gt;http://schemas.microsoft.com/ws/2007/08/connect”&#xD;
&amp;gt;&lt;br&gt;&lt;/em&gt;         &amp;lt;ExpirationInstant&amp;gt;2009-04-03T12:00:00&amp;lt;/ExpirationInstant&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;MaxQueueCapacity&amp;gt;2097152&amp;lt;/MaxQueueCapacity&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;/QueuePolicy&amp;gt;&lt;br&gt;&#xD;
&amp;lt;/entry&amp;gt;&lt;/strong&gt;&#xD;
          &lt;/font&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If you want to renew the Queue (extend the expiration), take the effective policy,&#xD;
adjust ExpirationInstant and do a PUT to the “self” location. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;&#xD;
            &lt;font face="Courier New"&gt;HTTP/1.1 PUT /myapp/q1&lt;font color="#ff0000"&gt;!(queue)&lt;/font&gt;&lt;br&gt;&#xD;
Host: project-name.servicebus.windows.net&lt;br&gt;&#xD;
X-MS-Identity-Token: A6hbJklu18hsnHRql61k1==&lt;br&gt;&#xD;
Content-Type: application/atom+xml;type=entry;charset=utf-8&lt;br&gt;&#xD;
Content-Length: nnn&lt;br&gt;&lt;br&gt;&lt;/font&gt;&#xD;
          &lt;/strong&gt;&#xD;
          &lt;strong&gt;&#xD;
            &lt;font face="Courier New"&gt;&amp;lt;entry xmlns=”&lt;em&gt;http://www.w3.org/2005/Atom&lt;/em&gt;”&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;link rel=”self” href=”https://project-name.servicebus.windows.net/myapp/q1!(queue)”&#xD;
/&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;link rel=”alternate” href=”https://project-name.servicebus.windows.net/myapp/q1”&#xD;
/&amp;gt; &#xD;
&lt;br&gt;&#xD;
   &amp;lt;link rel=”queuehead” href=”https://project-name.servicebus.windows.net/myapp/q1!(queue/head)”&#xD;
/&amp;gt; &#xD;
&lt;br&gt;&#xD;
   &amp;lt;QueuePolicy xmlns=”&lt;/font&gt;&#xD;
          &lt;/strong&gt;&#xD;
          &lt;strong&gt;&#xD;
            &lt;font face="Courier New"&gt;&#xD;
              &lt;em&gt;http://schemas.microsoft.com/ws/2007/08/connect”&#xD;
&amp;gt;&lt;br&gt;&lt;/em&gt;         &amp;lt;ExpirationInstant&amp;gt;&lt;font color="#ff0000"&gt;2009-04-04T12:00:00&lt;/font&gt;&amp;lt;/ExpirationInstant&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;MaxQueueCapacity&amp;gt;2097152&amp;lt;/MaxQueueCapacity&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;/QueuePolicy&amp;gt;&lt;br&gt;&#xD;
&amp;lt;/entry&amp;gt;&lt;/font&gt;&#xD;
          &lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
[&lt;strong&gt;&lt;font color="#008080"&gt;Bug note:&lt;/font&gt;&lt;/strong&gt; The PUT will return the new&#xD;
effective policy just like the POST response shown above, but the returned Atom &amp;lt;links&amp;gt;&#xD;
aren’t correctly formed. Keep the ones returned from the POST]&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If you want to delete the queue, just nuke the policy:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;&#xD;
            &lt;font face="Courier New"&gt;HTTP/1.1 DELETE /myapp/q1&lt;font color="#ff0000"&gt;!(queue)&lt;/font&gt;&lt;br&gt;&#xD;
Host: project-name.servicebus.windows.net&lt;br&gt;&#xD;
X-MS-Identity-Token: A6hbJklu18hsnHRql61k1==&lt;br&gt;&#xD;
Content-Length: 0&lt;/font&gt;&#xD;
          &lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So that’s the policy story for Queues. In the next posts I’ll discuss the REST Queue&#xD;
protocol and the SOAP Queue protocol for how you send message to the queue and get&#xD;
messages out. REST I’ll explain in protocol terms, the SOAP model in .NET programming&#xD;
model terms. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=0f64f592-7239-42fc-aed2-f0993701c5f6"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=9dkjQaEK1Ys:Sla0-IgfZsc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=9dkjQaEK1Ys:Sla0-IgfZsc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=9dkjQaEK1Ys:Sla0-IgfZsc:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=9dkjQaEK1Ys:Sla0-IgfZsc:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=9dkjQaEK1Ys:Sla0-IgfZsc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=9dkjQaEK1Ys:Sla0-IgfZsc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=9dkjQaEK1Ys:Sla0-IgfZsc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=9dkjQaEK1Ys:Sla0-IgfZsc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=9dkjQaEK1Ys:Sla0-IgfZsc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=9dkjQaEK1Ys:Sla0-IgfZsc:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=9dkjQaEK1Ys:Sla0-IgfZsc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=9dkjQaEK1Ys:Sla0-IgfZsc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/9dkjQaEK1Ys" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx</comments>
      <category>.NET Services</category>
      <category>Azure</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,0f64f592-7239-42fc-aed2-f0993701c5f6.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=92736a84-aa01-4eaf-8387-6732435de7af</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,92736a84-aa01-4eaf-8387-6732435de7af.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,92736a84-aa01-4eaf-8387-6732435de7af.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=92736a84-aa01-4eaf-8387-6732435de7af</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>April Fool&amp;rsquo;s Prediction 2009</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,92736a84-aa01-4eaf-8387-6732435de7af.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/3vN0Y1RkMoo/PermaLink,guid,92736a84-aa01-4eaf-8387-6732435de7af.aspx</link>
      <pubDate>Thu, 02 Apr 2009 04:08:14 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
My blog has a long memory and therefore I’ll log a prediction for 2014. April Fool’s&#xD;
day is as good as New Year’s for that kind of thing in my book.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I believe that the web browser as “a rectangular window/frame/tab with some content&#xD;
in it” model, along with HTML, will be done in 2014. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
  &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I believe that four key, transformational things are underway in the UI space – supported&#xD;
by advances in hardware and distributed computing capacity and distributed storage&#xD;
capacity and network bandwidth - that will kill off the browser paradigm as we know&#xD;
it: &#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
There will be an easy and standard scripting model for real time manipulation / merging&#xD;
/ transformation / editing / tagging / recognizing of video sources and the objects&#xD;
in them. Video will replace static pictures.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Autostereoscopic screens will make it into mainstream gear like notebooks and even&#xD;
smartphones.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Touch and proximity sensor based interaction will become the universal form-factor-crossing&#xD;
interaction model for mostly everything.  &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Graphic display surfaces will increasingly break out of the LCD-panel jail and we'll&#xD;
see use of interactive micro-projection/motion-recognition surfaces everywhere.&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
I believe that UI will be generated / mashed-up / overlaid / processed entirely and&#xD;
in a personally customizable fashion very close to the user and that any popular user&#xD;
experience shell will concurrently leverage data from at least two dozen different&#xD;
sources. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
  &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I believe that interactive local client apps / gadgets / widgets will become the prime&#xD;
battleground for user eyeballs and for advertising display real-estate. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
  &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I believe that full-duplex, high-bandwidth, peer-to-peer network communication will&#xD;
be the predominant model for social networking and for sharing data the any of us&#xD;
produces and owns. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
  &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Call me crazy.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=92736a84-aa01-4eaf-8387-6732435de7af"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=3vN0Y1RkMoo:m4VQ6NE4jPk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=3vN0Y1RkMoo:m4VQ6NE4jPk:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=3vN0Y1RkMoo:m4VQ6NE4jPk:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=3vN0Y1RkMoo:m4VQ6NE4jPk:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=3vN0Y1RkMoo:m4VQ6NE4jPk:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=3vN0Y1RkMoo:m4VQ6NE4jPk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=3vN0Y1RkMoo:m4VQ6NE4jPk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=3vN0Y1RkMoo:m4VQ6NE4jPk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=3vN0Y1RkMoo:m4VQ6NE4jPk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=3vN0Y1RkMoo:m4VQ6NE4jPk:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=3vN0Y1RkMoo:m4VQ6NE4jPk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=3vN0Y1RkMoo:m4VQ6NE4jPk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/3vN0Y1RkMoo" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,92736a84-aa01-4eaf-8387-6732435de7af.aspx</comments>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,92736a84-aa01-4eaf-8387-6732435de7af.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=8e30d2eb-6e2d-4dc5-8aba-5aa410e450de</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,8e30d2eb-6e2d-4dc5-8aba-5aa410e450de.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,8e30d2eb-6e2d-4dc5-8aba-5aa410e450de.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=8e30d2eb-6e2d-4dc5-8aba-5aa410e450de</wfw:commentRss>
      
      <title>.NET Services March 2009 CTP - Service Bus Routers and Queues - Part 1: Fundamentals</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,8e30d2eb-6e2d-4dc5-8aba-5aa410e450de.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/dCgQFPIA3M8/PermaLink,guid,8e30d2eb-6e2d-4dc5-8aba-5aa410e450de.aspx</link>
      <pubDate>Thu, 02 Apr 2009 01:25:18 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
In the March 2009 CTP of the .NET Service Bus we’ve added two significant new capabilities,&#xD;
Routers and Queues, that also signal a change of how we’ve thinking about the Service&#xD;
Bus namespace, its capabilities and the road ahead. Before the M5 release, the Service&#xD;
Bus’ primary capability was to act as a Relay between two parties. It’ll absolutely&#xD;
continue to play that role and we’re working to improve that capability further.&#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
The significant shift we’ve made with M5 is that we’ve now started to add long-lived,&#xD;
system-inherent messaging primitives that exist and operate completely independent&#xD;
of any active listener that sits somewhere on some machine and is plugged into the&#xD;
Service Bus. That means that you can now leverage the Service Bus as an intermediary&#xD;
for push-pull translation, or as a publish/subscribe message distribution facility&#xD;
to optimize or facilitate messaging between places that are already “on the Web” or&#xD;
you can set up message distribution scenarios where some messaging destinations are&#xD;
existing Web Services and some receivers require the Service Bus’ relay capability&#xD;
to be reachable.&#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
Before I go into further detail on that, let me explain some of the more philosophical&#xD;
aspects of the model behind Routers and Queues and especially how it relates to the&#xD;
Service Bus namespace that I’ve &lt;a href="http://blogs.msdn.com/clemensv/archive/2009/03/31/net-services-march-2009-ctp-ndash-the-service-bus-namespace.aspx"&gt;already&#xD;
discussed to some degree in this post&lt;/a&gt;. &lt;a href="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/723.NETServicesMarch2009CTPRoutersandQue_DCB4/image_7.png"&gt;&lt;img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; MARGIN: 10px 0px 10px 10px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="image" border="0" alt="image" align="right" src="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/723.NETServicesMarch2009CTPRoutersandQue_DCB4/image_thumb_2.png" width="500" height="394"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&#xD;
        &lt;h5&gt;Names and Policies&#xD;
&lt;/h5&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
The relationship between any messaging primitive and the Service Bus namespace is&#xD;
established by picking a &lt;strong&gt;&lt;font color="#ff0000"&gt;name&lt;/font&gt;&lt;/strong&gt; in your&#xD;
project’s Service Bus hierarchy - say &lt;strong&gt;&lt;a href="https://clemensv.servicebus.windows.net/myapp/q1"&gt;https://clemensv.servicebus.windows.net/myapp/&lt;font color="#ff0000"&gt;q1&#xD;
&lt;/font&gt;&lt;/a&gt; – &lt;/strong&gt;and then assign a role to that name. From an astronaut’s perspective,&#xD;
all names in a Service Bus namespace that can theoretically exist do already exist&#xD;
and their role is ‘none’. So when I’m assigning a role to a name, I don’t create the&#xD;
name itself. The name is already there, it’s just in hiding. &#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
That mind-trick is necessary, because we don’t want to burden anyone with creating&#xD;
intermediary names leading up to a name in the hierarchy. In the example I’m using&#xD;
here I would have to first create ‘myapp’ and then create ‘q1’ if we wouldn’t be operating&#xD;
under the assumption that all names you could ever interact with were already existing. &#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
Assigning a role is commonly done using the Atom Publishing Protocol (there’s also&#xD;
a WS-Transfer head that we use for the .NET SDK bits) whereby the POSTed entry contains&#xD;
some form of policy that holds information about what role the name should take on,&#xD;
and what the applicable constraints or operational parameters are. The POST request&#xD;
is sent to the exact URI projection of the name you picked. &#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
Why is that a POST and not a PUT when you already know the URI? &#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
Because once you post a policy to a name, there’s a metamorphosis happening (think&#xD;
“magic little puff of smoke”, not Kafka) that transforms the name into an active messaging&#xD;
primitive. On success, the POST request will yield a 201 response code along with&#xD;
a Location header that indicates the place where you’ll further interact with the&#xD;
policy you just posted. The URI itself is taken over by the primitive.  &#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
The picture on the right shows what happens in the case of a queue. As the policy&#xD;
is applied, the queue’s “tail” takes over the URI and two subordinate URIs are created,&#xD;
whereby one serves to interact with the policy and the other one to dequeue messages&#xD;
from the queue’s “head”.&#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
Any name can play any role that’s supported by the system. We currently have a “metadata”&#xD;
role where you just stick an external reference such as a URI or a WS-Address endpoint&#xD;
reference into the name in the registry. We have a “connection point” role that’s&#xD;
established by the WCF listeners as they take over a name to listen on the Service&#xD;
Bus. And we’ve got these two new roles “queue” and “router” that I’m going to explain&#xD;
here.&#xD;
&lt;/p&gt;&#xD;
        &lt;h5&gt;Queues and Routers&#xD;
&lt;/h5&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
A Router is a publish/subscribe message distribution primitive that allows “push”&#xD;
subscribers to subscribe and get messages that flow into the Router. A Queue is a&#xD;
– well – a queue that accepts messages and holds them until (a) consumer(s) come by&#xD;
and “pull” the messages off the queue. We’re explicitly allowing for Routers to subscribe&#xD;
to Routers and for Queues to subscribe into Routers. The resulting composite is typically&#xD;
quite a bit more powerful than any of the primitives alone. So we call the these capabilities&#xD;
“primitives”, because they explicitly allow for composition. &#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
          &lt;a href="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/723.NETServicesMarch2009CTPRoutersandQue_DCB4/image_9.png"&gt;&#xD;
            &lt;img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; MARGIN: 10px 20px 10px 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="image" border="0" alt="image" align="left" src="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/723.NETServicesMarch2009CTPRoutersandQue_DCB4/image_thumb_3.png" width="500" height="325"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;In&#xD;
the picture on the left you see one possible composition pattern. &#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
We’ve got a number of processing services that we want to load balance jobs across.&#xD;
We also have an auditing service that ought to see and log every single “raw” job&#xD;
message that goes into the system. &#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
The audit service is particularly interested in not losing any messages until they&#xD;
are secured on disk, while the processing services want to get their work pushed to&#xD;
them and run as fast as they can.&#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
The setup is that we’re creating a Router with a message distribution policy of “All”&#xD;
that sends each message to all subscribers. Then we create a secondary Router with&#xD;
a distribution policy of “One”, which sends any incoming message to exactly one randomly&#xD;
selected current subscriber – which solves the load balancing problem for the Processing&#xD;
Service.&#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
For auditing, we also create a Queue that subscribes into the top-level Router that&#xD;
gets all messages and holds them for the Audit Service to pick them up. &#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
The Audit Service would use the peek/lock pattern to get the messages off the queue.&#xD;
That means that the consumer puts an exclusive lock on the message that’s being retrieved&#xD;
and that the message is removed from the view of any competing consumers. The message&#xD;
isn’t gone, though. If the consumer doesn’t acknowledge the message within a minute,&#xD;
the message pops back into view. That means that if the Audit Services were to gets&#xD;
a message but would fumbles it or can’t get it on disk, the message wouldn’t be lost,&#xD;
even in the case of a catastrophic failure. Once the Audit Service can get the message&#xD;
on disk, it deletes the lock and that finally removes the message from the Queue.&#xD;
&lt;/p&gt;&#xD;
        &lt;p align="justify"&gt;&#xD;
So that’s the background on the relationship of Names and Policies and Queues and&#xD;
Routers and how they are designed for composition. In the next posts I’ll go into&#xD;
detail on what the policies for Queues and Routers look like, how you apply them via&#xD;
the SDK programming model or via plain HTTP and how you submit messages into and get&#xD;
messages out of a Router, a Queue or a composite like the one shown here.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;&#xD;
            &lt;font size="2"&gt;&#xD;
            &lt;/font&gt;&#xD;
          &lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=8e30d2eb-6e2d-4dc5-8aba-5aa410e450de"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=dCgQFPIA3M8:GPWhzziEMxw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=dCgQFPIA3M8:GPWhzziEMxw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=dCgQFPIA3M8:GPWhzziEMxw:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=dCgQFPIA3M8:GPWhzziEMxw:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=dCgQFPIA3M8:GPWhzziEMxw:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=dCgQFPIA3M8:GPWhzziEMxw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=dCgQFPIA3M8:GPWhzziEMxw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=dCgQFPIA3M8:GPWhzziEMxw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=dCgQFPIA3M8:GPWhzziEMxw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=dCgQFPIA3M8:GPWhzziEMxw:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=dCgQFPIA3M8:GPWhzziEMxw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=dCgQFPIA3M8:GPWhzziEMxw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/dCgQFPIA3M8" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,8e30d2eb-6e2d-4dc5-8aba-5aa410e450de.aspx</comments>
      <category>.NET Services</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,8e30d2eb-6e2d-4dc5-8aba-5aa410e450de.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=634b72d9-e200-45de-82db-2ae4c8ef947e</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,634b72d9-e200-45de-82db-2ae4c8ef947e.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,634b72d9-e200-45de-82db-2ae4c8ef947e.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=634b72d9-e200-45de-82db-2ae4c8ef947e</wfw:commentRss>
      <slash:comments>4</slash:comments>
      
      <title>[Intermission] Auf der Mauer, auf der Lauer sitzt 'ne kleine Wa! - or: When REST isn't REST - or: Why and How I Care About Standards-Compliance</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,634b72d9-e200-45de-82db-2ae4c8ef947e.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/-cjkd6XSyI0/PermaLink,guid,634b72d9-e200-45de-82db-2ae4c8ef947e.aspx</link>
      <pubDate>Wed, 01 Apr 2009 17:40:41 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;em&gt;… &lt;a href="http://de.wikipedia.org/wiki/Auf_der_Mauer,_auf_der_Lauer"&gt;seht Euch&#xD;
mal die Wa an, wie die Wa ta kann. Auf der Mauer auf der Lauer sitzt ‘ne kleine Wa!&lt;/a&gt;.&lt;/em&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
It’s a German children’s song. The song starts out with “… sitzt ‘ne kleine Wanze”&#xD;
(bedbug) and with each verse you leave off a letter: Wanz, Wan, Wa, W, – silence. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’ll do the same here, but not with a bedbug:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Let’s sing:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font face="Courier New"&gt;&amp;lt;soap:Envelope xmlns:soap=”” xmlns:wsaddr=”” xmlns:wsrm=””&#xD;
xmlns:wsu=”” xmlns:app=””&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;soap:Header&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;addr:Action&amp;gt;http://tempuri.org/1.0/Status.set&amp;lt;/addr:Action&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;wsrm:Sequence&amp;gt;&lt;br&gt;&#xD;
              &amp;lt;wsrm:Identifier&amp;gt;urn:session-id&amp;lt;/wsrm:Identifier&amp;gt;&lt;br&gt;&#xD;
              &amp;lt;wsrm:MessageNumber&amp;gt;5&amp;lt;/wsrm:MessageNumber&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;/wsrm:Sequence&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;wsse:Security xmlns:wsse=”…”&amp;gt;&lt;br&gt;&#xD;
              &#xD;
&amp;lt;wsse:BinarySecurityToken ValueType="&lt;/font&gt;&#xD;
          &lt;font face="Courier New"&gt;http://tempuri.org#CustomToken&lt;/font&gt;&#xD;
          &lt;font face="Courier New"&gt;" &#xD;
&lt;br&gt;&#xD;
                                        &#xD;
EncodingType="...#Base64Binary" wsu:Id=" MyID "&amp;gt;&lt;br&gt;&#xD;
                         &#xD;
FHUIORv...&lt;br&gt;&#xD;
               &#xD;
&amp;lt;/wsse:BinarySecurityToken&amp;gt;&lt;br&gt;&#xD;
              &#xD;
&amp;lt;ds:Signature&amp;gt;&lt;br&gt;&#xD;
                 &#xD;
&amp;lt;ds:SignedInfo&amp;gt; &#xD;
&lt;br&gt;&#xD;
                     &#xD;
&amp;lt;ds:CanonicalizationMethod Algorithm="&lt;/font&gt;&#xD;
          &lt;font face="Courier New"&gt;http://www.w3.org/2001/10/xml-exc-c14n#"/&amp;gt;&lt;/font&gt;&#xD;
          &lt;br&gt;&#xD;
          &lt;font face="Courier New"&gt;                     &#xD;
&amp;lt;ds:SignatureMethod Algorithm="&lt;/font&gt;&#xD;
          &lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#md5"/&lt;/font&gt;&#xD;
          &lt;font face="Courier New"&gt;&amp;gt;  &#xD;
&lt;br&gt;&#xD;
                     &#xD;
&amp;lt;ds:Reference URI="#MsgBody"&amp;gt;&lt;br&gt;&#xD;
                           &#xD;
&amp;lt;ds:DigestMethod  Algorithm="&lt;/font&gt;&#xD;
          &lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#md5"/&amp;gt;&lt;/font&gt;&#xD;
          &lt;font face="Courier New"&gt; &lt;br&gt;&#xD;
                           &#xD;
&amp;lt;ds:DigestValue&amp;gt;LyLsF0Pi4wPU...&amp;lt;/ds:DigestValue&amp;gt;&lt;br&gt;&#xD;
                     &#xD;
&amp;lt;/ds:Reference&amp;gt;&lt;br&gt;&#xD;
                &#xD;
&amp;lt;/ds:SignedInfo&amp;gt;   &#xD;
&lt;br&gt;&#xD;
                &#xD;
&amp;lt;ds:SignatureValue&amp;gt;DJbchm5gK...&amp;lt;/ds:SignatureValue&amp;gt; &#xD;
&lt;br&gt;&#xD;
                &#xD;
&amp;lt;ds:KeyInfo&amp;gt;  &#xD;
&lt;br&gt;&#xD;
                 &#xD;
&amp;lt;wsse:SecurityTokenReference&amp;gt;  &#xD;
&lt;br&gt;&#xD;
                   &#xD;
&amp;lt;wsse:Reference URI="#MyID"/&amp;gt; &#xD;
&lt;br&gt;&#xD;
                  &#xD;
&amp;lt;/wsse:SecurityTokenReference&amp;gt; &#xD;
&lt;br&gt;&#xD;
              &#xD;
&amp;lt;/ds:KeyInfo&amp;gt; &#xD;
&lt;br&gt;&#xD;
             &amp;lt;/ds:Signature&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;/wsse:Security&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;app:ResponseFormat&amp;gt;Xml&amp;lt;/app:ResponseFormat&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;app:Key wsu:Id=”AppKey”&amp;gt;27729912882….&amp;lt;/app:Key&amp;gt; &#xD;
&lt;br&gt;&#xD;
    &amp;lt;soap:Header&amp;gt;&lt;br&gt;&#xD;
    &amp;lt;soap:Body wsu:Id=”MyId”&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;app:status&amp;gt;Hello, I’m&#xD;
good&amp;lt;/app:status&amp;gt;&lt;br&gt;&#xD;
     &amp;lt;/soap:Body&amp;gt;&lt;br&gt;&#xD;
&amp;lt;/soap:Envelope&amp;gt; &lt;/font&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Not a very pretty song, I’ll admit. Let’s drop a some stuff. Let’s assume that we&#xD;
don’t need to tell the other party that we’re looking to give it an MD5 signature,&#xD;
but let’s say that’s implied and so were the canonicalization algorithm. Let’s also&#xD;
assume that the other side already knows the security token and the key. Since we&#xD;
only have a single signature digest here and yield a single signature we can just&#xD;
collapse to the signature value. Heck, you may not even know about what that all means.&#xD;
Verse 2:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font face="Courier New"&gt;&amp;lt;soap:Envelope xmlns:soap=”” xmlns:wsaddr=”” xmlns:wsrm=””&#xD;
xmlns:wsu=”” xmlns:app=””&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;soap:Header&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;addr:Action&amp;gt;http://tempuri.org/1.0/Status.set&amp;lt;/addr:Action&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;wsrm:Sequence&amp;gt;&lt;br&gt;&#xD;
              &amp;lt;wsrm:Identifier&amp;gt;urn:session-id&amp;lt;/wsrm:Identifier&amp;gt;&lt;br&gt;&#xD;
              &amp;lt;wsrm:MessageNumber&amp;gt;5&amp;lt;/wsrm:MessageNumber&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;/wsrm:Sequence&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;wsse:Security xmlns:wsse=”…”&amp;gt;&lt;br&gt;&#xD;
              &#xD;
&amp;lt;ds:Signature&amp;gt;&lt;br&gt;&#xD;
                 &#xD;
&amp;lt;ds:SignatureValue&amp;gt;DJbchm5gK...&amp;lt;/ds:SignatureValue&amp;gt; &#xD;
&lt;br&gt;&#xD;
             &amp;lt;/ds:Signature&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;/wsse:Security&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;app:ResponseFormat&amp;gt;Xml&amp;lt;/app:ResponseFormat&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;app:Key wsu:Id=”AppKey”&amp;gt;27729912882….&amp;lt;/app:Key&amp;gt; &#xD;
&lt;br&gt;&#xD;
    &amp;lt;soap:Header&amp;gt;&lt;br&gt;&#xD;
    &amp;lt;soap:Body wsu:Id=”MyId”&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;app:status&amp;gt;Hello, I’m&#xD;
good&amp;lt;/app:status&amp;gt;&lt;br&gt;&#xD;
     &amp;lt;/soap:Body&amp;gt;&lt;br&gt;&#xD;
&amp;lt;/soap:Envelope&amp;gt; &lt;/font&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Better. Now let’s strip all these extra XML namespace decorations since there aren’t&#xD;
any name collisions as far as I can see. We’ll also collapse the rest of the security&#xD;
elements into one element since there’s no need for three levels of nesting with a&#xD;
single signature. Verse 3:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font face="Courier New"&gt;&amp;lt;Envelope&amp;gt;&lt;br&gt;&#xD;
   &amp;lt;Header&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;Action&amp;gt;http://tempuri.org/1.0/Status.set&amp;lt;/Action&amp;gt;&lt;br&gt;&#xD;
         &amp;lt;Sequence&amp;gt;&lt;br&gt;&#xD;
              &amp;lt;Identifier&amp;gt;urn:session-id&amp;lt;/Identifier&amp;gt;&lt;br&gt;&#xD;
              &amp;lt;MessageNumber&amp;gt;5&amp;lt;/MessageNumber&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;/Sequence&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;SignatureValue&amp;gt;DJbchm5gK...&amp;lt;/SignatureValue&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;ResponseFormat&amp;gt;Xml&amp;lt;/ResponseFormat&amp;gt;&lt;br&gt;&#xD;
          &amp;lt;Key&amp;gt;27729912882….&amp;lt;/Key&amp;gt; &#xD;
&lt;br&gt;&#xD;
    &amp;lt;Header&amp;gt;&lt;br&gt;&#xD;
    &amp;lt;Body&amp;gt;&lt;br&gt;&#xD;
       &amp;lt;status&amp;gt;Hello, I’m good&amp;lt;/status&amp;gt;&lt;br&gt;&#xD;
     &amp;lt;/Body&amp;gt;&lt;br&gt;&#xD;
&amp;lt;/Envelope&amp;gt; &lt;/font&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Much better. The whole angle-bracket stuff and the nesting seems semi-gratuitous and&#xD;
repetitive here, too. Let’s make that a bit simpler. Verse 4:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font face="Courier New"&gt;         Action=http://tempuri.org/1.0/Status.set&lt;br&gt;&#xD;
         Sequence-Identifier=urn:session-id&lt;br&gt;&#xD;
         Sequence-MessageNumber=5&lt;br&gt;&#xD;
         SignatureValue=DJbchm5gK...&lt;br&gt;&#xD;
         ResponseFormat=Xml&lt;br&gt;&#xD;
         Key=27729912882…. &#xD;
&lt;br&gt;&#xD;
         status=Hello, I’m good&lt;/font&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Much, much better. Now let’s get rid of that weird URI up there and split up the action&#xD;
and the version info, make some of these keys are little more terse and turn that&#xD;
into a format that’s easily transmittable over HTTP. By what we have here application/www-form-urlencoded&#xD;
would probably be best. Verse 5:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;font face="Courier New"&gt;         method=Status.set&lt;br&gt;&#xD;
         &amp;amp;v=1.0&lt;br&gt;&#xD;
         &amp;amp;session_key=929872172..&lt;br&gt;&#xD;
         &amp;amp;call_id=5&lt;br&gt;&#xD;
         &amp;amp;sig=DJbchm5gK...&lt;br&gt;&#xD;
         &amp;amp;format=Xml&lt;br&gt;&#xD;
         &amp;amp;api_key=27729912882…. &#xD;
&lt;br&gt;&#xD;
         &amp;amp;status=Hello,%20I’m%20good&lt;/font&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Oops. &lt;a href="http://wiki.developers.facebook.com/index.php/Status.set"&gt;Facebook&lt;/a&gt;’s&#xD;
Status.set API. How did that happen? I thought that was REST?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Now play the song backwards. The “new thing” is largely analogous to where we started&#xD;
before the WS* Web Services stack and its CORBA/DCE/DCOM predecessors came around&#xD;
and there are, believe it or not, good reasons for having of that additional “overhead”.&#xD;
A common way to frame message content and the related control data, a common way to&#xD;
express complex data structures and distinguish between data domains, a common way&#xD;
to deal with addressing in multi-hop or store-and-forward messaging scenarios, an&#xD;
agreed notion of sessions and message sequencing, a solid mechanism for protecting&#xD;
the integrity of messages and parts of messages. This isn’t all just stupid.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
It’s well worth discussing whether messages need to be expressed as XML 1.0 text on&#xD;
the wire at all times. I don’t think they need to and there are alternatives that&#xD;
aren’t as heavy. JSON is fine and encodings like the .NET Binary Encoding or Fast&#xD;
Infoset are viable alternatives as well. It’s also well worth discussing whether WS-Security&#xD;
and the myriad of related standards that were clearly built by security geniuses for&#xD;
security geniuses really need to be that complicated or whether we could all live&#xD;
with a handful of simple profiles and just cut out 80% of the options and knobs and&#xD;
parameters in that land. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I find it very sad that the discussion isn’t happening. Instead, people use the “REST”&#xD;
moniker as the escape hatch to conveniently ignore any existing open standard for&#xD;
tunnel-through-HTTP messaging and completely avoid the discussion. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
It’s not only sad, it’s actually a bit frustrating. As one of the people responsible&#xD;
for the protocol surface of the .NET Service Bus, I am absolutely not at liberty to&#xD;
ignore what exists in the standards space. And this isn’t a mandate handed down to&#xD;
me, but something I do because I believe it’s the right thing to live with the constraints&#xD;
of the standards frameworks that exist. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
When we’re sitting down and talk about a REST API, were designing a set of resources&#xD;
– which may result in splitting a thing like a queue into two resources, head and&#xD;
tail - and then we put RFC2616 on the table and try to be very precise in picking&#xD;
the appropriate predefined HTTP method for a given semantic and how the HTTP 2xx,&#xD;
3xx, 4xx, 5xx status codes map to success and error conditions. We’re also trying&#xD;
to avoid inventing new ways to express things for which standards exists. There’s&#xD;
a standard for how to express and manage lists with ATOM and APP and hence we use&#xD;
that as a foundation. We use the designed extension points to add data to those lists&#xD;
whenever necessary.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
When we’re designing a &lt;strike&gt;RPC&lt;/strike&gt; SOAP API, we’re intentionally trying to&#xD;
avoid inventing new protocol surface and will try to leverage as much from the existing&#xD;
and standardized stack as we possibly can – at a minimum we’ll stick with established&#xD;
patterns such as the Create/GetInfo/Renew/Delete patterns for endpoint factories with&#xD;
renewal (which is used in several standards). I’ll add that we are – ironically -&#xD;
a bit backlogged on the protocol documentation for our SOAP endpoints and have more&#xD;
info on the REST endpoint in the latest SDK, but we’ll make that up in the near future.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So - can I build “REST” (mind the quotes) protocols that are as reduced as Facebook,&#xD;
Twitter, Flickr, etc? Absolutely. There wouldn’t be much new work. It’s just a matter&#xD;
of how we put messages on and pluck message off the wire. It’s really mostly a matter&#xD;
of formatting and we have a lot of the necessary building blocks in the shipping WCF&#xD;
bits today. I would just omit a bunch of decoration as things go out and make a bunch&#xD;
of assumptions on things that come in.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I just have a sense that I’d be hung upside down from a tree by the press and the&#xD;
blogging, twittering, facebooking community if I, as someone at Microsoft, wouldn’t&#xD;
follow the existing open and agreed standards or at least use protocols that we’ve&#xD;
published under the &lt;a href="http://www.microsoft.com/interop/osp/default.mspx"&gt;OSP&lt;/a&gt; and&#xD;
instead just started to do my own interpretative dance - even if that looked strikingly&#xD;
similar to what the folks down in the Valley are doing. At the very least, someone&#xD;
would call it a rip-off.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
What do you think? What should I/we do? &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=634b72d9-e200-45de-82db-2ae4c8ef947e"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-cjkd6XSyI0:VDtew5p9aEc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-cjkd6XSyI0:VDtew5p9aEc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-cjkd6XSyI0:VDtew5p9aEc:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=-cjkd6XSyI0:VDtew5p9aEc:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-cjkd6XSyI0:VDtew5p9aEc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-cjkd6XSyI0:VDtew5p9aEc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=-cjkd6XSyI0:VDtew5p9aEc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-cjkd6XSyI0:VDtew5p9aEc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=-cjkd6XSyI0:VDtew5p9aEc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-cjkd6XSyI0:VDtew5p9aEc:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=-cjkd6XSyI0:VDtew5p9aEc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=-cjkd6XSyI0:VDtew5p9aEc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/-cjkd6XSyI0" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,634b72d9-e200-45de-82db-2ae4c8ef947e.aspx</comments>
      <category>.NET Services</category>
      <category>Architecture</category>
      <category>Azure</category>
      <category>Technology</category>
      <category>Technology/ISB</category>
      <category>Technology/Web Services</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,634b72d9-e200-45de-82db-2ae4c8ef947e.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=8bdd7fca-c3bf-47ea-9371-a2fbfc74d740</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,8bdd7fca-c3bf-47ea-9371-a2fbfc74d740.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,8bdd7fca-c3bf-47ea-9371-a2fbfc74d740.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=8bdd7fca-c3bf-47ea-9371-a2fbfc74d740</wfw:commentRss>
      <slash:comments>2</slash:comments>
      
      <title>.NET Services March 2009 CTP - The Service Bus Namespace</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,8bdd7fca-c3bf-47ea-9371-a2fbfc74d740.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/qL4PtralH9E/PermaLink,guid,8bdd7fca-c3bf-47ea-9371-a2fbfc74d740.aspx</link>
      <pubDate>Tue, 31 Mar 2009 23:46:35 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
With the March CTP, the .NET Service Bus namespace root for each project is taking&#xD;
on a new form that we had already pre-announced into the PDC’08 documentation and&#xD;
that I’ve talked about at PDC and other occasions. Any project’s root URI is now,&#xD;
depending on the chosen transport option, of the form&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;sb://project-name.servicebus.windows.net/ &lt;/strong&gt;or&lt;br&gt;&lt;strong&gt;http://project-name.servicebus.windows.net/ &lt;/strong&gt;or&lt;strong&gt;&lt;br&gt;&#xD;
https://project-name.servicebus.windows.net/&lt;/strong&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The previous root URI for a project was sb:|http:|https://servicebus.windows.net/services/project-name/,&#xD;
which was clearly sub-optimal for a number of reasons. Some technical, some more philosophical.&#xD;
Technical reasons first:&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
From the customer perspective, the old structure didn’t allow any project to host&#xD;
“magic” well-known files at the root of the project’s domain. There are unfortunately&#xD;
some protocols that require this, even though it’s broadly considered to be bad practice&#xD;
to bake particular assumptions of the location of resources into protocols. Amongst&#xD;
the “offenders” are &lt;em&gt;robots.txt&lt;/em&gt;, &lt;em&gt;favicon.ico &lt;/em&gt;and&lt;em&gt; w3c/p3p.xml&lt;/em&gt;,&#xD;
but also Adobe Flash’s cross-domain policy &lt;em&gt;crossdomain.xml&lt;/em&gt; and – taking a&#xD;
page out of Adobe’s playbook in that case – Microsoft’s Silverlight with &lt;em&gt;ClientAccessPolicy.xml&lt;/em&gt;.&#xD;
Therefore the Service Bus was inherently Flash and Silverlight incompatible, unless&#xD;
you served up the apps from within the Service Bus itself. I’m quite sure that there&#xD;
are numerous proprietary protocols used with all sorts of applications that follow&#xD;
a similar pattern and so far those applications could not be exposed through the .NET&#xD;
Service Bus, because there wasn’t any way to put anything at the root. Now there is,&#xD;
even though it requires a little WCF trick that I’ll explain in a separate post specifically&#xD;
addressing &lt;em&gt;crossdomain.xml&lt;/em&gt; and &lt;em&gt;ClientAccessPolicy.xml&lt;/em&gt;. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
The most important reason for us was that we need to be able to scale out the system&#xD;
into an “infinite” number of partitions (or “scale-units”) inside and across data-centers.&#xD;
Therefore, each project now gets its very own DNS record pointing to the scale-unit(s)&#xD;
where the project is hosted. The DNS system we’re leveraging is the one that’s used&#xD;
across most Windows Live properties and has a number of very interesting characteristics&#xD;
that will allow us – over time - to optimize the Service Bus traffic flow and to drive&#xD;
down end-to-end latency.&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
What matters even more to us from an “aesthetics” and design perspective is that we&#xD;
really want a project’s namespace to be clean, isolated, and want to avoid any artificial,&#xD;
system imposed pollution in the namespace. The fact that there are sound technical&#xD;
reasons supporting that desire is even more helpful to create consensus around this.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
At its core, the Service Bus namespace is a federated, hierarchical service registry,&#xD;
whose structure is dictated and owned by “the project”. The difference between the&#xD;
Service Bus namespace and a “classic” service registry system like DNS or UDDI or&#xD;
LDAP is that services or messaging primitives are (usually) not only referenced by&#xD;
the registry, but they are projected straight into the registry, so that you can interact&#xD;
with the registry and those services or messaging primitives projected into the registry&#xD;
using similar or identical programming interfaces and within the scope of a unified&#xD;
namespace. We intentionally blur the distinction. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The service registry’s “discovery” (or “browsing”) protocol is based on a simple,&#xD;
conceptually infinite, nested hierarchy of ATOM 1.0 feeds. (In case you are wondering:&#xD;
Yes, we’ve got work lined up to provide flattened, non-hierarchical discovery overlaid&#xD;
over the hierarchy.) If you project an ATOM 1.0 endpoint into any name in the name&#xD;
hierarchy and choose to make that endpoint discoverable, the transition from the discovery&#xD;
hierarchy across the Service Bus namespace into the discovery of the resource hierarchy&#xD;
provided by your endpoint is absolutely seamless. That’s a design point.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
What makes the namespace “federated” is that services or messaging primitives can&#xD;
be projected into the shared namespace from “anywhere”. Typically, the &lt;em&gt;path&lt;/em&gt; portion&#xD;
of a URI represents a set of relatively tightly collocated set of resources that are&#xD;
residing across a web farm or a database cluster with the &lt;em&gt;authority&lt;/em&gt; portion&#xD;
identifying (directly or indirectly) the target cluster. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
.NET Service Bus URIs obviously look exactly like that, but they are quite different.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Imagine you have a distributed setup with 3 different “order processing” systems:&#xD;
One for the U.S. near Seattle, one for the EU near Düsseldorf, and one for the SEA&#xD;
region in Singapore. Let’s also assume that I’m not talking about a multi-national&#xD;
mega-corporation here, but about a trading company with some 40 people that happens&#xD;
to have these three offices. Let’s also assume that they are using a customized ISV&#xD;
application that has been adapted for them by a (plug!) Microsoft Certified Partner&#xD;
and that application is primarily designed to run on local servers. Let’s also assume&#xD;
that it would be difficult (or prohibitively expensive) for them to get a static IP&#xD;
address and a corresponding, secure network setup that would allow them to wire up&#xD;
the application at the respective sites to the outside world. If you are helping customers&#xD;
with business apps, you might find that scenario to be resonating with your experience. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The .NET Service Bus can help with the connectivity issues by allowing to project&#xD;
the endpoints into the Service Bus namespace. That means that the application’s endpoints&#xD;
are listening for messages on and inside the .NET Service Bus instead of some local&#xD;
network listener on-site. There is no need to open any inbound firewall port and no&#xD;
need to do anything to the NAT setup and no need to do anything with DNS. Clients&#xD;
talk to those endpoints. The Service Bus namespace helps with getting those applications&#xD;
organized in a way that you can look at the resulting distributed system as “one”&#xD;
even though it spans sites:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;http://littletradingcorp.servicebus.windows.net/orders/seattle/&lt;br&gt;&lt;/strong&gt;&#xD;
          &lt;strong&gt;http://littletradingcorp.servicebus.windows.net/orders/dusseldorf/&lt;br&gt;&lt;/strong&gt;&#xD;
          &lt;strong&gt;http://littletradingcorp.servicebus.windows.net/orders/singapore/&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In combination with the .NET Access Control service, you can now overlay a single&#xD;
set of access control rules over the base scope &lt;strong&gt;http://littletradingcorp.servicebus.windows.net/orders/&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;which&#xD;
yields a centrally manageable access control overlay over these three services, even&#xD;
though the actual servers and endpoints are spread once around the world. &lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
What makes the naming system very different from DNS is that the .NET Service Bus&#xD;
naming system names endpoints and not hosts. Let’s say that each site also hosts a&#xD;
local “human resources” software; at that company size that may very well be an application&#xD;
that runs on the respective branch manager’s desktop machine or on a small server.&#xD;
That system is quite naturally distinct from from the order processing system and&#xD;
its reasonable safe to assume that the company wouldn’t want to collocate that system&#xD;
with the order processing system. Let’s project these into the namespace as well and&#xD;
we’ll certainly assume they have different Access Control rules that apply to the&#xD;
respective root scope:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;http://littletradingcorp.servicebus.windows.net/hr/seattle/&lt;br&gt;&lt;/strong&gt;&#xD;
          &lt;strong&gt;http://littletradingcorp.servicebus.windows.net/hr/dusseldorf/&lt;br&gt;&lt;/strong&gt;&#xD;
          &lt;strong&gt;http://littletradingcorp.servicebus.windows.net/hr/singapore/&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If we were trying to provide direct access to the “orders” and “hr” endpoints using&#xD;
HTTP with a “normal” setup, we would either have to have – especially with HTTPS –&#xD;
two public, static IP addresses for each site that are mapped to the respective machines&#xD;
or we’d have to use some gateway server that would dispatch the requests locally based&#xD;
on a host-header (requiring distinct DNS entries) or on the path prefix or we’d have&#xD;
to resort to non-standard ports – and we’d open up the floodgates for arbitrary and&#xD;
potentially malicious inbound traffic on the opened ports. And if we had that we would&#xD;
have to map these IP addresses into some DNS naming structure. That’s quite a bit&#xD;
of networking work. Not necessarily complicated for someone who is well versed in&#xD;
these matters, but at the very least it’s a significant cost point. The resulting&#xD;
complication grows with each endpoint, since DNS identifies the public IP gateway&#xD;
and not the endpoint. So things get trickier and trickier. If we want to help small&#xD;
and medium businesses to “go digital” and intercommunicate more efficiently over the&#xD;
web (Fax is still the king in very many places and businesses), all those networking&#xD;
acrobatics don’t scale well. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Mind that I argue that not all business owners are happily accepting the notion of&#xD;
putting all their data and apps into someone else’s data center or "into the cloud”.&#xD;
Mind also that I don’t think I’m contradicting myself here. The .NET Service Bus is&#xD;
the “+” in what Microsoft calls “Software+Services”. It facilitates communication&#xD;
between places of which either can be in the cloud or at a customer-controlled site,&#xD;
it’s not the place where you “put data”.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So much for this post – in the next we’re going to look at the new March 2009 CTP &lt;strong&gt;Routers&lt;/strong&gt; and&#xD;
how they interact and integrate with the namespace structure. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=8bdd7fca-c3bf-47ea-9371-a2fbfc74d740"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=qL4PtralH9E:R7sBB6ymqXs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=qL4PtralH9E:R7sBB6ymqXs:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=qL4PtralH9E:R7sBB6ymqXs:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=qL4PtralH9E:R7sBB6ymqXs:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=qL4PtralH9E:R7sBB6ymqXs:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=qL4PtralH9E:R7sBB6ymqXs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=qL4PtralH9E:R7sBB6ymqXs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=qL4PtralH9E:R7sBB6ymqXs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=qL4PtralH9E:R7sBB6ymqXs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=qL4PtralH9E:R7sBB6ymqXs:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=qL4PtralH9E:R7sBB6ymqXs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=qL4PtralH9E:R7sBB6ymqXs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/qL4PtralH9E" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,8bdd7fca-c3bf-47ea-9371-a2fbfc74d740.aspx</comments>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,8bdd7fca-c3bf-47ea-9371-a2fbfc74d740.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=4b5c9767-3214-411a-ba2f-d523ae0a848d</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,4b5c9767-3214-411a-ba2f-d523ae0a848d.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,4b5c9767-3214-411a-ba2f-d523ae0a848d.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=4b5c9767-3214-411a-ba2f-d523ae0a848d</wfw:commentRss>
      <title>.NET Services March 2009 CTP - "Milestone 5"</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,4b5c9767-3214-411a-ba2f-d523ae0a848d.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/zYlLfxwFqm4/PermaLink,guid,4b5c9767-3214-411a-ba2f-d523ae0a848d.aspx</link>
      <pubDate>Tue, 31 Mar 2009 23:45:13 GMT</pubDate>
      <description>&lt;p&gt;
Our deployment team reports that they’re done with the last touches on our new release,
that the servers are happily humming with the new bits, and that the new SDK is posted.
&lt;/p&gt;
&lt;p&gt;
The &lt;a href="http://msdn.microsoft.com/en-us/azure/netservices.aspx"&gt;.NET Services
Developer Center&lt;/a&gt; has been updated as well. You can get the SDK bits from &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8d1d1d5e-1332-4186-b33f-26d053759e49&amp;displaylang=en"&gt;here&lt;/a&gt; [1].
We also have a runtime-only redistributable package that sits &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4eff38b3-fca0-4940-a014-461631152e5d&amp;displaylang=en"&gt;here&lt;/a&gt; [2].
&lt;/p&gt;
&lt;p&gt;
What changed? Quite a bit. I’ll be updating you about the concrete changes in the
.NET Service Bus beyond what we’ve got in the docs here on my blog over the next few
days and also go into detail on some of the design considerations for the newly added
functionality and the service APIs, specifically also on the significantly expanded
REST capabilities.
&lt;/p&gt;
&lt;p&gt;
People who’ve been following .NET Services or even BizTalk Services for a while will
immediately notice that we’ve introduced a number of breaking changes in this release
and that your existing applications will require some changes. The most important
change we’ve made across the services and .NET Service Bus in particular is that we’re
now giving every project a clean “root” URI:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Before the March CTP, the “root” of your namespace resided at: &lt;strong&gt;http://servicebus.windows.net/services/project-name/&lt;/strong&gt; 
&lt;li&gt;
With the March CTP, we’ve moved the project-name into the DNS name and drop the ‘services’
segment: &lt;strong&gt;http://project-name.servicebus.windows.net/&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
With that, we’re giving you complete control over your Service Bus namespace and we’re
making every effort to leave you in the driver’s seat on the namespace design and
to avoid hijacking URIs for “magic” functionality. What that means – and I will elaborate
on that topic be showing you some code in the next few days – is that you can now
do things like putting virtual &lt;em&gt;robots.txt&lt;/em&gt; or Silverlight &lt;em&gt;ClientAccessPolicy.xml&lt;/em&gt; or
Flash &lt;em&gt;crossdomain.xml&lt;/em&gt; endpoints at the root, enabling cross-domain scripting
against relayed HTTP services. 
&lt;/p&gt;
&lt;p&gt;
The good news is that we’ve made no visible changes to the WCF bindings for the .NET
Service Bus that we talked about at PDC. We’ve improved some of them in significant
ways under the hood, but we didn’t touch the API surface in any way you ought to notice
in your apps. A very important set of bug fixes that went in in that area is that
we’re now respecting all size quotas and timeouts you set on the bindings. We didn’t
really do a good job there in previous releases. When you ask for a 10 second “open”
timeout for a binding that’ll actually be effective now. Before you were stuck with
a minute no matter what you set the values to.
&lt;/p&gt;
&lt;p&gt;
The “flagship” WCF binding of the .NET Service Bus, the &lt;strong&gt;NetTcpRelayBinding&lt;/strong&gt; got
the most attention. The binding knows how to do a particularly awesome networking
stunt when you set the ConnectionMode=TcpConnectionMode.Hybrid. It will attempt (and
mostly succeed) snapping a direct socket between two parties even through both parties
may be hidden behind opposing firewalls and NATs. As we’ve been analyzing some bugs
in this latest milestone we’ve found that the established connections were only working
well for one-way communication, but not for full-duplex or even request-reply conversations.
We’ve fixed that. What we’ve also added is a status indicator by which you can tell
whether the connection is in “relayed” mode or whether it has been upgraded to “direct”
mode. The new mechanism is shown in the Direct Connect sample, but I’ll quote that
here for you as I go through the features in more detail.
&lt;/p&gt;
&lt;p&gt;
A commonly seen customer issue is that quite a few people don’t have any leverage
to get the outbound TCP ports that we require for outbound communication opened on
an upstream firewall (remember: no inbound open firewall ports required; you can stay
stealthy). We’ve started to address this across all our bindings so that the .NET
Service Bus client and listener endpoints are a bit more aggressive in trying to get
out to the .NET Service Bus. That particular feature is in the bits, is enabled by
default and we expect (hope) that people who are trying to connect from within tightly
managed network environments with outbound port restrictions will see things “just
work”. We’re eager to find out whether people who’ve been reporting DNS resolution
errors for &lt;em&gt;servicebus.windows.net&lt;/em&gt; or nothing but obscure 1-minute timeout
failures are finding that things have improved for them – albeit connections may not
be as snappy as without such port restrictions in place. 
&lt;/p&gt;
&lt;p&gt;
Absolutely new in this release are a set of composable communication primitives that &lt;a href="http://videos.visitmix.com/MIX09/T03F"&gt;I’ve
talked about and demoed at MIX&lt;/a&gt;: &lt;strong&gt;Queues&lt;/strong&gt; and &lt;strong&gt;Routers&lt;/strong&gt;.
There’s a whole lot of philosophy behind the way those primitives are designed, what
those primitives indicate about where we’re going with the .NET Service Bus, how they
integrate into the namespace, and there’s a lot to say on how you can interact with
them and compose them and therefore I’ll talk about the namespace as well as Queues
and Routers in detail and in a few separate posts starting later today. 
&lt;/p&gt;
&lt;p&gt;
[1] &lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=8d1d1d5e-1332-4186-b33f-26d053759e49&amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8d1d1d5e-1332-4186-b33f-26d053759e49&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=8d1d1d5e-1332-4186-b33f-26d053759e49&amp;displaylang=en&lt;/a&gt;
&lt;br&gt;
[2] &lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=4eff38b3-fca0-4940-a014-461631152e5d&amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4eff38b3-fca0-4940-a014-461631152e5d&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=4eff38b3-fca0-4940-a014-461631152e5d&amp;displaylang=en&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=4b5c9767-3214-411a-ba2f-d523ae0a848d" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=zYlLfxwFqm4:G59fD6w6SRw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=zYlLfxwFqm4:G59fD6w6SRw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=zYlLfxwFqm4:G59fD6w6SRw:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=zYlLfxwFqm4:G59fD6w6SRw:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=zYlLfxwFqm4:G59fD6w6SRw:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=zYlLfxwFqm4:G59fD6w6SRw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=zYlLfxwFqm4:G59fD6w6SRw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=zYlLfxwFqm4:G59fD6w6SRw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=zYlLfxwFqm4:G59fD6w6SRw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=zYlLfxwFqm4:G59fD6w6SRw:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=zYlLfxwFqm4:G59fD6w6SRw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=zYlLfxwFqm4:G59fD6w6SRw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/zYlLfxwFqm4" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,4b5c9767-3214-411a-ba2f-d523ae0a848d.aspx</comments>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,4b5c9767-3214-411a-ba2f-d523ae0a848d.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=e08f602a-c1d0-4ae1-bb6d-839316deb6a1</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,e08f602a-c1d0-4ae1-bb6d-839316deb6a1.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,e08f602a-c1d0-4ae1-bb6d-839316deb6a1.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=e08f602a-c1d0-4ae1-bb6d-839316deb6a1</wfw:commentRss>
      <slash:comments>2</slash:comments>
      
      <title>17 Months</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,e08f602a-c1d0-4ae1-bb6d-839316deb6a1.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/UiVd-rNeMiU/PermaLink,guid,e08f602a-c1d0-4ae1-bb6d-839316deb6a1.aspx</link>
      <pubDate>Thu, 06 Nov 2008 00:34:09 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/17Months_E8FB/n594054186_1603464_4419_2.jpg"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="n594054186_1603464_4419" border="0" alt="n594054186_1603464_4419" src="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/17Months_E8FB/n594054186_1603464_4419_thumb.jpg" width="184" height="244"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/17Months_E8FB/n594054186_1603471_6712_2.jpg"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="n594054186_1603471_6712" border="0" alt="n594054186_1603471_6712" src="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/17Months_E8FB/n594054186_1603471_6712_thumb.jpg" width="184" height="244"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/17Months_E8FB/n594054186_1603470_6391_2.jpg"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="n594054186_1603470_6391" border="0" alt="n594054186_1603470_6391" src="http://vasters.com/clemensv/content/binary/WindowsLiveWriter/17Months_E8FB/n594054186_1603470_6391_thumb.jpg" width="184" height="244"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Now that I’m blogging again I thought it’d be time for a little &lt;a href="http://vasters.com/clemensv/PermaLink,guid,70d581f0-577d-4f80-aa11-248574b1e420.aspx"&gt;update&lt;/a&gt;. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=e08f602a-c1d0-4ae1-bb6d-839316deb6a1"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=UiVd-rNeMiU:lxc7a-B5kaY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=UiVd-rNeMiU:lxc7a-B5kaY:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=UiVd-rNeMiU:lxc7a-B5kaY:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=UiVd-rNeMiU:lxc7a-B5kaY:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=UiVd-rNeMiU:lxc7a-B5kaY:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=UiVd-rNeMiU:lxc7a-B5kaY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=UiVd-rNeMiU:lxc7a-B5kaY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=UiVd-rNeMiU:lxc7a-B5kaY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=UiVd-rNeMiU:lxc7a-B5kaY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=UiVd-rNeMiU:lxc7a-B5kaY:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=UiVd-rNeMiU:lxc7a-B5kaY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=UiVd-rNeMiU:lxc7a-B5kaY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/UiVd-rNeMiU" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,e08f602a-c1d0-4ae1-bb6d-839316deb6a1.aspx</comments>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,e08f602a-c1d0-4ae1-bb6d-839316deb6a1.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=3cc2bb9c-9a43-4c4c-9fdb-1f7bbfcaec43</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,3cc2bb9c-9a43-4c4c-9fdb-1f7bbfcaec43.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,3cc2bb9c-9a43-4c4c-9fdb-1f7bbfcaec43.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=3cc2bb9c-9a43-4c4c-9fdb-1f7bbfcaec43</wfw:commentRss>
      
      <title>The Service Bus Bindings and WAS/IIS</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,3cc2bb9c-9a43-4c4c-9fdb-1f7bbfcaec43.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/e7rR2T0fw7U/PermaLink,guid,3cc2bb9c-9a43-4c4c-9fdb-1f7bbfcaec43.aspx</link>
      <pubDate>Wed, 05 Nov 2008 23:16:43 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
We’ve been getting some questions along the lines of “I am hosting a service as xyz.svc&#xD;
in IIS and have changed the config to use on of the &lt;a href="http://msdn.microsoft.com/en-us/library/dd129877.aspx#Service_Bus_Bindings"&gt;Service&#xD;
Bus bindings&lt;/a&gt;, but the service never gets called?”&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
That’s right. It doesn’t. The reason for that is that we don’t yet have WAS/IIS integration&#xD;
for any of the &lt;a href="http://msdn.microsoft.com/en-us/library/dd129877.aspx#Service_Bus_Bindings"&gt;Service&#xD;
Bus bindings&lt;/a&gt; in the November 2008 CTP. Enabling the WCF WAS activation scenario&#xD;
that puts the &lt;a href="http://msdn.microsoft.com/en-us/library/dd129877.aspx#NetTcpRelayBinding"&gt;NetTcpRelayBinding&lt;/a&gt; and&#xD;
friends on par with their WCF siblings is on our work backlog for the next major milestone. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
It’s worth considering for a moment what that integration requires. Fundamentally,&#xD;
all of the Relay bindings replace the local TCP or HTTP listener with a listener that&#xD;
sits up in the cloud and services then connect up to that listener to create an inbound&#xD;
route for received messages. That’s similar to how local services interact with WCF’s&#xD;
shared TCP listener or HTTP.SYS, but there are quite a few important differences.&#xD;
First, all Relay listeners need to acquire and present an &lt;a href="http://msdn.microsoft.com/en-us/library/dd129876.aspx"&gt;Access&#xD;
Control&lt;/a&gt; token when they start listening on the Service Bus. In contrast, the local&#xD;
listener facilities are ACL’d using the local or domain account system and use the&#xD;
Windows process identity to decide on whether a process may or may not listen on a&#xD;
particular port and/or namespace. Second, since the actual listener is off-machine,&#xD;
we need to spin up the connection as the IIS/WAS host spins up and need to make sure&#xD;
that the connection is kept alive and aggressively reconnects when dropped for any&#xD;
reason. That’s something you don’t really have to worry much about when the listener&#xD;
sits right there on the same machine as your own service and the connection is a named&#xD;
pipe. Third, the local listeners listen on a particular host address and port; the&#xD;
Relay listeners listen on a leaf of a namespace tree and that namespace may be shared&#xD;
amongst many listeners living on a multitude of different machines in different locations. &#xD;
Fourth,   ... well you get the picture. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Bottom line: Not having support for WAS activation and &lt;em&gt;xyz.svc&lt;/em&gt; service endpoints&#xD;
is by no means an oversight. It’s on the list.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=3cc2bb9c-9a43-4c4c-9fdb-1f7bbfcaec43"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=e7rR2T0fw7U:8yaWyd7rOUw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=e7rR2T0fw7U:8yaWyd7rOUw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=e7rR2T0fw7U:8yaWyd7rOUw:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=e7rR2T0fw7U:8yaWyd7rOUw:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=e7rR2T0fw7U:8yaWyd7rOUw:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=e7rR2T0fw7U:8yaWyd7rOUw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=e7rR2T0fw7U:8yaWyd7rOUw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=e7rR2T0fw7U:8yaWyd7rOUw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=e7rR2T0fw7U:8yaWyd7rOUw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=e7rR2T0fw7U:8yaWyd7rOUw:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=e7rR2T0fw7U:8yaWyd7rOUw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=e7rR2T0fw7U:8yaWyd7rOUw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/e7rR2T0fw7U" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,3cc2bb9c-9a43-4c4c-9fdb-1f7bbfcaec43.aspx</comments>
      <category>.NET Services</category>
      <category>Azure</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,3cc2bb9c-9a43-4c4c-9fdb-1f7bbfcaec43.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=f7500883-e4a6-4697-ad1d-8a8829ec40d9</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,f7500883-e4a6-4697-ad1d-8a8829ec40d9.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,f7500883-e4a6-4697-ad1d-8a8829ec40d9.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=f7500883-e4a6-4697-ad1d-8a8829ec40d9</wfw:commentRss>
      
      <title>.NET Services: MSDN Developer Center</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,f7500883-e4a6-4697-ad1d-8a8829ec40d9.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/CMZ4ft0eseY/PermaLink,guid,f7500883-e4a6-4697-ad1d-8a8829ec40d9.aspx</link>
      <pubDate>Wed, 05 Nov 2008 19:27:31 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
The &lt;a href="http://msdn.microsoft.com/en-us/azure/netservices.aspx"&gt;MSDN Developer&#xD;
Center for .NET Services&lt;/a&gt; is the first stop to go to for technical information&#xD;
on the Service Bus, the Access Control Service and the Workflow Service. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
There quite a bit of documentation for “my” feature area, the &lt;a href="http://msdn.microsoft.com/en-us/library/dd129877.aspx"&gt;.NET&#xD;
Service Bus&lt;/a&gt;, including description of all the bindings and most of the object&#xD;
model surface area. Since we had quite a bit of object model churn up until a few&#xD;
weeks before PDC as we’ve exploded the former, singular &lt;em&gt;RelayBinding&lt;/em&gt; into&#xD;
two handful of WCF-aligned bindings, the reference documentation isn’t yet in the&#xD;
familiar MSDN reference format and also doesn’t yet work with Visual Studio’s “F1”.&#xD;
We’re obviously going to address that in the next major milestone now that the dust&#xD;
is settling a bit and the programming model is already quite a bit closer to what&#xD;
we want it to be for our “V1” release. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=f7500883-e4a6-4697-ad1d-8a8829ec40d9"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=CMZ4ft0eseY:__8ULtHq_Ms:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=CMZ4ft0eseY:__8ULtHq_Ms:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=CMZ4ft0eseY:__8ULtHq_Ms:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=CMZ4ft0eseY:__8ULtHq_Ms:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=CMZ4ft0eseY:__8ULtHq_Ms:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=CMZ4ft0eseY:__8ULtHq_Ms:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=CMZ4ft0eseY:__8ULtHq_Ms:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=CMZ4ft0eseY:__8ULtHq_Ms:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=CMZ4ft0eseY:__8ULtHq_Ms:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=CMZ4ft0eseY:__8ULtHq_Ms:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=CMZ4ft0eseY:__8ULtHq_Ms:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=CMZ4ft0eseY:__8ULtHq_Ms:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/CMZ4ft0eseY" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,f7500883-e4a6-4697-ad1d-8a8829ec40d9.aspx</comments>
      <category>.NET Services</category>
      <category>Azure</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,f7500883-e4a6-4697-ad1d-8a8829ec40d9.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=535b30fb-3e2c-442b-9fa2-33adb0f4acb1</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,535b30fb-3e2c-442b-9fa2-33adb0f4acb1.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,535b30fb-3e2c-442b-9fa2-33adb0f4acb1.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=535b30fb-3e2c-442b-9fa2-33adb0f4acb1</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>.NET Services - Two things you may not have noticed yet....</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,535b30fb-3e2c-442b-9fa2-33adb0f4acb1.aspx</guid>
      <link>http://feedproxy.google.com/~r/clemensv/~3/oZ5kj1KSnBk/PermaLink,guid,535b30fb-3e2c-442b-9fa2-33adb0f4acb1.aspx</link>
      <pubDate>Mon, 03 Nov 2008 05:03:21 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
In the sea of PDC 2008 announcements you may have missed the following two signficant&#xD;
developments:&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;a href="http://jdotnetservices.com/"&gt;.NET Services for Java&lt;/a&gt;&#xD;
          &lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
            &lt;a href="http://www.dotnetservicesruby.com/"&gt;.NET Services for Ruby&lt;/a&gt;&#xD;
          &lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
For the past 2 months our team has worked very closely with our partners at &lt;a href="http://www.schakra.com"&gt;Schakra&lt;/a&gt; on&#xD;
the Java SDK parts and with &lt;a href="http://www.thoughtworks.com"&gt;ThoughtWorks&lt;/a&gt; on&#xD;
the Ruby parts. These are the first baby steps and these two SDKs cover only&#xD;
a small subset of the capabilities of the .NET SDK so far. That's merely a function&#xD;
of when we started with these projects and how far we've gotten with the required&#xD;
protocol support; we want and we will take this a lot further over the next development&#xD;
milestones. In the end, the .NET Services fabric ought not to care much what language&#xD;
the senders and listeners are written in and what platform they run&#xD;
on. We're building a universal services platform. We're taking Java and Ruby&#xD;
very seriously and have a few more platforms on the list for which we want to&#xD;
add explicit support. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=535b30fb-3e2c-442b-9fa2-33adb0f4acb1"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=oZ5kj1KSnBk:bgki8gzZdJI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=oZ5kj1KSnBk:bgki8gzZdJI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=oZ5kj1KSnBk:bgki8gzZdJI:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=oZ5kj1KSnBk:bgki8gzZdJI:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=oZ5kj1KSnBk:bgki8gzZdJI:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=oZ5kj1KSnBk:bgki8gzZdJI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=oZ5kj1KSnBk:bgki8gzZdJI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=oZ5kj1KSnBk:bgki8gzZdJI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=oZ5kj1KSnBk:bgki8gzZdJI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=oZ5kj1KSnBk:bgki8gzZdJI:l6gmwiTKsz0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?d=l6gmwiTKsz0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/clemensv?a=oZ5kj1KSnBk:bgki8gzZdJI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/clemensv?i=oZ5kj1KSnBk:bgki8gzZdJI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/clemensv/~4/oZ5kj1KSnBk" height="1" width="1"/&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,535b30fb-3e2c-442b-9fa2-33adb0f4acb1.aspx</comments>
      <category>PDC 08</category>
      <category>Azure</category>
      <category>.NET Services</category>
    <feedburner:origLink>http://vasters.com/clemensv/PermaLink,guid,535b30fb-3e2c-442b-9fa2-33adb0f4acb1.aspx</feedburner:origLink></item>
  </channel>
</rss>
