<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://developers.de/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'Workflow' and 'WCF'</title><link>http://developers.de/search/SearchResults.aspx?a=1&amp;o=DateDescending&amp;tag=Workflow,WCF&amp;orTags=0</link><description>Search results matching tags 'Workflow' and 'WCF'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>Setting up authorization rights on Service Bus entities</title><link>http://developers.de/blogs/damir_dobric/archive/2013/01/31/setting-up-authorization-on.aspx</link><pubDate>Thu, 31 Jan 2013 06:18:00 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:511677</guid><dc:creator>ddobric</dc:creator><description>&lt;p&gt;Service Bus for Windows Server provides two ways to setup access rights to its entities (queues/topics). Since the Windows Azure Access Control Service (ACS) is not available on Windows Server, the Service Bus for Windows Server includes a simple Service Bus Security Token Service (SBSTS). The SBSTS integrates with the Windows security model, and silently issues a Simple Web Tokens (SWTs) based on Windows identities (for domain users, or roles for domain groups).&lt;/p&gt;  &lt;p&gt;If you setup the rights on the namespace-level the user will automatically get all permissions: Manage, Listen and Send. Additionally rights can be managed at entity level more precisely. When setting up rights on that level you have to deal with two different types of claims. Currently there are two types of claims supported. First type is&amp;#160; used when the right is setup for domain user, and second one when the right is setup to domain group.   &lt;br /&gt;In general, both types can be described by short name and full name.&amp;#160; Below are the supported types:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Domain Group&lt;/strong&gt; claim&amp;#160; type is called &lt;strong&gt;RoleType&lt;/strong&gt;:&lt;/p&gt;  &lt;p&gt;shortname: &amp;quot;&lt;strong&gt;role&lt;/strong&gt;&amp;quot;&lt;/p&gt;  &lt;p&gt;fullname: &amp;quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/role&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Domain User &lt;/strong&gt;Claim Type is called &lt;strong&gt;IdentityType&lt;/strong&gt;:&lt;/p&gt;  &lt;p&gt;shortname: &amp;quot;&lt;strong&gt;nameidentifier&lt;/strong&gt;&amp;quot;&lt;/p&gt;  &lt;p&gt;fullname: &amp;quot;&lt;a href="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"&gt;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier&lt;/a&gt;&amp;quot;&lt;/p&gt;  &lt;p&gt;For better understanding take a look on following example:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;QueueDescription&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; myQueue = &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;new&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;QueueDescription&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;(QueueName);&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;             &lt;p&gt;&amp;#160;&lt;/p&gt;           &lt;/span&gt;&lt;/p&gt;          &lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AuthorizationRule&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; identifierRule = &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;new&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AllowRule&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;(&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:maroon;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;quot;WorkflowDefaultNamespace&amp;quot;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;,&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:maroon;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;quot;nameidentifier&amp;quot;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;,             &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:maroon;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;quot;username@yourdomain.com&amp;quot;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;,&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;new&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;List&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AccessRights&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;gt;()&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;{ &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AccessRights&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;.Listen, &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AccessRights&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;.Send &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;});&lt;/span&gt;&lt;/p&gt;          &lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;myQueue.Authorization.Add(identifierRule);&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;             &lt;p&gt;&amp;#160;&lt;/p&gt;           &lt;/span&gt;&lt;/p&gt;          &lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AuthorizationRule&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; groupRule = &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;new&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AllowRule&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;(&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:maroon;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;quot;WorkflowDefaultNamespace&amp;quot;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;,&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:maroon;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;quot;role&amp;quot;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;,&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:maroon;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;a href="mailto:groupname@yourdomain.com"&gt;groupname@yourdomain.com&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;,             &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;new&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;List&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AccessRights&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;gt;()&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;{ &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AccessRights&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;.Listen, &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AccessRights&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;.Send &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;});&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;             &lt;p&gt;&amp;#160;&lt;/p&gt;           &lt;/span&gt;&lt;/p&gt;          &lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;myQueue.Authorization.Add(groupRule);&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;             &lt;p&gt;&amp;#160;&lt;/p&gt;           &lt;/span&gt;&lt;/p&gt;          &lt;p class="MsoNormal"&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;line-height:115%;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;line-height:115%;mso-highlight:white;"&gt;namespaceManager.CreateQueue(myQueue);&lt;/span&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;This example adds the send and listen rights to one user and one group. Note that that the first argument (issuer name) can be obtained by command-let Get-SbNamespace. Usually this equals to the name of namespace. In my example I used the namespace of the Workflow Manager (&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:maroon;mso-highlight:white;mso-ansi-language:en-us;"&gt;“WorkflowDefaultNamespace”&lt;/span&gt;).&lt;/p&gt;  &lt;p&gt;Following example shows hot enumerate rights:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;QueueDescription&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; q = namespaceManager.GetQueue(QueueName);             &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;             &lt;p&gt;&amp;#160;&lt;/p&gt;           &lt;/span&gt;&lt;/p&gt;          &lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;var&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; en = q.Authorization.GetEnumerator();             &lt;br /&gt;              &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;while&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; (en.MoveNext())             &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{              &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;AuthorizationRule&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; rule = en.Current;             &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;string&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; rights = &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:maroon;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;;             &lt;br /&gt;              &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;foreach&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; (&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;var&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; r &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:blue;mso-highlight:white;mso-ansi-language:en-us;"&gt;in&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt; rule.Rights)             &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;rights += r;              &lt;p&gt;&lt;/p&gt;           &lt;/span&gt;&lt;/p&gt;          &lt;p class="MsoNormal" style="margin-bottom:0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:#2b91af;mso-highlight:white;mso-ansi-language:en-us;"&gt;Console&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;.WriteLine(&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:maroon;mso-highlight:white;mso-ansi-language:en-us;"&gt;&amp;quot;type:{0}, value:{1}, rights: {2}&amp;quot;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;, rule.ClaimType, rule.ClaimValue, rights);             &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;mso-ansi-language:en-us;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:consolas;background:white;color:black;mso-highlight:white;"&gt;}&lt;/span&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;The official MSDN article which gives a better high-level overview: &lt;a title="http://msdn.microsoft.com/en-us/library/windowsazure/jj193003(v=azure.10).aspx" href="http://msdn.microsoft.com/en-us/library/windowsazure/jj193003(v=azure.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/jj193003(v=azure.10).aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Download Service Bus 1.0 and Workflow Manager 1.0 RTM</title><link>http://developers.de/blogs/damir_dobric/archive/2012/10/19/download-service-bus-1-0-and-workflow-manager-1-0-rtm.aspx</link><pubDate>Fri, 19 Oct 2012 21:29:53 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:356685</guid><dc:creator>ddobric</dc:creator><description>&lt;p&gt;   &lt;br /&gt;RTM Build of Service Bus and Workflow Manager 1.0 is available for download in Microsoft Download Center: It is up to now still not officially announced in term of marketing drums, but first posts published 1 hour ago by team members are out there. Anyhow the bits which can be downloaded (click on image below) correspond to official RTM. If you are currently using Release Candidate or Beta version I would highly recommend to install new bits, because it fix some major bugs.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=35374"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_2698EE61.png" width="240" height="56" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=35375"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_6662D4E6.png" width="282" height="55" /&gt;&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Service Bus Documentation: &lt;a title="http://msdn.microsoft.com/library/jj193022(Azure.10).aspx" href="http://msdn.microsoft.com/library/jj193022(Azure.10).aspx"&gt;http://msdn.microsoft.com/library/jj193022(Azure.10).aspx&lt;/a&gt;    &lt;br /&gt;Service Bus Explorer: &lt;a title="http://code.msdn.microsoft.com/windowsazure/Service-Bus-Explorer-f2abca5a" href="http://code.msdn.microsoft.com/windowsazure/Service-Bus-Explorer-f2abca5a"&gt;http://code.msdn.microsoft.com/windowsazure/Service-Bus-Explorer-f2abca5a&lt;/a&gt;    &lt;br /&gt;Service Bus Client (NuGet): http://nuget.org/packages/ServiceBus.v1_0    &lt;br /&gt;Release Notes:&lt;a title="http://msdn.microsoft.com/en-us/library/jj203548(v=azure.10).aspx" href="http://msdn.microsoft.com/en-us/library/jj203548(v=azure.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/jj203548(v=azure.10).aspx&lt;/a&gt;    &lt;br /&gt;All Service Bus Examples: &lt;a title="http://code.msdn.microsoft.com/windowsazure/site/search?f%5B0%5D.Type=Topic&amp;amp;f%5B0%5D.Value=Service%20Bus" href="http://code.msdn.microsoft.com/windowsazure/site/search?f%5B0%5D.Type=Topic&amp;amp;f%5B0%5D.Value=Service%20Bus"&gt;http://code.msdn.microsoft.com/windowsazure/site/search?f%5B0%5D.Type=Topic&amp;amp;f%5B0%5D.Value=Service%20Bus&lt;/a&gt;    &lt;br /&gt;Converting Service Bus application Service Bus 1.0 (OnPrem Service Bus: &lt;a title="http://msdn.microsoft.com/en-US/library/jj218331(v=azure.10).aspx" href="http://msdn.microsoft.com/en-US/library/jj218331(v=azure.10).aspx"&gt;http://msdn.microsoft.com/en-US/library/jj218331(v=azure.10).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Workflow Manager documentation: &lt;a title="http://msdn.microsoft.com/library/jj193528" href="http://msdn.microsoft.com/library/jj193528"&gt;http://msdn.microsoft.com/library/jj193528&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Workflow Manager Samples:    &lt;br /&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/jj193482(v=azure.10).aspx" href="http://msdn.microsoft.com/en-us/library/jj193482(v=azure.10).aspx"&gt;http://msdn.microsoft.com/en-us/library/jj193482(v=azure.10).aspx&lt;/a&gt;    &lt;br /&gt;&lt;a title="http://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=User&amp;amp;f%5B0%5D.Value=Dave%20Cliffe%20-%20MSFT" href="http://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=User&amp;amp;f%5B0%5D.Value=Dave%20Cliffe%20-%20MSFT"&gt;http://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=User&amp;amp;f%5B0%5D.Value=Dave%20Cliffe%20-%20MSFT&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Quick Start:   &lt;br /&gt;German:&lt;a title="http://daenet.de/de/stream.daenet?sta=3&amp;amp;pid=179&amp;amp;kat=62" href="http://daenet.de/de/stream.daenet?sta=3&amp;amp;pid=179&amp;amp;kat=62"&gt;http://daenet.de/de/stream.daenet?sta=3&amp;amp;pid=179&amp;amp;kat=62&lt;/a&gt;    &lt;br /&gt;English: &lt;a title="http://daenet.eu/eu/stream.daenet?sta=3&amp;amp;pid=180&amp;amp;kat=3" href="http://daenet.eu/eu/stream.daenet?sta=3&amp;amp;pid=180&amp;amp;kat=3"&gt;http://daenet.eu/eu/stream.daenet?sta=3&amp;amp;pid=180&amp;amp;kat=3&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Service Bus and Workflow Manager RTM download and useful resource.&lt;/p&gt;</description></item><item><title>ServiceBus Message Broker Service is starting and starting…(Cannot Deploy SPS Workflow)</title><link>http://developers.de/blogs/damir_dobric/archive/2012/09/18/servicebus-message-broker-service-is-starting-and-starting.aspx</link><pubDate>Tue, 18 Sep 2012 05:21:00 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:329310</guid><dc:creator>ddobric</dc:creator><description>&lt;p&gt;When working with Windows Azure Workflow, Workflow Host Manager or Share Point 2013 Workflow you might experience several problems related to Message Broker Service.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Issues related to broker In SharePoint are manifested through workflow deployment issues. For example, if you try to deploy the workflow you might get following error:    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Error 1 Error occurred in deployment step &amp;#39;Activate Features&amp;#39;: System.IO.InvalidDataException: A response was returned that did not come from the workflow service. Status code = 503:    &lt;br /&gt;&amp;lt;!DOCTYPE HTML PUBLIC &amp;quot;-//W3C//DTD HTML 4.01//EN&amp;quot;&amp;quot;&lt;a href="http://www.w3.org/TR/html4/strict.dtd&amp;quot;"&gt;http://www.w3.org/TR/html4/strict.dtd&amp;quot;&lt;/a&gt;&amp;gt;     &lt;br /&gt;&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Service Unavailable&amp;lt;/TITLE&amp;gt;     &lt;br /&gt;&amp;lt;META HTTP-EQUIV=&amp;quot;Content-Type&amp;quot; Content=&amp;quot;text/html; charset=us-ascii&amp;quot;&amp;gt;&amp;lt;/HEAD&amp;gt;     &lt;br /&gt;&amp;lt;BODY&amp;gt;&amp;lt;h2&amp;gt;Service Unavailable&amp;lt;/h2&amp;gt;     &lt;br /&gt;&amp;lt;hr&amp;gt;&amp;lt;p&amp;gt;HTTP Error 503. The service is unavailable.&amp;lt;/p&amp;gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;If you are rather Service Bus guy, you will figure out that Broker Service does not start. It is all the time in starting status. In both cases, take a look on status of Windows Fabric Host Service. You will probably notice that this service is not running. If so start it, stop the broker and start the broker again.    &lt;br /&gt;If you cannot stop the broker service while starting, got to task manager&amp;#160; and kill Microsoft.ServiceBus Message Broker process. Then start the broker service.&lt;/p&gt;</description></item><item><title>Installing Workflow 1.0 BETA with Workflow Host</title><link>http://developers.de/blogs/damir_dobric/archive/2012/07/31/installing-workflow-1-0-beta-with-workflow-host.aspx</link><pubDate>Tue, 31 Jul 2012 07:34:36 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:324768</guid><dc:creator>ddobric</dc:creator><description>First of all download all components from &lt;a title="http://www.microsoft.com/en-us/download/details.aspx?id=30369" href="http://www.microsoft.com/en-us/download/details.aspx?id=30369"&gt;http://www.microsoft.com/en-us/download/details.aspx?id=30369&lt;/a&gt; To install the Service Bus run &lt;u&gt;workflow.3f.3f.3fnew.exe&lt;/u&gt;.   &lt;br /&gt;Another possibility would be to use Web Platform installer.   &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_1060DC09.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_2C0567FF.png" width="780" height="535" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After start of installation setup will detect dependent components. Please note that restart will be required assuming that .NET 4.5 has not been previously installed. It is important to understand that Workflow Host has a dependency to Service Bus. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_300FB5D1.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_24E62B87.png" width="689" height="475" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you previously didn’t install Service Bus you can proceed with installation of Workflow Manager directly. Setup will automatically recognize missing dependencies.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_38C0ABCD.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_437E0322.png" width="698" height="536" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click &lt;strong&gt;I Accep&lt;/strong&gt;t to proceed. Please also note that Workflow used in Workflow 1.0 BETA (the name might be changed future) is built on top of .NET 4.5. This means that this version of Workflow is almost identical with the common WF 4.5. This Workflow BETA 1 contains few more activities which support activation of workflow instances via service bus message. Moreover, current version does not support Messaging activities like ReceiveMessage. This is an important architecture issue you should be aware of!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_6BCF4E84.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_1DC6EF0F.png" width="700" height="472" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After installation of .NET 4.5 you will have to restart the machine.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_4FBE8F99.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_4495054F.png" width="689" height="476" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At the end following appears:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_768CA5D9.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_6F6D6961.png" width="695" height="188" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After all Workflow will appear in start menu:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_4F525CA4.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_4428D25A.png" width="360" height="123" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Last but not least, do not forget to install Workflow Tools for Visual Studio.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;x86: &lt;a href="http://go.microsoft.com/fwlink/?LinkID=251615&amp;amp;clcid=0x409"&gt;http://go.microsoft.com/fwlink/?LinkID=251615&amp;amp;clcid=0x409&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;x64: &lt;a href="http://go.microsoft.com/fwlink/?LinkID=250946&amp;amp;clcid=0x409"&gt;http://go.microsoft.com/fwlink/?LinkID=250946&amp;amp;clcid=0x409&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you don’t install them new activities will not appear in designer and design time APIs cannot be uses (i.e. publishing of workflow).&lt;/p&gt;</description></item><item><title>Installing Service Bus Server 1.0 BETA</title><link>http://developers.de/blogs/damir_dobric/archive/2012/07/24/installing-service-bus-server-1-0-beta.aspx</link><pubDate>Tue, 24 Jul 2012 13:35:00 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:324305</guid><dc:creator>ddobric</dc:creator><description>&lt;p&gt;   &lt;br /&gt;In July 2012 Microsoft has for the first time published a peace of Windows Azure which is installable locally (On-Premise). It is Service Bus (v1 BETA) which is slightly adapted version of Windows Azure Service Bus. If you are aware of this product this post will help you to install it. If you are new to Service Bus Server (this is how some people call it) it is highly recommended to take a look on this &lt;a href="http://developers.de/blogs/damir_dobric/archive/2012/07/17/hello-service-bus-for-server-server-windows-azure-workflow-and-sharepoint-workflow-host.aspx"&gt;article&lt;/a&gt;.    &lt;br /&gt;    &lt;br /&gt;Before you start with installation go to following URL and download all required components from &lt;a title="http://www.microsoft.com/en-us/download/details.aspx?id=30376" href="http://www.microsoft.com/en-us/download/details.aspx?id=30376"&gt;http://www.microsoft.com/en-us/download/details.aspx?id=30376&lt;/a&gt;. To install the Service Bus run &lt;u&gt;&lt;strong&gt;servicebus.3f.3f.3fnew.exe&lt;/strong&gt;&lt;/u&gt;. Another option to do that is to use Web Platform installer v4. Following picture shows two new components in Platform Installer. This post is related to installation of Service Bus 1.0. If you want to install Workflow 1.0 you will anyhow have to first install Service Bus.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_2B73A3F7.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_18BEAA40.png" width="771" height="536" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;After start of Service Bus Server setup following dialog appears:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_0A803150.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_2A2F0B18.png" width="676" height="457" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Immediately after start the list of missing dependencies will appear (see picture below). Please note that after installation restart will be required! Note that if you previously have installed Windows Fabric component you will have to uninstall it. Note that it is not necessary to go to direct link (shown below). Simply click &amp;quot;I Accept&amp;quot; to proceed. Setup will automatically download and install required components.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_5ECF6753.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_5090EE63.png" width="698" height="478" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After installation of Service management Components 3.0 you will have to restart the machine.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_05314A9F.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_44FB3124.png" width="403" height="167" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After restart the installation will proceed automatically. At the end the start menu will contain the node “Windows Azure Service Bus” :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb17_5F00_04C517AA.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image_thumb[17]" border="0" alt="image_thumb[17]" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb17_5F00_thumb_5F00_5D8ACE74.png" width="360" height="123" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>How to uninstall Service Bus Server and Workflow Host?</title><link>http://developers.de/blogs/damir_dobric/archive/2012/07/19/how-to-remove-service-bus-server-and-workflow-host.aspx</link><pubDate>Thu, 19 Jul 2012 05:42:00 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:323654</guid><dc:creator>ddobric</dc:creator><description>&lt;p&gt;This post is related to BETA version of Service Bus Server and Workflow Host which is used in Share Point 2013. It should help you to uninstall previous version of Service Bus and Workflow.&lt;/p&gt;  &lt;p&gt;Use the following procedure to remove Workflow and Service Bus from a node in a farm. You must perform these actions on every node from which you want to delete Workflow and Service Bus.&lt;/p&gt;  &lt;p&gt;1. Go to stare menu locate AppFabric Server and start configuration wizard. Remove the node from the farm as described in &amp;quot;Leaving a Farm&amp;quot;. If you have lot of time you can also use PowerShell.&lt;/p&gt;  &lt;p&gt;2. Open the&amp;#160; Control Panel windows and uninstall following components:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Microsoft AppFabric&amp;#160; &lt;br /&gt;      &lt;br /&gt;Microsoft Windows Fabric&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;After these steps ServiceBus and Workflow including Windows Azure Fabric&amp;#160;&amp;#160; which is running locally are removed. However all databases will remain at the SQL server. If you want to remove them, you can/should first make a backup.&lt;/p&gt;  &lt;p&gt;You can use SQL Management Studio to remove the databases that were associated with Workflow and Service Bus.    &lt;br /&gt;Following databases are related to SB and WF Host:&lt;/p&gt;  &lt;p&gt;a. AppFabricManagementDB&lt;/p&gt;  &lt;p&gt;b. SbGatewayDatabase&lt;/p&gt;  &lt;p&gt;c. SBContainer01 &lt;/p&gt;  &lt;p&gt;d. WFInstanceManagementDB&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Last but not least. if you have Visual Studio installed at the machine and have previously installed Workflow Client, you will have to remove it too. If you don’t do it the installation of the new Workflow Client and Workflow itself will fail.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_5DDEA36E.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_4B95DCAC.png" width="730" height="46" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Hello Service Bus 1.0, Workflow 1.0 and SharePoint Workflow Host</title><link>http://developers.de/blogs/damir_dobric/archive/2012/07/17/hello-service-bus-for-server-server-windows-azure-workflow-and-sharepoint-workflow-host.aspx</link><pubDate>Tue, 17 Jul 2012 04:08:18 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:320678</guid><dc:creator>ddobric</dc:creator><description>&lt;p&gt;The &lt;font style="background-color:#ffff00;"&gt;OnPrem&lt;/font&gt; version of&lt;font style="background-color:#ffff00;"&gt; Windows Azure Service Bus&lt;/font&gt; is probably firs peace of Azure Cloud which can be installed on your laptop. Personally I would call it Enterprise Service Bus, which can and should be used for almost any kind of messaging in enterprise. The good thin on this is that the exactly (more or less) the same version is running in the Windows Azure Cloud. The exactly same means in term of API which developers will used. “More or less” means that there are still few differences.     &lt;br /&gt;First and probably less important difference is Relaying feature. This feature is currently supported in the cloud only (at least for now). Queue and Topic messaging is fully supported.&lt;/p&gt;  &lt;h4&gt;Windows Token&lt;/h4&gt;  &lt;p&gt;However from the architecture point of view, it is more important that On-Premise version (Service Bus Server) additionally to ACS use Windows Token to access queues and topics. To make this working, SB supports internally some kind of Security Token Service, which is able to issue the ACS compatible token on behalf of Windows Token tight in the first message request.    &lt;br /&gt;This is all you should now for now about this STS. In fact it is transparent for developer and you shouldn’t eve know that it exist. This information is interesting to understand that there is no any magic behind changed security system. Please note that Service Bus Server can also create a namespace in SB&amp;#160; which uses ACS just like SB in azure.     &lt;br /&gt;&lt;/p&gt;  &lt;h4&gt;Service Bus Configuration in PowerShell&lt;/h4&gt;  &lt;p&gt;The currently available release supports Power Shell Based configuration only. The RTM version will additionally support a Configuration Wizard.    &lt;br /&gt;Note the Service Bus Explorer supports Service Bus Server (see link below). &lt;/p&gt;  &lt;h4&gt;Installation via WEB PI 4&lt;/h4&gt;  &lt;br /&gt;  &lt;p&gt;Currently you will have to use WEB Platform Installer v4 &lt;a title="http://www.microsoft.com/web/downloads/platform.aspx" href="http://www.microsoft.com/web/downloads/platform.aspx"&gt;http://www.microsoft.com/web/downloads/platform.aspx&lt;/a&gt;. to install the bits. The setup contains in fact two products: Windows Azure Workflow and Service Bus. Both products are installable on your machine. Yes, that’s right. Windows Azure Workflow is installable on the local machine. Depending on what you want to install, select SB or/and WF and proceed with installation.     &lt;br /&gt;&lt;/p&gt;  &lt;h4&gt;Topology Facts&lt;/h4&gt;  &lt;p&gt;The SB cluster is supported with High Availability feature similar to caching service. That means HA is supported by 3+ nodes in the cluster.    &lt;br /&gt;The underlying database can be SQL Express (no joke), SQL 2008 and even SQL 2012.     &lt;br /&gt;Workgroups are supported too.     &lt;br /&gt;Up to now, bits can be installed on Windows 7 and Windows 8 client OS family. Both are currently supported for development purposes only.     &lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;Workflow 1.0 &lt;/h3&gt;  &lt;p&gt;The workflow version installed here needs much more space and time to be explained. For now it is important that you can run your Workflows in Windows Azure. The same version can also be run on-premise. Unfortunately this version cannot use Windows Server AppFabric. The team has internally decided to build the new host for massive scale which activates Workflow Instances from Service Bus topic. At the moment you will have decide whether to use the Windows Server AppFabric host or this one. The new host has been specifically built for SharePoint 15 which is first Microsoft product which will span its workflows on top of Service Bus on premise.    &lt;br /&gt;Note that the same host and workflow will be used by SharePoint Online Version.     &lt;br /&gt;With this version SharePoint has finally a serious host for running processes outside of SPS pool. My best wishes.(I was waiting almost 10 years for this). More experienced architects and developers might start to think about SharePoint as a SAP Netweaver. Please just don’t overuse it in this case (as often in the past of SPS).&amp;#160; &lt;br /&gt;Authoring of Workflows and SPS13 Workflows is WF 4.5.     &lt;br /&gt;NOTE, that not all activities of the common WF 4.5 version are supported. For example messaging activities (i.e. ReceiceMessage) and versioning are not supported. Fortunately there are special activities which can perform activation of workflow by message. In fact this is the only way to start he workflow.     &lt;br /&gt;If you want to use custom activities in&lt;em&gt; On-Prem&lt;/em&gt; version of workflow, there are few extra steps which you have to manually (for now) perform.     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;Following sample illustrate how to receive the message from topic.     &lt;br /&gt;&lt;/p&gt;  &lt;table style="border-bottom:medium none;border-left:medium none;list-style-type:disc;border-collapse:collapse;background:#daeef3;border-top:medium none;border-right:medium none;mso-background-themecolor:accent5;mso-background-themetint:51;mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt;" class="MsoTableGrid" cellspacing="0" cellpadding="0"&gt;     &lt;tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;"&gt;       &lt;td style="border-bottom:windowtext 1pt solid;border-left:windowtext 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:windowtext 1pt solid;border-right:windowtext 1pt solid;padding-top:0cm;mso-border-alt:solid windowtext .5pt;"&gt;         &lt;p style="line-height:normal;margin:0cm 0cm 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;font color="#0000ff" face="Consolas"&gt;&lt;font style="font-size:9.5pt;"&gt;using&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language:en-us;"&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; System;&lt;/font&gt;                   &lt;br /&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; System.Collections.Generic;&lt;/font&gt;                   &lt;br /&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; System.Net;&lt;/font&gt;                   &lt;br /&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; Microsoft.ServiceBus;&lt;/font&gt;                   &lt;br /&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; Microsoft.ServiceBus.Description;&lt;/font&gt;                   &lt;br /&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; Microsoft.ServiceBus.Messaging;&lt;/font&gt;                   &lt;br /&gt;                  &lt;br /&gt;                  &lt;br /&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;namespace&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; Daenet.ServiceBus                    &lt;br /&gt;{                     &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Subscriber&lt;/font&gt;&lt;/span&gt;                   &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{                     &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;strike&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; ServiceNamespace;                      &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; Issuer;                      &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#000000" face="Consolas"&gt; Key;                    &lt;br /&gt;&lt;/font&gt;&lt;/strike&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; TopicName = &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;demotopic&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;;                    &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160; &lt;/span&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; Main(&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;[] args)                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;ServicePointManager&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;.ServerCertificateValidationCallback = (a, b, c, d) =&amp;gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;true&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;};                     &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Uri&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; rootAddressManagement =                    &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ServiceBusEnvironment&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.CreatePathBasedServiceUri(&lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;https&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,                    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; “testspace01”, &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.Format(&lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;{0}:{1}&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;YOURHOST&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;, 4446));                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Uri&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; rootAddressRuntime = &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;ServiceBusEnvironment&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.CreatePathBasedServiceUri(&lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;sb&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,                    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; “testspace01”, &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.Format(&lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;{0}:{1}&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;YOURHOST&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;, 9354));                    &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;NamespaceManagerSettings&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; nmSettings = &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;NamespaceManagerSettings&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;();                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;nmSettings.TokenProvider = &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;TokenProvider&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.CreateWindowsTokenProvider(&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Uri&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;gt;() { rootAddressManagement });                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;NamespaceManager&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; namespaceManager = &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;NamespaceManager&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;(rootAddressManagement, nmSettings);                    &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessagingFactorySettings&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; mfSettings = &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessagingFactorySettings&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;();                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;mfSettings.TokenProvider = &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;TokenProvider&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.CreateWindowsTokenProvider(&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Uri&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;gt;() { rootAddressManagement });                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessagingFactory&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; factory = &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessagingFactory&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;.Create(rootAddressRuntime, mfSettings);                    &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SubscriptionClient&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; subscriptionClient =                    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; factory.CreateSubscriptionClient(TopicName, &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;Subscription1&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;ReceiveMode&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;.PeekLock);                    &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;while&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; (&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;true&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;)                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;BrokeredMessage&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; message = subscriptionClient.Receive(&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;TimeSpan&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;.FromSeconds(1500));                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; (message == &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;)                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;break&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;;                    &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;try&lt;/font&gt;&lt;/span&gt;                   &lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Console&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.WriteLine(&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.Format(&lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;Message received: SEQUENCE = {0}, Id = {1},                      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Body = {1}&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, message.Properties[&lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;SEQUENCE&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;], message.MessageId, message.GetBody&amp;lt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;gt;()));                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;message.Complete();                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;}                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;catch&lt;/font&gt;&lt;/span&gt;                   &lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;message.Abandon();                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;}                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;}                     &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Console&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.WriteLine(&lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;\nEnd of receiving, press any key to exit.&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font color="#000000"&gt;);                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Console&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.ReadLine();                    &lt;br /&gt;                    &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;subscriptionClient.Close();                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;}                     &lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;}                     &lt;br /&gt;}&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;It is important in this sample that things like Issuer and Key are not required. The scope used by issuing of the token is like    &lt;br /&gt;    &lt;br /&gt;&lt;em&gt;scope=http%3a%2f%2yourhostname%2ftestspace01%2fdemotopic%2fSubscriptions%2fSubscription1.&lt;/em&gt;     &lt;br /&gt;    &lt;br /&gt;The issued token is is private for developers and it will be passed internally to all calls to service bus. On thing of your interest is that this token contains claims which describe users AD membership. Based on this information SB will perform authorization.     &lt;br /&gt;    &lt;br /&gt;Resources:     &lt;br /&gt;&lt;/p&gt;  &lt;h5&gt;Service Bus Beta resources:&lt;/h5&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30376"&gt;Service Bus 1.0 Beta (download)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/jj193022%28v=azure.10%29.aspx"&gt;Service Bus for Windows Server (Service Bus 1.0 Beta)&lt;/a&gt; MSDN documentation&lt;/p&gt;  &lt;p&gt;&lt;a href="http://download.microsoft.com/download/F/9/6/F963B6DB-A327-4D10-B3E5-024D597BEE36/ServiceBusExplorer-Server.zip"&gt;Service Bus Explorer for Windows Server&lt;/a&gt;&lt;/p&gt;  &lt;h5&gt;Workflow 1.0 Beta resources &lt;/h5&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30369"&gt;Workflow 1.0 Beta (download)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/library/jj193528"&gt;Workflow 1.0 Beta MSDN Documentation&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/wlEmoticon_2D00_smile_5F00_07E77125.png" /&gt;&lt;/p&gt;</description></item><item><title>Configuring The Service Bus Workflow Farm</title><link>http://developers.de/blogs/damir_dobric/archive/2012/07/12/configuring-the-service-bus-workflow-farm.aspx</link><pubDate>Thu, 12 Jul 2012 05:40:00 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:324818</guid><dc:creator>ddobric</dc:creator><description>&lt;p&gt;This post is related to currently named Windows Azure Workflow 1.0. I describes how to configure the Workflow Host farm.&lt;/p&gt;  &lt;p&gt;If you chose to create the farm, the configuration wizard will create three required databases:&lt;/p&gt;  &lt;p&gt;Management Database    &lt;br /&gt;Resource Management Database     &lt;br /&gt;Instance Management Database     &lt;br /&gt;    &lt;br /&gt;At this step you don’t have to change anything.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_5724068D.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_64F64C88.png" width="761" height="662" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Then enter credentials of the user who will run hosting processes.     &lt;br /&gt;As a certificate generation key enter some typical password and remember it!!!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_44DB3FCB.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_76D2E055.png" width="721" height="641" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;After all configure required TCP and HTPP management ports. I would recommend to leave them at default.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_04A52651.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_369CC6DB.png" width="700" height="404" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the next step Service Bus farm settings be configured. First of all following databases will be created:    &lt;br /&gt;    &lt;br /&gt;-Farm Management Database     &lt;br /&gt;-Gateway Database     &lt;br /&gt;-Message Container Database&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_1681BA1E.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_0B582FD4.png" width="710" height="645" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Then like in previous step service account. It is good to know that the wizard will automatically after you have entered the user name, check if the user exists.     &lt;br /&gt;Also enter the password for certificate generation key. This can be a different one that in a case of Workflow Host.     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_564BA0A3.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_4B221659.png" width="676" height="509" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At the end you will have to enter TCP and HTTP port of the Service Bus server and the admin group name.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_4F2C642B.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_2F11576E.png" width="714" height="391" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Before the farm is configured you will get a summary:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_23E7CD24.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_1CC890AC.png" width="269" height="518" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_4EC03136.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_2EA52479.png" width="531" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You are finished if you see following:    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_237B9A2F.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_55733AB9.png" width="474" height="511" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h4&gt;How do all this with PowerShell?    &lt;br /&gt;&lt;/h4&gt;  &lt;p&gt;Following script is exactly executed by Wizard:&lt;/p&gt;  &lt;p&gt;# To be run in Workflow PowerShell Console which has both Workflow and Service Bus installed.&lt;/p&gt;  &lt;p&gt;# Create new SB Farm    &lt;br /&gt;$SBCertAutoGenerationKey = ConvertTo-SecureString -AsPlainText&amp;#160; -Force&amp;#160; -String &amp;#39;***** Replace with Service Bus Certificate Auto-generation key******&amp;#39;;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;New-SBFarm -FarmMgmtDBConnectionString &amp;#39;Data Source=HOSTInitial Catalog=SbManagementDB;Integrated Security=True&amp;#39; -PortRangeStart 9000 -TcpPort 9354 -RunAsName &lt;a href="mailto:&amp;#39;appfabricserviceuser@DOMAIN-AdminGroup"&gt;&amp;#39;appfabricserviceuser@DOMAIN-AdminGroup&lt;/a&gt; &amp;#39;BUILTIN\Administrators&amp;#39; -GatewayDBConnectionString &amp;#39;Data Source=HOST;Initial Catalog=SbGatewayDatabase;Integrated Security=True&amp;#39; -CertAutoGenerationKey $SBCertAutoGenerationKey -ContainerDBConnectionString &amp;#39;Data Source=Auxo.DAENET.LAN;Initial Catalog=SBMessageContainer01;Integrated Security=True&amp;#39;;&lt;/p&gt;  &lt;p&gt;# To be run in Workflow PowerShell Console which has both Workflow and Service Bus installed.&lt;/p&gt;  &lt;p&gt;# Create new WF Farm    &lt;br /&gt;$WFCertAutoGenerationKey = ConvertTo-SecureString -AsPlainText&amp;#160; -Force&amp;#160; -String &amp;#39;***** Replace with Workflow Certificate Auto-generation key******&amp;#39;;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;New-WFFarm -FarmMgmtDBConnectionString &amp;#39;Data Source=HOST;Initial Catalog=WFManagementDB;Integrated Security=True&amp;#39; -RunAsName &lt;a href="mailto:&amp;#39;appfabricserviceuser@DOMAIN&amp;#39;"&gt;&amp;#39;appfabricserviceuser@DOMAIN&amp;#39;&lt;/a&gt; -AdminGroup &amp;#39;BUILTIN\Administrators&amp;#39; -HttpsPort 12290 -HttpPort 12291 -InstanceMgmtDBConnectionString &amp;#39;Data Source=HOST;Initial Catalog=WFInstanceManagementDB;Integrated Security=True&amp;#39; -ResourceMgmtDBConnectionString &amp;#39;Data Source=HOST;Initial Catalog=WFResourceManagementDB;Integrated Security=True&amp;#39; -CertAutoGenerationKey $WFCertAutoGenerationKey;&lt;/p&gt;  &lt;p&gt;# Add SB Host    &lt;br /&gt;$SBRunAsPassword = ConvertTo-SecureString -AsPlainText&amp;#160; -Force&amp;#160; -String &amp;#39;***** Replace with RunAs Password for Service Bus ******&amp;#39;;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Add-SBHost -FarmMgmtDBConnectionString &amp;#39;Data Source=Auxo.DAENET.LAN;Initial Catalog=SbManagementDB;Integrated Security=True&amp;#39; -RunAsPassword $SBRunAsPassword -CertAutoGenerationKey $SBCertAutoGenerationKey;&lt;/p&gt;  &lt;p&gt;Try    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; # Create new SB Namespace     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; New-SBNamespace -Name &amp;#39;WorkflowDefaultNamespace&amp;#39; -AddressingScheme &amp;#39;Path&amp;#39; -ManageUsers &lt;a href="mailto:&amp;#39;appfabricserviceuser@HOST&amp;#39;,&amp;#39;svcuser@DOMAIN&amp;#39;"&gt;&amp;#39;appfabricserviceuser@HOST&amp;#39;,&amp;#39;svcuser@DOMAIN&amp;#39;&lt;/a&gt;;&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; Start-Sleep -s 90    &lt;br /&gt;}     &lt;br /&gt;Catch [system.InvalidOperationException]     &lt;br /&gt;{     &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;# Get SB Client Configuration    &lt;br /&gt;$SBClientConfiguration = Get-sbclientConfiguration -Namespaces &amp;#39;WorkflowDefaultNamespace&amp;#39;;&lt;/p&gt;  &lt;p&gt;# Add WF Host    &lt;br /&gt;$WFRunAsPassword = ConvertTo-SecureString -AsPlainText&amp;#160; -Force&amp;#160; -String &amp;#39;***** Replace with RunAs Password for Workflow ******&amp;#39;;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Add-WFHost -FarmMgmtDBConnectionString &amp;#39;Data Source=HOST;Initial Catalog=WFManagementDB;Integrated Security=True&amp;#39; -RunAsPassword $WFRunAsPassword -SBClientConfiguration $SBClientConfiguration -EnableHttpPort&amp;#160; -CertAutoGenerationKey $WFCertAutoGenerationKey;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;How to join an Existing Farm?    &lt;br /&gt;&lt;/h4&gt;  &lt;p&gt;Joining to an existing farm is more or less trivial operation, at least from point of view of configuration. You have to provide database host name, credentials and generation keys for Workflow Host and Service Bus.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_4A49B06F.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_7C4150F9.png" width="240" height="219" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_432A73F7.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_0A1396F5.png" width="240" height="210" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Note that jonining process does not create databases. Instead it joins the node to farm described by set o existing databases.&lt;/p&gt;  &lt;h4&gt;What if something goes wrong?&lt;/h4&gt;  &lt;p&gt;During creation of the farm some things can go wrong. Here is one example which shows how my configuration wizard failed to add the host to the farm.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_0E1DE4C7.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_02F45A7D.png" width="719" height="638" /&gt;&lt;/a&gt;     &lt;br /&gt;When something similar happen it can be that installation state remains inconsistent. Assuming the databases have been created which is probably the case, you can join the farm as described in the previous topic.     &lt;br /&gt;If this does not work,&amp;#160; start configuration wizard again &lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_1BF02AC2.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_4DE7CB4C.png" width="250" height="384" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt; and this time leave the farm:   &lt;br /&gt;  &lt;br /&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_14D0EE4A.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_09A76400.png" width="726" height="274" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After that I also stopped all services:    &lt;br /&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_0DB1B1D2.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_549AD4CF.png" width="152" height="53" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;and delete all created databases in SQL Management Studio. After that you can start fresh new configuration by selecting Create New Farm.&lt;/p&gt;</description></item><item><title>WinDays 2012 KeyNote Demo Step Through</title><link>http://developers.de/blogs/damir_dobric/archive/2012/05/12/windays-2012-keynote-demo-step-through.aspx</link><pubDate>Sat, 12 May 2012 11:54:46 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:302562</guid><dc:creator>ddobric</dc:creator><description>&lt;p&gt;   &lt;br /&gt;Few days ago I showed the Demo at &lt;a href="http://www.windays.hr/hr/naslovna/"&gt;WinDays&lt;/a&gt; 2012 keynote under the name “SharePoint Ralay”. The idea of the keynote was to show some important features which never have been shown or documented in the way as of very one common industry scenario. To keep things simple we didn’t go to deep into details of SharePoint and ServiceBus. We wanted to to build a demo which will show how to build few complex and enterprise relevant scenarios, but to be in the same time interesting for most developers in audience and even for journalists who have been attending the key note.     &lt;br /&gt;So I decided to target three common industrial issues which daenet has been asked to solve multiple times during 2011:&lt;/p&gt;  &lt;p&gt;1. How to get (or put) SharePoint data out of enterprise without changing of infrastructure?    &lt;br /&gt;2. How to build dynamic WCF contract?     &lt;br /&gt;3. How to build Failover cluster in 48 Seconds?&lt;/p&gt;  &lt;h4&gt;1. How to get/put data out of SPS without changing of infrastructure?&lt;/h4&gt;  &lt;p&gt;Most SharePoint Developers live in their collaborative context which mostly does not require such scenarios. But when building SharePoint solutions you will figure out that SharePoint isn’t application platform in term how one solution or enterprise architect expect to be. Today, complex systems are systems which consist of usually distributed and hybrid hybrid applications.Distributed means they at least do not run in one process and hybrid means they can be build on top of different technologies.    &lt;br /&gt;So, imagine now one application which is build in .NET 4.5 which should run in SharePoint. To make it more simpler image a JAVA application which runs at different machine on different geographic location. Now put it in SharePoint and let talk to each other. Application Platform is the platform which enables to do such things. Any other application platform like SharePoint, CRM, BizTalk or anything else is a platform of their own definition with huge limitations. Because of that be careful, when you say platform. “&lt;em&gt;One can be a boss in his village, but just some little peace in the global world”&lt;/em&gt;. The part of Microsoft which build such platforms is called Business Platform Division.     &lt;br /&gt;    &lt;br /&gt;So, let’s get now some data out of SharePoint in context of&amp;#160; distributed application scenario. First of all in the world of distributed thinking, you should never allow external parties get in touch with your platform directly. To illustrate this constraint, think on giving the public access to your database. You will probably never allow somebody to send you DB-commands which will be executed against your DB (SQL Injections etc..). If you do it it is wrong and please think change it.. By following the same rule you shouldn’t let anybody to dig in your SharePoint platform for the same reason. You even should not share the secret, that you platform is SPS.     &lt;br /&gt;    &lt;br /&gt;The easiest way is to provide some kind of intermediary component which will abstract the business scenario over secret platform which is running in the background. The technology which does exactly this job is WCF. We will put WCF service between SPS and external party. At some point of time when you have lot of such services, you can start to talk about Middle-Ware. This is a fine solution, but there is a still one practical problem.     &lt;br /&gt;    &lt;br /&gt;The service contract could look in our case as shown below:     &lt;br /&gt;    &lt;br /&gt;    &lt;table cellspacing="0" cellpadding="2"&gt;       &lt;tr&gt;         &lt;td&gt;           &lt;p&gt;[ServiceContract(Name = &amp;quot;EchoContract&amp;quot;, Namespace = &amp;quot;&lt;a href="http://samples.microsoft.com/ServiceModel/Relay/&amp;quot;)]"&gt;http://samples.microsoft.com/ServiceModel/Relay/&amp;quot;)]&lt;/a&gt;               &lt;br /&gt;&amp;#160; public interface ISpsRelayService               &lt;br /&gt;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [OperationContract]               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; List&amp;lt;MyEntity&amp;gt; Query(QueryEntity query);               &lt;br /&gt;&amp;#160; } &lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/table&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;You should define the QueryEntity which somehow describes what you want. SPS developer would like to to see here probably SPS- “ClientObjects”. Unfortinatelly they have never been designed for such scenarios. They can only be used by explicit helper libraries. Such libraries do not work out of SharePoint and their dependent entities are not serializable.     &lt;br /&gt;But never mind, define your entities like your business needs them (see service contract above).     &lt;br /&gt;    &lt;br /&gt;The service implementation (see code below) will read the QueryEntity instance and build appropriate SPS-query (not shown in the demo below).     &lt;br /&gt;After all we will call SPS WebService hosted internally in our enterprise at &lt;a title="http://yourhost:44445" href="http://yourhost:44445"&gt;http://yourhost:44445&lt;/a&gt; and finally build response as collection of &lt;em&gt;MyEntity&lt;/em&gt; instances.     &lt;br /&gt;This service decouples the SPS from external parties and provides very simple and business related contract as usual in the SOA world.     &lt;br /&gt;Following code snippet shows how to implement the service which gets documents from some SharePOint library and returns them as collection to the external party. In fact this is nothing very complicated (not yet)..&lt;/p&gt;  &lt;p&gt;   &lt;table cellspacing="0" cellpadding="2"&gt;       &lt;tr&gt;         &lt;td&gt;           &lt;br /&gt;            &lt;p&gt;public List&amp;lt;MyEntitity&amp;gt; Query(QueryEntity query)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ClientContext clientContext = new ClientContext(&amp;quot;&lt;a href="http://yourhost:44445&amp;quot;);"&gt;http://yourhost:44445&amp;quot;);&lt;/a&gt;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Web oWebsite = clientContext.Web;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var files = oWebsite.GetFolderByServerRelativeUrl(&amp;quot;/Shared%20Documents&amp;quot;).Files;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; clientContext.Load(files);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; clientContext.ExecuteQuery();&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; List&amp;lt;MyEntitity&amp;gt; items = new List&amp;lt;MyEntitity&amp;gt;();&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach (var doc in files)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; dynamic o = new MyEntitity();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; o.Name = doc.Name;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; o.Something = DateTime.Now.Ticks;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; o.Version = doc.UIVersionLabel;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; items.Add(o);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return items;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/table&gt; &lt;/p&gt;  &lt;p&gt;To make it available in the internet this service needs to have a public endpoint accessible by the external party. And exactly this is the change demand in infrastructure which is very, very often an organizational issue or even “No go”. First somebody hast to give you an public IP address, then you need to configure NAT and DNS&amp;#160; for it, then Security, port mapping from probably 80 to 4445 etc., etc..    &lt;br /&gt;I want to build some kind of VPN between my WCF (talking to SPS) and external caller, but without changing any piece of infrastructure. The next picture shows this scenario. Windows Azure provides a platform service called “&lt;a href="http://www.windowsazure.com/en-us/home/features/service-bus/"&gt;Service Bus&lt;/a&gt;”. This one provides a feature called relying. Relaying can connect two participants directly thorough firewall. Two participants are connected through Service Bus intermediary by using bidirectional TCP connection, which remains open after once is established.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_52E91BC8.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_37DC5E88.png" width="856" height="561" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Following code shows how to start-up the service which will listen on Service-Bus packets and relay SharePoint to external caller.&lt;/p&gt;  &lt;p&gt;   &lt;table cellspacing="0" cellpadding="2"&gt;       &lt;tr&gt;         &lt;td&gt;           &lt;p&gt;static void Main(string[] args)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ServicePointManager.ServerCertificateValidationCallback = validateServerCert;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // create the service URI based on the service namespace which you will obtain when creating the              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // service bus namespace.               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Uri address = ServiceBusEnvironment.CreateServiceUri(&amp;quot;https&amp;quot;, serviceNamespaceDomain, &amp;quot;SpsRelayService/DocumentLibrary&amp;quot;);&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // create the credential object for the endpoint              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TransportClientEndpointBehavior sharedSecretServiceBusCredential = new TransportClientEndpointBehavior();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sharedSecretServiceBusCredential.TokenProvider = TokenProvider.CreateSharedSecretTokenProvider(issuerName, issuerSecret);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // create the service host reading the configuration              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ServiceHost host = new ServiceHost(typeof(SpsRelayService), address);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // create the ServiceRegistrySettings behavior for the endpoint              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; IEndpointBehavior serviceRegistrySettings = new ServiceRegistrySettings()               &lt;br /&gt;{ DisplayName = &amp;quot;Sharepoint Relay Document Library Service&amp;quot;, DiscoveryMode = DiscoveryType.Public };               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach (ServiceEndpoint endpoint in host.Description.Endpoints)               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // add the Service Bus credentials to all endpoints specified in configuration               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; endpoint.Behaviors.Add(sharedSecretServiceBusCredential);               &lt;br /&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // Optionally you can add the URI in the registry.               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; endpoint.Behaviors.Add(serviceRegistrySettings);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // Open the service              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; host.Open();&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Console.ForegroundColor = ConsoleColor.Cyan;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&amp;quot;Service address: &amp;quot; + address);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&amp;quot;Press [Enter] to exit&amp;quot;);               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Console.ReadLine();&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // close the service              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; host.Close();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Similarly, external party will also establish the connection as shown in the next snippet:    &lt;br /&gt;    &lt;br /&gt;    &lt;table cellspacing="0" cellpadding="2"&gt;       &lt;tr&gt;         &lt;td&gt;           &lt;p&gt;static void Main(string[] args)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ServicePointManager.ServerCertificateValidationCallback = validateServerCert;&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // create the service URI based on the service namespace              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Uri address = ServiceBusEnvironment.CreateServiceUri(&amp;quot;https&amp;quot;, serviceNamespaceDomain, &amp;quot;SpsRelayService/DocumentLibrary&amp;quot;);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // create the credential object for the endpoint              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; TransportClientEndpointBehavior sharedSecretServiceBusCredential = new TransportClientEndpointBehavior();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sharedSecretServiceBusCredential.TokenProvider = TokenProvider.CreateSharedSecretTokenProvider(issuerName, issuerSecret);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // create the channel factory loading the configuration              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ChannelFactory&amp;lt;ISpsRelayService&amp;gt; channelFactory = new ChannelFactory&amp;lt;ISpsRelayService&amp;gt;(&amp;quot;RelayEndpoint&amp;quot;, new EndpointAddress(address));&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // apply the Service Bus credentials              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; channelFactory.Endpoint.Behaviors.Add(/*swtBehavior*/sharedSecretServiceBusCredential);&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // create and open the client channel              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ISpsRelayService channel = channelFactory.CreateChannel();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ((ICommunicationObject)channel).Open();&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&amp;quot;Enter text to echo (or [Enter] to exit):&amp;quot;);              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string input = Console.ReadLine();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; List&amp;lt;MyEntity&amp;gt; res = channel.Query(new QueryEntity(){…});               &lt;br /&gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ((ICommunicationObject)channel).Close();               &lt;br /&gt;              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; channelFactory.Close();               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/table&gt; &lt;/p&gt;  &lt;p&gt;If you ever worked with WCF there is not much more to say. The code shown above contains a bit sugar around standard WCF.Everything else is a matter of channel which is hidden behind RelayBinding. For more information about ports in use take a look &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee732535.aspx"&gt;here&lt;/a&gt;.     &lt;br /&gt;Following binding must be configured in both service and client.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&amp;lt;bindings&amp;gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;basicHttpRelayBinding&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;binding name=&amp;quot;myBinding&amp;quot;&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;security mode=&amp;quot;Transport&amp;quot;/&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/binding&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/basicHttpRelayBinding&amp;gt;             &lt;br /&gt;&amp;#160; &amp;lt;/bindings&amp;gt;             &lt;br /&gt;&amp;#160;&amp;#160; &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;After you start service and then client,the client will send the request to service through firewall. The service will get data out of SPS and relay it back to the client.&lt;/p&gt;  &lt;h4&gt;2. How to build dynamic WCF contract? &lt;/h4&gt;  &lt;p&gt;In the world of SOA you always should build a clear contract between two boundaries. That means contracts like following one are not well designed:    &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;em&gt;Message Operation(Message msg);        &lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;    &lt;br /&gt;I have also seen in some projects following variant of the similar contract, which is semantically the same one as previous one:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;string Operation(string msg);&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;By using such contract the client has no way to know how to serialize the message. Even after the service version is changed, there is no way to communicate this to anybody instead of verbal human communication which is time intensive and error prone. Compare it with “add service reference” to create the proxy. The client and service must in such cases implement code which serializes/deserializes respectively the message (string).    &lt;br /&gt;In other words, using service contracted this way is called “&lt;strong&gt;&lt;em&gt;Anti-Pattern&lt;/em&gt;&lt;/strong&gt;”, which should not be used in the SOA world.     &lt;br /&gt;    &lt;br /&gt;Many developers think they can build SOA solution if they are just able to build WCF based service. This is a mistake. When you use WCF it doesn’t mean at all that you are by default SOAP capable.&amp;#160; In our scenario I will use out this fact as my advantage. Connecting external party to our relay service is not SOA focused scenario. It is more about classical EAI and not SOA. Such kind of connecting system is known as interface with point-to-point connection. This is also not the best pattern in the world of SOA (I mean point2point interface).&amp;#160; and it should b e avoided when building middle-wares. But this is another story.     &lt;br /&gt;&amp;#160; &lt;br /&gt;In other words, If you are connecting two systems as point2poin it might be valid to apply SOA anti-pattern.This is in context of SOA an anti-pattern, but not an anti-pattern in universe of possible solutions. If you have two parties talking to each other then you can often change the contract between them without of too much organizational difficulties.If you are changing often the contract (in our case &lt;em&gt;MyEntity&lt;/em&gt; and &lt;em&gt;MyQuery&lt;/em&gt;) it is easier to make it dynamic. In this case you can build it once without need to change it in the future, because it is dynamic one. Following example shows how to use &lt;strong&gt;&lt;em&gt;ExpandoObject&lt;/em&gt;&lt;/strong&gt; to build dynamic WCF contract. If you don’t know what this is take a look on &lt;a href="http://blogs.msdn.com/b/csharpfaq/archive/2009/10/01/dynamic-in-c-4-0-introducing-the-expandoobject.aspx"&gt;Alexandra’s&lt;/a&gt;&amp;#160; and &lt;a href="http://www.west-wind.com/weblog/posts/2012/Feb/08/Creating-a-dynamic-extensible-C-Expando-Object"&gt;Rick’&lt;/a&gt;s posts.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;ServiceContract(Name = &amp;quot;SpsRelayContract&amp;quot;, Namespace = &amp;quot;&lt;a href="http://daenet.deServiceModel/Relay/&amp;quot;)]"&gt;http://daenet.deServiceModel/Relay/&amp;quot;)]&lt;/a&gt;             &lt;br /&gt;&amp;#160; public interface ISpsRelayService             &lt;br /&gt;&amp;#160; {             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [OperationContract]             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; List&amp;lt;&lt;font color="#0000ff"&gt;ExpandoObject&lt;/font&gt;&amp;gt; Query(&lt;font color="#0000ff"&gt;ExpandoObject&lt;/font&gt; expression);             &lt;br /&gt;&amp;#160; } &lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;The good thing on Expando-contract is that you can do something like this:    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;dynamic&lt;/font&gt; o = new &lt;font color="#0000ff"&gt;ExpandoObject&lt;/font&gt;();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; o.Name = “bla bla”;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; o.Something = DateTime.Now.Ticks;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; o.Method= new SomeDelegate(someMethod);     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;You can set on this object whatever property you want (more or less). But&amp;#160; note in a case of WCF the method instance as property wouldn’t make a sense, because that instance will not exist on some other process and some other machine. However all other properties can be set as you like. And WCF will serialize them automatically for you. In other words, if you have a new property you don’t have to change contract. You just set it like:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;o.NewPropery = 17;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The consumer of this value just hast to know that is there (because,. remember, there is not clear contract, Add-Reference or SVCUTIL). &lt;/p&gt;  &lt;p&gt;As a recap, note that ExpandoObject provides a dynamic contract. Build your Service on top of this entity and you will not have to change the contract when new properties are added in the business scenario, which service implements. Remember that this is not a SOA capable solution, but it is valid to build Point-To-Point scenarios when one party is connecting to another one.&lt;/p&gt;  &lt;h3&gt;3. How to build Failover cluster in 48 Seconds?&lt;/h3&gt;  &lt;p&gt;Last but not least I there is an issue which has been mostly forgotten in almost all our discussion when building relaying scenarios. I every project you will reach a point when the solution has to be deployed in the production. Then you will ask yourself how to build redundancy based on relying? This means, you want to provide a fail-over instance of you WCF relaying service which will be used when the first one is not reachable. The picture shown bellow illustrates this requirement.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_2B661361.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;padding-top:0px;" title="image" border="0" alt="image" src="http://developers.de/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/damir_5F00_dobric/image_5F00_thumb_5F00_2B161807.png" width="540" height="441" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To make this working you really do not have to change any peace of infrastructure. Just start the another instance of the service on another machine. That’s all. This will work by using both protocols TCP and HTTP. There are currently few undocumented differences in routing when using different protocols, nut in general both will provide you the stable and reliable fail-over mechanism.&lt;/p&gt;  &lt;p&gt;Remark: If you are demoing this scenario with both WCF-instances on one machine, the basicHttpRelayBinding will not work with out-of-the-box configuration, because both instances will try to start listening for contract sharing at the same address. In a case of netTcpRelayBindig this will not happen. So, the latter one can be started multiple timas at one box.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks to &lt;strong&gt;Tomislav Tipuric&lt;/strong&gt; director of WinDays technical track who has visionary recognized the industry need for this scenario.&lt;/p&gt;</description></item><item><title>TechEd 2011 Presentations</title><link>http://developers.de/blogs/damir_dobric/archive/2012/05/02/teched-2011-presentations.aspx</link><pubDate>Wed, 02 May 2012 15:51:44 GMT</pubDate><guid isPermaLink="false">7e491611-45ad-4dae-a68f-c4cb64439510:300526</guid><dc:creator>ddobric</dc:creator><description>&lt;p&gt;   &lt;br /&gt;Just giving URL summary of all TechEd 2011 presentations related to sessions given by my Business Platform Division colleagues. It will be be interesting to compare them with session which will be presented in few weeks at TechEd 2012.&lt;/p&gt;  &lt;p&gt;· &lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/COS318"&gt;A Lap around Windows Azure AppFabric&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;· &lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/COS311"&gt;Introduction to Windows Azure AppFabric Composite Applications&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;· &lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/MID312"&gt;Windows Azure AppFabric Service Bus: New Capabilities&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;· &lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/MID313"&gt;Workflow in Windows Azure AppFabric&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;· &lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/MID315"&gt;Building Highly Scalable and Available WCF Services with Windows Azure AppFabric&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;· &lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/MID310"&gt;Windows Communication Foundation Futures&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>