<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3805743522888899142</id><updated>2011-12-30T14:48:37.143+11:00</updated><category term='Fluent'/><category term='Unit testing'/><category term='Team Foundation Server'/><category term='Microsoft'/><category term='proxy'/><category term='MVC'/><category term='SendActivity'/><category term='AppFabric'/><category term='Moq'/><category term='query'/><category term='help'/><category term='Infopath 2007'/><category term='stsadm'/><category term='duplicates'/><category term='t-sql'/><category term='c#'/><category term='3.5'/><category term='JQuery'/><category term='RSS'/><category term='TDD'/><category term='delete'/><category term='cursor'/><category term='GAC'/><category term='comments'/><category term='xml'/><category term='linq'/><category term='TFS'/><category term='convert'/><category term='sql2008'/><category term='Entity Framework 4.0'/><category term='Workflow'/><category term='bdc'/><category term='service pack'/><category term='sql2005'/><category term='w3wp'/><category term='Niject'/><category term='Attributes'/><category term='NuGet'/><category term='ContentType'/><category term='sql'/><category term='WCF'/><category term='Workflow 4.0'/><category term='DLLS'/><category term='Sharepoint'/><category term='Entity Framework 4.1'/><category term='Visual studio 2008'/><category term='command line'/><category term='datetime'/><category term='Tracking Profile'/><category term='Entity Framework'/><category term='quiesce'/><title type='text'>RUSSELL MCCLOY</title><subtitle type='html'>Senior Software Developer - c#, .NET 3.5/4.0, Entity Framework 3.5/4.0, Windows Workflow 3.5/4.0, AppFabric, WCF
&lt;br&gt;&lt;br&gt;
Windows Development, Sharepoint 2007, XML, SSIS, Oracle, SQL2000/2005/2008, Visual Studio 2008/2010, MVC, Fluent Validation, CRM 2011
&lt;br&gt;&lt;br&gt;
Latest Industries: MEMBER SERVICES, MEDIA, PROPERTY
&lt;br&gt;&lt;br&gt;
Background photo taken by my mum!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>68</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-707350952488262454</id><published>2011-12-06T08:11:00.001+11:00</published><updated>2011-12-06T08:13:25.037+11:00</updated><title type='text'>Saving the internet</title><content type='html'>All,&lt;br /&gt;&lt;br /&gt;Quote from: &lt;a href="http://www.avaaz.org/en/save_the_internet/?mzla" target="_blank"&gt;http://www.avaaz.org/en/save_the_internet/?mzla &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"As concerned global citizens, we call on you to stand for a free and open Internet and vote against both the Protect IP Act and the Stop Online Piracy Act. The Internet is a crucial tool for people around the world to exchange ideas and work collectively to build the world we all want. We urge you to show true global leadership and do all you can to protect this basic pillar of our democracies worldwide."&lt;/i&gt;&lt;br /&gt; &lt;br /&gt;Please sign up to save the internet. This is important for all of us to continue to have an open and uncensored internet. Imagine if the police monitored all your phone calls, you wouldn't like that would you?&lt;br /&gt;&lt;br /&gt;&lt;a class="ot-anchor" href="http://www.avaaz.org/en/save_the_internet/?mzla"&gt;http://www.avaaz.org/en/save_the_internet/?mzl&lt;wbr&gt;&lt;/wbr&gt;a&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;thanks&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-707350952488262454?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/707350952488262454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2011/12/saving-internet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/707350952488262454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/707350952488262454'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2011/12/saving-internet.html' title='Saving the internet'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-8995126888152952173</id><published>2011-11-07T17:05:00.003+11:00</published><updated>2011-11-07T17:05:59.672+11:00</updated><title type='text'>Explanation of Ninject Bindings and where we used them in our MVC Website (Part 1 - MVC Website)</title><content type='html'>&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Afternoon,&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Im going to summarize what we have done with our Ninject bindings and injection which allows us to follow the "&lt;b&gt;Inversion of Control (IOC Container)&lt;/b&gt;" principle in a project we are working on.&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;As mentioned we are using Ninject as our IOC container: &lt;a href="http://ninject.org/"&gt;http://ninject.org/&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;The project architecture looks much like the following diagram:&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-vI0-cawBG2Q/TrNiLIMRw0I/AAAAAAAAG-8/RpJ5gYptu1E/s1600/Architecture.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="329" src="http://2.bp.blogspot.com/-vI0-cawBG2Q/TrNiLIMRw0I/AAAAAAAAG-8/RpJ5gYptu1E/s640/Architecture.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Architecture Diagram&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;I will work my way from the top to the bottom of the architecture. Starting with the MVC web site all the way through to the Microsoft Crm layer.(This post&amp;nbsp; (Part 1 - MVC Website) just refers to the web site.)&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;One of the 2 &lt;b&gt;BIG &lt;/b&gt;reasons we are using an IOC container (Ninject) is to allow us to separate all our layers (separation of concerns) so that they are Unit testable and also so that we can swap components out at a later date. We may want to replace our Crm later with a Sql server layer, doubtful but we are catering for this anyway as you never know what will be a requirement in the future. As long as our Sql server repository layer implements the same interface as our existing Crm repository layer, we can more or less swap out the Crm Repository with a new Sql Repository. &lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;u&gt;&lt;b&gt;Mvc Website:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;On the website layer we will be using Ninject to inject the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A GatewayAgent layer into our controller - the GatewayAgent layer separates the concerns of the controller from the concerns of our WCF SOA layer.&amp;nbsp;&lt;/li&gt;&lt;li&gt;An AutoMapper implimentation into our GatewayAgent - the mapper will map our presentation entities to our Domain entities.&lt;/li&gt;&lt;li&gt;Our presentation entity validation classes into our presentation entities - as we are using Fluent validation, we may want to ditch this later and inject a different type of validation.&lt;/li&gt;&lt;/ul&gt;The following diagram show part of the web site's global.asax file. This code uses Ninject to inject the above 3 items.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-6jW8vz71CRI/TrdyvIiMqdI/AAAAAAAAHBI/2hf3RSP8BQ4/s1600/GlobalAsaxInjection.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="258" src="http://2.bp.blogspot.com/-6jW8vz71CRI/TrdyvIiMqdI/AAAAAAAAHBI/2hf3RSP8BQ4/s640/GlobalAsaxInjection.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;i style="color: #073763;"&gt;&lt;b&gt;The Ninject Binding in the Global.asax class&lt;/b&gt;&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;Obviously, the web site has a reference to the Ninject.dll.&lt;br /&gt;&lt;br /&gt;Most of this is set in stone for our site but one thing to note. As more development is done we will need to add more validators as we add more presentation entities to our site. So when we add an Invoice presentation entity to the site a related Invoice Validator class will need to be added to the ConfigureKernel method, shown above, in our global.asax file.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Note&lt;/u&gt;: the line:&lt;br /&gt;&lt;pre style="background: white; color: black; font-family: Consolas; font-size: 13;"&gt;&lt;span style="font-size: small;"&gt;- kernel.Bind&amp;lt;&lt;span style="color: #2b91af;"&gt;IValidator&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;Contact&lt;/span&gt;&amp;gt;&amp;gt;().To&amp;lt;&lt;span style="color: #2b91af;"&gt;ContactValidator&lt;/span&gt;&amp;gt;();&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;means, when we call validate on a Contact presentation entity,&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: Consolas; font-size: 13px;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;we would like to use the ContactValidator class to carry out the validation&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-73IBQ5grAoY/TrdyPIB8ZTI/AAAAAAAAHA4/Wsa3je14PdY/s1600/SampleContactValidator.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="278" src="http://4.bp.blogspot.com/-73IBQ5grAoY/TrdyPIB8ZTI/AAAAAAAAHA4/Wsa3je14PdY/s640/SampleContactValidator.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;i style="color: #073763;"&gt;&lt;b&gt;Sample Contact Validator&lt;/b&gt;&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;You can see in the ConfigureKernel method above that we also inject a ContactGateway.&lt;br /&gt;The following line shows this:&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: Consolas;"&gt;&lt;span style="font-size: small;"&gt;kernel.Bind&amp;lt;&lt;span style="color: #2b91af;"&gt;IContactGateway&lt;/span&gt;&amp;gt;().To&amp;lt;&lt;span style="color: #2b91af;"&gt;ContactGateway&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;This means that when we refer to &lt;span style="font-size: small;"&gt;&lt;span style="color: #2b91af;"&gt;IContactGateway &lt;/span&gt;&lt;/span&gt;we would like to use the concrete class&lt;span style="font-size: small;"&gt;&lt;span style="color: #2b91af;"&gt; ContactGateway.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;So in our controller we see the following code:&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-kFvPYUcN4Yo/TrdycMYJyUI/AAAAAAAAHBA/YqzkL0Hoa7M/s1600/ContactController.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="300" src="http://2.bp.blogspot.com/-kFvPYUcN4Yo/TrdycMYJyUI/AAAAAAAAHBA/YqzkL0Hoa7M/s640/ContactController.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;i style="color: #073763;"&gt;&lt;b&gt;Sample controller&lt;/b&gt;&lt;/i&gt;&lt;/td&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;Why is this good? Because you can then mock up a ContactGateway in a unit test to test your controller.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-4XwKOhSx8e4/TrdzJAgTnAI/AAAAAAAAHBQ/CG1Zp1wKtAo/s1600/ControllerTest.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="346" src="http://3.bp.blogspot.com/-4XwKOhSx8e4/TrdzJAgTnAI/AAAAAAAAHBQ/CG1Zp1wKtAo/s640/ControllerTest.JPG" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;i style="color: #073763;"&gt;&lt;b&gt;A unit test for the controller&lt;/b&gt;&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;As mentioned above, we also inject a mapper implementation into our web site:&lt;/div&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: Consolas;"&gt;&lt;span style="font-size: small;"&gt;kernel.Bind&amp;lt;&lt;span style="color: #2b91af;"&gt;IMapper&lt;/span&gt;&amp;gt;().To&amp;lt;&lt;span style="color: #2b91af;"&gt;AutoMapperMapper&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;This is used to map our domain entities to our presentation entities on the way up and our&amp;nbsp; presentation entities to our domain entities on the way down.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Why is this good? We may way to use a different mapping tool other than AutoMapper in the future. Injection will enable us to swap AutoMapper out for a different mapper tool.&lt;/div&gt;&lt;br /&gt;This is the end of Part 1 - Explanation of Ninject Bindings and where we used them in our MVC Website&lt;br /&gt;&lt;br /&gt;I will do another couple of posts on the other layers mentioned in the architecture diagram at the start of this post.&lt;br /&gt;&lt;br /&gt;RuSs&lt;br /&gt; &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: Consolas;"&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-8995126888152952173?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/8995126888152952173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2011/11/explanation-of-ninject-bindings-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/8995126888152952173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/8995126888152952173'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2011/11/explanation-of-ninject-bindings-and.html' title='Explanation of Ninject Bindings and where we used them in our MVC Website (Part 1 - MVC Website)'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-vI0-cawBG2Q/TrNiLIMRw0I/AAAAAAAAG-8/RpJ5gYptu1E/s72-c/Architecture.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Melbourne VIC, Australia</georss:featurename><georss:point>-37.8131869 144.9629796</georss:point><georss:box>-37.8382759 144.92349760000002 -37.7880979 145.0024616</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-1370572017228991140</id><published>2011-10-03T16:26:00.002+11:00</published><updated>2011-10-03T16:26:42.561+11:00</updated><title type='text'>How Jimmy Bogard does MVC</title><content type='html'>&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Bonjour,&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;Following is a link to a very good post called &lt;b&gt;"How we do MVC"&lt;/b&gt; on some DOs and DON'Ts of MVC. We are about to start a fresh enterprise level project and this article is great for getting a few things done correctly from the start.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;a href="http://lostechies.com/jimmybogard/2009/04/24/how-we-do-mvc/"&gt;http://lostechies.com/jimmybogard/2009/04/24/how-we-do-mvc/&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;There is also another article he has written on &lt;b&gt;"How we do view models"&lt;/b&gt;:&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;a href="http://lostechies.com/jimmybogard/2009/06/30/how-we-do-mvc-view-models/"&gt;http://lostechies.com/jimmybogard/2009/06/30/how-we-do-mvc-view-models/&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Hope you find this useful.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;RuSs&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-1370572017228991140?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/1370572017228991140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2011/10/how-jimmy-bogard-does-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1370572017228991140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1370572017228991140'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2011/10/how-jimmy-bogard-does-mvc.html' title='How Jimmy Bogard does MVC'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-2609319558149030855</id><published>2011-09-26T10:56:00.000+10:00</published><updated>2011-09-26T10:57:12.220+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Fluent'/><category scheme='http://www.blogger.com/atom/ns#' term='TDD'/><title type='text'>Entity validation, unit testing and MVC 3 with Fluent - RuleSets and Predicates</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-qwC0of0jZIE/Tn_MeRNoLXI/AAAAAAAAG9M/bQTH9YhVJuw/s1600/fv.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-qwC0of0jZIE/Tn_MeRNoLXI/AAAAAAAAG9M/bQTH9YhVJuw/s1600/fv.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Morning all,&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;I have been looking at validation for my current project. We are building an MVC 3 site that calls a wcf service later that is wrapped around Crm 2011.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Initially I was looking at data annotations out of the box. These work really well and MVC 3 works seamlessly with these with client validation and unobtrusive JQuery.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;When&amp;nbsp; I came to look at rulesets however it seems a lot more complicated. I them stumbled upon Fluent validation:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://fluentvalidation.codeplex.com/"&gt;http://fluentvalidation.codeplex.com/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;This is a very user friendly clean way of writing validation on your entities in the same way that data annotations are written. The difference came when I started to look at rule sets which you will see in my attached screen shots.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Firstly I defined 2 classes in my domain model. Thsese are called &lt;b&gt;ContactForValidationPOC&lt;/b&gt; and &lt;b&gt;AddressForValidationPOC &lt;/b&gt;as shown below:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-tY07i3z5N88/Tn-woptxAmI/AAAAAAAAG7U/LzK_0qIxrBw/s1600/contact.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-tY07i3z5N88/Tn-woptxAmI/AAAAAAAAG7U/LzK_0qIxrBw/s1600/contact.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;----------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://2.bp.blogspot.com/-KdbqzYvNRl0/Tn-wn7l6ECI/AAAAAAAAG7Q/h28G2QDUs0M/s1600/Address.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" id=":current_picnik_image" src="http://2.bp.blogspot.com/-KdbqzYvNRl0/Tn-wn7l6ECI/AAAAAAAAG7Q/h28G2QDUs0M/s1600/Address.jpg" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;As you can see there are no data annotations and ContactForValidationPOC has a complex property of Addresses.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;We are going to write some rulesets that will validate the contact for a STAFF ruleset and a public ruleset. (Note that there are not real world validation needs as of yet,it's just proof of concept code.)&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;You will notice that at the top of the &lt;b&gt;ContactForValidationPOC &lt;/b&gt;class we have an attribute shown as follows:&lt;/span&gt;&lt;/div&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;[&lt;span style="color: #2b91af;"&gt;Validator&lt;/span&gt;(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;ContactValidator&lt;/span&gt;))]&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;This tells the class that there is a validator class call ContactValidator somewhere.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Also please note that I have referenced the correct Fluent  validation dlls in my project.&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;You can find the details of this here:&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://fluentvalidation.codeplex.com/"&gt;http://fluentvalidation.codeplex.com/&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;So back to the &lt;b&gt;ContactValidator&lt;/b&gt;. Here it is:&lt;/span&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://1.bp.blogspot.com/-lZCR-vPfyhQ/Tn-wpYZ76RI/AAAAAAAAG7Y/XpAeiJ9r2j4/s1600/RuleSets.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" id=":current_picnik_image" src="http://1.bp.blogspot.com/-lZCR-vPfyhQ/Tn-wpYZ76RI/AAAAAAAAG7Y/XpAeiJ9r2j4/s1600/RuleSets.jpg" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;You can see that we have 2 rule sets. The first is a staff rule set and the second is a public rule set.&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;They are quite similar and the only difference really is that the Age must be over 18 for a staff member. &lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Both rule sets also use a &lt;b&gt;.Must&lt;/b&gt; predicate validator.&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;This is a great place to put more complex logic.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;Here we need to ensure that there is at least 1 address in the Addresses collection that is marked as IsPrefferedAddress.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Ok, so that is all done, now we need to unit test or validation rules.&amp;nbsp; &lt;/span&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://2.bp.blogspot.com/-Z3qbxtj8Muo/Tn-26aKyZKI/AAAAAAAAG8c/aDp0HJwLhaM/s1600/UnitTest.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-Z3qbxtj8Muo/Tn-26aKyZKI/AAAAAAAAG8c/aDp0HJwLhaM/s1600/UnitTest.JPG" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;br /&gt;So I have a unit test written here. Firstly I set up a new &lt;b&gt;ContactForValidationPOC &lt;/b&gt;entity and add a couple of addresses to it.&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;I then call Validate on it and ask it to validate using the Staff rule set. After validation we check that the ValidationResult (result) is valid&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;and then do a simple check for the number of validation errors. Obviously my test could be more detailed in a real world example.&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;As I debug through my test I can see that my entity is not valid (&lt;b style="color: red;"&gt;IsValid = false&lt;/b&gt;)&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;and it has a collection of validation errors on it.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://4.bp.blogspot.com/-pY2QAZigEBE/Tn-36uf3PxI/AAAAAAAAG8g/wFn7G1Fzj0k/s1600/IsValid.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-pY2QAZigEBE/Tn-36uf3PxI/AAAAAAAAG8g/wFn7G1Fzj0k/s1600/IsValid.jpg" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://1.bp.blogspot.com/-hKVD1vLRHgc/Tn-4A3UNFNI/AAAAAAAAG8k/cQdVPQf2LGs/s1600/Errors.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-hKVD1vLRHgc/Tn-4A3UNFNI/AAAAAAAAG8k/cQdVPQf2LGs/s1600/Errors.jpg" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre style="background: none repeat scroll 0% 0% white; color: black; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;This is good as we didn't enter a first name, our Age is under 18 and we set all AddressForValidationPOC's in the Addresses collection to IsPrefferedAddress = false. &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Ok so we now know that our validation is working correctly on the server side. &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;We haven't even touched the MVC code yet.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;I have whipped up a quick MVC controller with a view and have disabled the settings&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;in the web.config that make client side validation work as shown in the following picture:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://4.bp.blogspot.com/-64_cQL_eQls/Tn_C5LaD5PI/AAAAAAAAG84/NWVBVvL8Abg/s1600/AppConfigFalse.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-64_cQL_eQls/Tn_C5LaD5PI/AAAAAAAAG84/NWVBVvL8Abg/s1600/AppConfigFalse.JPG" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Note&lt;/b&gt;: they should be set to false to prove that server side validation is still working correctly now that we are validating through MVC.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Here are my controller and view:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Note: I have just &lt;b&gt;forced &lt;/b&gt;2 addresses into the &lt;/span&gt;&lt;span style="font-size: small;"&gt;ContactForValidationPOC entity to make things easier, these are both set to IsPrefferedAddress = false&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://3.bp.blogspot.com/-fgdrghMSEwo/Tn_BZWN9mdI/AAAAAAAAG8w/DE9aUmHWWMo/s1600/Controller.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-fgdrghMSEwo/Tn_BZWN9mdI/AAAAAAAAG8w/DE9aUmHWWMo/s1600/Controller.jpg" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Here is the view that kicked off the validation:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://2.bp.blogspot.com/-m6HzYGYthQo/Tn_Idw9xBRI/AAAAAAAAG9I/SE5nVoSdGaQ/s1600/ViewEmpty.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-m6HzYGYthQo/Tn_Idw9xBRI/AAAAAAAAG9I/SE5nVoSdGaQ/s1600/ViewEmpty.JPG" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;You can see that, when debugging the controller we get the same validation results.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;IsValid = false and a number of errors relating to our Staff rule set.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Note that in our controller we could have control over what rule set is loaded if we so desired:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://3.bp.blogspot.com/-nViG-vY07Nc/Tn_Ch_LT9JI/AAAAAAAAG80/pIJF_ywq7kA/s1600/SewtingRuleSetinCode.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-nViG-vY07Nc/Tn_Ch_LT9JI/AAAAAAAAG80/pIJF_ywq7kA/s1600/SewtingRuleSetinCode.JPG" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;We could use some logic to check what type of rule set to load, staff or public.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Now I will change the web.config setting to ensure that client side validation gets included:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://3.bp.blogspot.com/-ZpDL7kTMwtM/Tn_DIO4hq-I/AAAAAAAAG88/amHYyq1M5Fg/s1600/AppConfig.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-ZpDL7kTMwtM/Tn_DIO4hq-I/AAAAAAAAG88/amHYyq1M5Fg/s1600/AppConfig.JPG" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;We now can fire up the view in a web browser and see client side validation in action:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://3.bp.blogspot.com/-H_eXuBDmfGI/Tn_IPAf2GuI/AAAAAAAAG9E/D2bIMB89B84/s1600/View.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-H_eXuBDmfGI/Tn_IPAf2GuI/AAAAAAAAG9E/D2bIMB89B84/s1600/View.JPG" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Well that is it, a high level explanation of domain entity server and client validation using Fluent, unit tests and MVC.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Some positive points:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;ul style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;All the validation for an entity is contained wholly on the entity.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Fluent validation is very easy to write and read.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;More more complete business rules you can use a predicate delegate.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;You can unit test your entity validation results with ease.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;It works seamlessly with&lt;/span&gt;&lt;span style="color: #a31515;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;jquery.validate&lt;/span&gt;&lt;span style="font-size: small;"&gt; and&lt;/span&gt;&lt;span style="color: #a31515;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;jquery.validate.unobtrusive&lt;/span&gt;&lt;span style="font-size: small;"&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;With MVC you could also use IOC to instatiate your validators:&lt;br /&gt;&lt;a href="http://fluentvalidation.codeplex.com/wikipage?title=ValidatorFactory&amp;amp;referringTitle=Documentation"&gt;http://fluentvalidation.codeplex.com/wikipage?title=ValidatorFactory&amp;amp;referringTitle=Documentation&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size: small;"&gt;&lt;b&gt;Some possible negatives:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Only the following validators are supported on the client:&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;- NotNull/NotEmpty&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;- Matches (regex)&lt;br /&gt;- &lt;/span&gt;&lt;span style="font-size: small;"&gt;InclusiveBetween (range)&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;- CreditCard&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;- Email&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;- EqualTo (cross-property equality comparison)&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;- Length&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Cant think of any more at the moment.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size: small;"&gt;I hope this was helpful.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size: small;"&gt;RuSs&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://4.bp.blogspot.com/-qKr-f2EdfcE/Tn-wLuBgMKI/AAAAAAAAG7A/doo-vzsA0BY/s1600/ContactClass.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: #2b91af;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-2609319558149030855?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/2609319558149030855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2011/09/entity-validation-unit-testing-and-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2609319558149030855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2609319558149030855'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2011/09/entity-validation-unit-testing-and-mvc.html' title='Entity validation, unit testing and MVC 3 with Fluent - RuleSets and Predicates'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-qwC0of0jZIE/Tn_MeRNoLXI/AAAAAAAAG9M/bQTH9YhVJuw/s72-c/fv.png' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Melbourne VIC, Australia</georss:featurename><georss:point>-37.809575 144.965186</georss:point><georss:box>-38.211024 144.333472 -37.408126 145.59689999999998</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-7152685744807806319</id><published>2011-09-06T10:54:00.000+10:00</published><updated>2011-09-06T11:05:15.464+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.1'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.0'/><title type='text'>EDMX or DbContext API</title><content type='html'>&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Hi all,&lt;br /&gt;&lt;br /&gt;I have used EF for a while. I am used to using an EDMX file for my model. I have also recently used Code First and the DbContext API and I really like this.&lt;br /&gt;Last night I started building an app. and was thinking, am I starting on the right foot? Do I use EDMX or DbContext API? If the thing i'm building turns out to be big, will I have chosen the right technology. &lt;br /&gt;&lt;br /&gt;What if I use DbContext API and get it to generate my database. Obviously I don't want this to keep generating my database down the track when i'm at a stable point in development (or do I?). Then if I want to tweak my database or domain model will all the strings come un done?&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;The DbContext API is a simplified version. Will it do everything I need? I dont think ill need stored procedures as I can do everything with linq. &lt;br /&gt;&lt;br /&gt;So my real question is. If I am building something that is &lt;b&gt;serious &lt;/b&gt;and out there is the real world and it may turn out to require some complex coding, which way do I go? EDMX or DbContext API?&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Is EDMX now old school?&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;Comments / thoughts?&lt;br /&gt;&lt;br /&gt;RuSs&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-7152685744807806319?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/7152685744807806319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2011/09/hi-all-i-have-used-ef-for-while.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/7152685744807806319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/7152685744807806319'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2011/09/hi-all-i-have-used-ef-for-while.html' title='EDMX or DbContext API'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-9099276802804627268</id><published>2011-09-05T15:35:00.000+10:00</published><updated>2011-09-06T10:56:53.260+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Niject'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='NuGet'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Moq'/><title type='text'>A small update</title><content type='html'>&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Morning all,&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Well it's been a while since I posted in my blog that i'm sure no one reads! I have finally got used to living in Melbourne and have started enjoying it more now that the weather is getting better.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;I will hopefully be posting some interesting stuff on MVC up here is the next few weeks.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Here is a list of things I have looked at in the last few weeks.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;li&gt;&lt;b&gt;MVC(3) &lt;/b&gt;- I have been trying to get around to getting up to date on MVC for years. Ever since I tried and failed to read Martin fowler's book on design patterns (http://martinfowler.com/eaaDev/uiArchs.html). &lt;br /&gt;Well finally I have got around to it and I love it. Combined with the Entity Framework edmx or code first it is such a great way to work. This is the way, for most sites, the web should be built. No hidden viewstate, no nightmare page load order and code that you have total granular control over. Awesome!!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Razor view engine&lt;/b&gt; - initially it looks dodgy but after a little playing around it's cleaner and easier to read than traditional asp.net forms. One thing I have learned about Razor is, if it looks messy and hard to read, then you probably have started putting business logic where it should not go.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Unit testing and TDD with MVC&lt;/b&gt; - Combined with &lt;a href="http://ninject.org/"&gt;Ninject&lt;/a&gt; and &lt;a href="http://code.google.com/p/moq/"&gt;Moq&lt;/a&gt; this is easy. You can directly test your controllers. Compare this to ASP.NET web forms where your controller was, sort of, your code behind. You needed httpContext etc. Now you can test just your controller logic without other webby things clouding the test.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;JQuery &lt;/b&gt;- ok so this is not new but im loving it so far. &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;NuGet &lt;/b&gt;- the NuGet package manager is quite cool. NuGet is a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework. When you add a library or tool, NuGet copies files to your solution and automatically makes whatever changes are needed in your project, such as adding references and changing your &lt;i&gt;app.config&lt;/i&gt; or &lt;i&gt;web.config&lt;/i&gt; file. When you remove a library, NuGet removes files and reverses whatever changes it made in your project so that no clutter is left. &lt;br /&gt;For example if you need to get the latest JQuery libraries into you solution you open &lt;b&gt;Tools &lt;/b&gt;&amp;gt; &lt;b&gt;library package manager&lt;/b&gt; &amp;gt; &lt;b&gt;package manager console&lt;/b&gt; and type:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;PM&amp;gt; Update-Package jquery&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;PM with auto update your JQuery to the correct version. Note that your references inside Views &amp;gt; Shared &amp;gt; _Layout.cshtml (for example) will not be auto updated.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Well, I know this is a bit of a lame post but it was more to get me back into the habit of writing on my blog. I hope to come up with some more interesting stuff soon.&lt;br /&gt;&lt;br /&gt;RuSs&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-9099276802804627268?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/9099276802804627268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2011/09/morning-all-well-its-been-while-since-i.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/9099276802804627268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/9099276802804627268'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2011/09/morning-all-well-its-been-while-since-i.html' title='A small update'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-3168186003210337085</id><published>2011-06-08T09:34:00.010+10:00</published><updated>2011-06-08T09:37:39.855+10:00</updated><title type='text'>SQL Profiler - Being self-centered is a good thing (thanks Jeff Handley)</title><content type='html'>&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;When I'm faced with app. debugging, especially procedures that take awhile to run, or require a series of steps in the application to fire off, I often use SQL Profiler to capture the SQL call.&amp;nbsp; Then I'll re-run the call directly in SQL Management Studio.&amp;nbsp; But SQL Profiler can bring back a lot of noise, making it tough to grab only what I need.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;  &lt;/span&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;I finally created a custom trace template and set it to be my default.&amp;nbsp; It will only show me calls made from my local workstation to the development database. &lt;em&gt;(we have a shared development database*)&lt;/em&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;  &lt;/span&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;This article will help you set up a personalised trace. For expample you can filter by Application Name or Host Name to reduce the noise in your trace.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;a href="http://jeffhandley.com/archive/2008/02/07/sql-profiler---being-self-centered-is-a-good-thing.aspx"&gt;Link to the full article by Jeff Handley&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;Thanks&lt;/div&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;"&gt;RuSs&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-3168186003210337085?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/3168186003210337085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2011/06/sql-profiler-being-self-centered-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3168186003210337085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3168186003210337085'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2011/06/sql-profiler-being-self-centered-is.html' title='SQL Profiler - Being self-centered is a good thing (thanks Jeff Handley)'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-5927144056355375011</id><published>2011-03-23T12:23:00.004+11:00</published><updated>2011-03-23T12:23:36.832+11:00</updated><title type='text'>Finding all stored procedures updated in the last (n) days</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;This was quite helpful:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;SELECT name&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;FROM sys.objects&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;WHERE type = 'P'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;AND DATEDIFF(D,modify_date, GETDATE()) &amp;lt; 30&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-5927144056355375011?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/5927144056355375011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2011/03/finding-all-stored-procedures-updated_23.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5927144056355375011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5927144056355375011'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2011/03/finding-all-stored-procedures-updated_23.html' title='Finding all stored procedures updated in the last (n) days'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-8987240519213809765</id><published>2011-01-15T14:33:00.000+11:00</published><updated>2011-01-15T14:33:28.054+11:00</updated><title type='text'>My new life in Melbourne</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Morning,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;After 8 years in London I have decided enough is enough. I'm on the way to Melbourne to see what the future holds.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Im currently getting my CV ready and if anyone out there has any leads I can follow in Melbourne that would be great.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;I'm currently in Sydney with my family and will head south in the next couple of weeks.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;RuSs&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-8987240519213809765?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/8987240519213809765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2011/01/my-new-life-in-melbourne.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/8987240519213809765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/8987240519213809765'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2011/01/my-new-life-in-melbourne.html' title='My new life in Melbourne'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4292418980572256429</id><published>2010-11-11T03:41:00.000+11:00</published><updated>2010-11-11T03:41:58.105+11:00</updated><title type='text'>Re-map an SQL server login to a database login</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Hello,&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Sometimes users get un-mapped from the server to database login after a database restore.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Here is the command to fix it:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;EXEC&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #783f04;"&gt;sp_change_users_login&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt; 'Auto_Fix', 'SRSUser'&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RuSs&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4292418980572256429?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4292418980572256429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/11/re-map-sql-server-login-to-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4292418980572256429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4292418980572256429'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/11/re-map-sql-server-login-to-database.html' title='Re-map an SQL server login to a database login'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-6356731689989511498</id><published>2010-11-10T22:52:00.000+11:00</published><updated>2010-11-10T22:52:35.997+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Workflow'/><category scheme='http://www.blogger.com/atom/ns#' term='quiesce'/><title type='text'>Workflow 3.5 and MOSS 2007 - This task is currently locked by a running workflow and cannot be edited.</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Morning,&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Today I had an interesting issue with my WF3.5 SharePoint workflow.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;A user was attempting to action a SharePoint workflow task and was given the error:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span id="ctl00_PlaceHolderMain_LabelMessage"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;This task is currently locked by a  running workflow and cannot be edited.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span id="ctl00_PlaceHolderMain_LabelMessage"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TNqFsjiAt5I/AAAAAAAAGuA/lhEgT9W3JqI/s1600/TaskLocked.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="157" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TNqFsjiAt5I/AAAAAAAAGuA/lhEgT9W3JqI/s400/TaskLocked.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span id="ctl00_PlaceHolderMain_LabelMessage"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I have seen this error a small number of times (5-10) amongst the 1000's of workflow instances that have passed through my production system.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I am always very careful with quiescing and always release a new workflow version the correct was using workflow.xml, feature.xml and stsadm.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;There was a time a few weeks ago when we had to do an emergency bug fix as some of my business logic was not functioning as expected.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I know that I can never change an activity in my workflow without quiescing otherwise the serialization and deserialization (dyhydrate / re-hydrate) from the persistence store gets confused and hence an error like this occurs.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The funny thing is, I only changed code in a utility class and only the code inside an existing method (ie...method definition was not changed) so I thought that there was no need for quiescing. (no core workflow code was altered).&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Anyway,just writing here incase anyone has an opinion on this.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;From now on I will quiesce no matter what the emergency is!!&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RuSs&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-6356731689989511498?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/6356731689989511498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/11/workflow-35-and-moss-2007-this-task-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6356731689989511498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6356731689989511498'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/11/workflow-35-and-moss-2007-this-task-is.html' title='Workflow 3.5 and MOSS 2007 - This task is currently locked by a running workflow and cannot be edited.'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TNqFsjiAt5I/AAAAAAAAGuA/lhEgT9W3JqI/s72-c/TaskLocked.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-6582511123353051918</id><published>2010-10-19T19:54:00.001+11:00</published><updated>2010-10-20T00:22:51.602+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workflow 4.0'/><title type='text'>Workflow 4.0 Activity Designer</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;In this post i'm going to explain how to make a custom activity better visually.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;First of all I have a custom code activity called RequestManagerAction. It inherits from CodeActivity and overrides its Execute method. (I may do a post on code activities later).&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The visual representation of code activity, by default, looks like this:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1HIkYD1ZI/AAAAAAAAGqA/Pxk_oU2z5Ro/s1600/DefaultCodeActivity.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1HIkYD1ZI/AAAAAAAAGqA/Pxk_oU2z5Ro/s1600/DefaultCodeActivity.jpg" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;And by the end of this post it will look like this:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1HIgEhNUI/AAAAAAAAGqE/9_nFlywwbVY/s1600/TheFinalResult.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1HIgEhNUI/AAAAAAAAGqE/9_nFlywwbVY/s1600/TheFinalResult.jpg" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The first step is to create a new peoject for your activity designer. As we want to "design" RequestManagerAction I have created a new project called:&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RequestManagerActionDesignerLibrary&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;. And inside this I add a new Activity Designer Item from the Workflow - installed templates called&amp;nbsp;RequestManagerActionDesigner.xaml.&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1JZboei5I/AAAAAAAAGqM/iafdGpjFaD8/s1600/NewActivityDesignerProject.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="404" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1JZboei5I/AAAAAAAAGqM/iafdGpjFaD8/s640/NewActivityDesignerProject.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;the initial view after opening&amp;nbsp;RequestManagerActionDesigner.xaml is a split screen with the Xaml that represents the design in the bottom part of the screen and the actualy visual design in the top part.&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1J8T7qzjI/AAAAAAAAGqU/RjvV6KsXmME/s1600/XamlBottomDesignTop.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1bVjHb6GI/AAAAAAAAGsM/_tSkb5-Vg7Y/s1600/InitView.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="496" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1bVjHb6GI/AAAAAAAAGsM/_tSkb5-Vg7Y/s640/InitView.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;In the bottom pane we can see the Xaml. First of all I want to set the Collapsible property to false as I don't want my designer to be collapsible.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1JZaShTeI/AAAAAAAAGqQ/_tp4LEqAgOg/s1600/DefaultXamlWithNoCollapse.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="106" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1JZaShTeI/AAAAAAAAGqQ/_tp4LEqAgOg/s640/DefaultXamlWithNoCollapse.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The 2nd taks is to add an&amp;nbsp;ArgumentToExpressionConverter to my Xaml. This defines the mapping between arguments and expressions and provides the functionality to convert between these objects. Typically, this converter is used declaratively when using an ExpressionTextBox in a custom activity designer.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1MJUx08TI/AAAAAAAAGqk/xCRfLWSLcw0/s1600/ArgumentToExpressionConverter.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="180" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1MJUx08TI/AAAAAAAAGqk/xCRfLWSLcw0/s640/ArgumentToExpressionConverter.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The next thing I want to do it sort out my layout. As my custom activity has 3 properties:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1LUeAR8yI/AAAAAAAAGqc/d2fL6bTknW8/s1600/3Properties.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="62" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1LUeAR8yI/AAAAAAAAGqc/d2fL6bTknW8/s640/3Properties.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The main aim of what we are doing here is to show ExpressionTextBoxes for all 3 of these.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I will add a grid of 2 columns and 3 rows for our properties.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1McDPJU2I/AAAAAAAAGqo/-CsaUPetlYc/s1600/Grid.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="336" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1McDPJU2I/AAAAAAAAGqo/-CsaUPetlYc/s400/Grid.jpg" width="400" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You can see that inside this grid we have some (3) collapsed TextBlock sections. I will explain these now.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Each TextBlock is for a property.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The first TextBlock is for the ExpenseRequest property of our custom activity:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1M57rrELI/AAAAAAAAGqs/vVCjAo5xSog/s1600/FirstTextBlock.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="148" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1M57rrELI/AAAAAAAAGqs/vVCjAo5xSog/s640/FirstTextBlock.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You can see the obvious items marked out in the above picture.Note that the position inside the grid defined above is set by the Grid.Row and Grid.Column indexes which are zero(0) based.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You can also see that our expression text box is bound to ModelItem.SubmitExpenseRequest.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;SubmitExpenseRequest is a class in my Contracts project that is part of my domain model:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1cDevT4-I/AAAAAAAAGsU/8pCE0IIleKM/s1600/SubmitExpenseRequestCode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="456" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1cDevT4-I/AAAAAAAAGsU/8pCE0IIleKM/s640/SubmitExpenseRequestCode.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1b1MlBdJI/AAAAAAAAGsQ/JmbR9hwXSi8/s1600/SubmitExpenseRequest.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="236" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1b1MlBdJI/AAAAAAAAGsQ/JmbR9hwXSi8/s640/SubmitExpenseRequest.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The ModelItem represents the activity that that the designer is currently editing. This object sits between the visual elements that present an activity to the developer and the in-memory representation of the activity.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You can now see that we are well on the way to building our custom design:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1RhE352SI/AAAAAAAAGq0/3HFSr2nLm2E/s1600/Just!Property.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="135" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1RhE352SI/AAAAAAAAGq0/3HFSr2nLm2E/s400/Just!Property.jpg" width="400" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I will now go ahead and add the other 2 ExpressionTextBoxes and the relevant properties.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1R_1otouI/AAAAAAAAGq4/d3gP53kxeLc/s1600/AllProperty.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="203" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1R_1otouI/AAAAAAAAGq4/d3gP53kxeLc/s400/AllProperty.jpg" width="400" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You will notice the little smiley icon in the top left of the designer. To add this, I added the following xaml:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1S1_G6CPI/AAAAAAAAGrE/1OB8FwF6O74/s1600/icon.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="358" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1S1_G6CPI/AAAAAAAAGrE/1OB8FwF6O74/s640/icon.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Now I am ready to associate my designer with the actual code activity that is already part of my workflow. If you remember it currently looks like this:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1HIkYD1ZI/AAAAAAAAGqA/Pxk_oU2z5Ro/s1600/DefaultCodeActivity.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1HIkYD1ZI/AAAAAAAAGqA/Pxk_oU2z5Ro/s1600/DefaultCodeActivity.jpg" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;First I will add a reference to the project that my code activity is part of:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1cjMuIBtI/AAAAAAAAGsY/KQJqZIdPn3s/s1600/AddReferenceToCodeActProj2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="302" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1cjMuIBtI/AAAAAAAAGsY/KQJqZIdPn3s/s640/AddReferenceToCodeActProj2.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Once its referenced we can add an attribute to the top of our codeActivity class (Don't forget the System.ComponentModel import at the top!):&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1VgzqjimI/AAAAAAAAGr8/PP36-iZ1tZE/s1600/AddAttribToClass.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="136" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1VgzqjimI/AAAAAAAAGr8/PP36-iZ1tZE/s400/AddAttribToClass.jpg" width="400" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Once you have built the projects you will see the "RequestManagerAction" code activity in the toolbox. Drag this onto your workflow surface if it's not already there and you will see that the look of the activity is not just a small yellow box any more. Nice!!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1aJvq_FAI/AAAAAAAAGsE/KkbWEjLZp0A/s1600/FinalWorkflow.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="437" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TL1aJvq_FAI/AAAAAAAAGsE/KkbWEjLZp0A/s640/FinalWorkflow.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;This is obviously more useful as we don't need to &amp;nbsp;use the properties pane to set the properties for our code activity, we can just type them straight into the workflow.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RuSs&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-6582511123353051918?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/6582511123353051918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-40-activity-designer.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6582511123353051918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6582511123353051918'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-40-activity-designer.html' title='Workflow 4.0 Activity Designer'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1HIkYD1ZI/AAAAAAAAGqA/Pxk_oU2z5Ro/s72-c/DefaultCodeActivity.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-6090354402463690273</id><published>2010-10-08T20:54:00.003+11:00</published><updated>2010-10-19T23:34:32.386+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workflow 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Tracking Profile'/><category scheme='http://www.blogger.com/atom/ns#' term='AppFabric'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.0'/><title type='text'>Workflow 4.0 - Adding annotations to your workflow tracking profile</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Lets say you have a workflow that is running on a DEV / TEST and LIVE server. Lets say, also for the sake of it, that we are using the same AppFabric database for all 3. (yes, this is not the best idea but to explain annotations it helps.)&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TK7qnIBMLQI/AAAAAAAAGl8/SgWsB65LiEI/s1600/web.config.TrackingProfile.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="498" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TK7qnIBMLQI/AAAAAAAAGl8/SgWsB65LiEI/s640/web.config.TrackingProfile.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So what we want to acheive is the show, in AppFabric monitoring, which server we are using. So the monitoring with show either:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;ServerThatEmittedThis: DEV_Server&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;ServerThatEmittedThis: TEST_Server&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;ServerThatEmittedThis: LIVE_Server&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Again, this example is useless in the real world but i'm sure by the end of this post you will be able to imagine some real world uses for this functionality.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So you can see that in my current tracking profile I have added an annotation of my DEV server as follows:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TK7kxo_MdFI/AAAAAAAAGlQ/4hCrk5Qvx9E/s1600/web.config.TrackingProfile.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You can see in the pic. "&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;ServerThatEmittedThis: DEV_Server&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;" which will now show up in AppFabric monitoring.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So I will now run the workflow which is hosted in IIS / AppFabric.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;My workflow runs and is persisted into my persistence store. So I click on the Active or Idle Intance in my AppFabric dashboard:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TK7m55fnBCI/AAAAAAAAGlY/cxA_VOIRCk0/s1600/AppFabricDashboard.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="508" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TK7m55fnBCI/AAAAAAAAGlY/cxA_VOIRCk0/s640/AppFabricDashboard.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Note I could also navigate to the annotated info if my workflow wasnt using a persistence store by Looking on the dashboard for the WCF Call History section and click on the link in the Completed Calls section.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TK7m57Jg6nI/AAAAAAAAGlc/F5RcaevJ4t0/s1600/clickOnPersisted.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="631" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TK7m57Jg6nI/AAAAAAAAGlc/F5RcaevJ4t0/s640/clickOnPersisted.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Once I can see the instance I click to select view tracked events:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TK7m6IDXoeI/AAAAAAAAGlg/kak2hzbgahY/s1600/ClickOnViewTrackedEvents.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="564" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TK7m6IDXoeI/AAAAAAAAGlg/kak2hzbgahY/s640/ClickOnViewTrackedEvents.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Once here, I can see all the events that my workflow has passed through.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Note that I am using a custom tracking profile that emits less than some of the default profiles. My custom tracking profile named: &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;ExpenseServiceTrackingProfile&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;is shown in the first screen shot of a part of my web.config in this post.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TK7m6BO21FI/AAAAAAAAGlk/tbTlyqcj768/s1600/clickOnRecordInQuestion.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="410" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TK7m6BO21FI/AAAAAAAAGlk/tbTlyqcj768/s640/clickOnRecordInQuestion.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;As i placed my annotation in my web.config as a child node to the activityStateQuery named Screen Expense I know to expect to see my annotation in AppFabric at the point where my screen expense activity emitting its tracking record.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TK7pr41RqpI/AAAAAAAAGlw/7D8vwjxQ4zs/s1600/ScreenExpPortionOfWebConfig.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TK7rHyuefAI/AAAAAAAAGmE/m0DxhPgcTko/s1600/ScreenExpPortionOfWebConfig.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="232" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TK7rHyuefAI/AAAAAAAAGmE/m0DxhPgcTko/s640/ScreenExpPortionOfWebConfig.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;As you can see from the above pic. I have clicked on the Screen expense item and at the bottom you can see a tab called "tracked variables" shown below:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TK7pgecgEOI/AAAAAAAAGls/WG24htC6lVU/s1600/ClickOnTrackedVarsTab.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="166" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TK7pgecgEOI/AAAAAAAAGls/WG24htC6lVU/s640/ClickOnTrackedVarsTab.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So I know that the workflow (server) emitting this tracking record is from my dev server.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Rubbish example, but &amp;nbsp;I hope you get the point.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;R&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-6090354402463690273?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/6090354402463690273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-40-adding-annotations-to-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6090354402463690273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6090354402463690273'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-40-adding-annotations-to-your.html' title='Workflow 4.0 - Adding annotations to your workflow tracking profile'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TK7qnIBMLQI/AAAAAAAAGl8/SgWsB65LiEI/s72-c/web.config.TrackingProfile.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-5182426085467707197</id><published>2010-10-05T20:22:00.009+11:00</published><updated>2010-10-05T20:52:49.479+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workflow 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Tracking Profile'/><category scheme='http://www.blogger.com/atom/ns#' term='AppFabric'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.0'/><title type='text'>AppFabric Hosting PowerShell Cmdlets</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;This seems to be the place for the AppFabric Hosting PowerShell Cmdlets:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee767662(v=WS.10).aspx"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;http://msdn.microsoft.com/en-us/library/ee767662(v=WS.10).aspx&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The following shows the current state of my AppFabric. It has nothing persisted.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq1Uk-pBI/AAAAAAAAGkI/ELRJJBrVILo/s1600/AppFabricDash_BeforePersistedInstance.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="600" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq1Uk-pBI/AAAAAAAAGkI/ELRJJBrVILo/s640/AppFabricDash_BeforePersistedInstance.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I start a workflow that I know will persist to my persistence store:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq1YqPnOI/AAAAAAAAGkM/zKE7zV0ln7E/s1600/WindowsClient.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq1YqPnOI/AAAAAAAAGkM/zKE7zV0ln7E/s1600/WindowsClient.jpg" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I can then look back at my AppFabric dashboard and see that 1 workflow is persisted and active.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq1vu9CsI/AAAAAAAAGkQ/guY9MWevuAg/s1600/AppFabricDash_AfterPersistedInstance.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq1vu9CsI/AAAAAAAAGkQ/guY9MWevuAg/s1600/AppFabricDash_AfterPersistedInstance.jpg" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I can then open&amp;nbsp;Windows PowerShell Modules. It calls this from the server menu behind the scenes:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -NoExit -ImportSystemModules&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq1xmSg-I/AAAAAAAAGkY/kLFRiL85zwM/s1600/LoadedPowerShell.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="408" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq1xmSg-I/AAAAAAAAGkY/kLFRiL85zwM/s640/LoadedPowerShell.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Ok so it's loaded. Now, just as a simple example we can query for&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;all instances in the default persistence store.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;We call "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Get-ASAppServiceInstance&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;".&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq42wVCbI/AAAAAAAAGkc/woPWn6Mv5Kw/s1600/LoadedPowerShell_PostQuery.jpg" imageanchor="1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="408" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq42wVCbI/AAAAAAAAGkc/woPWn6Mv5Kw/s640/LoadedPowerShell_PostQuery.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;It returns all the info about my persisted workflow instance.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;This is interesting as I have just noticed that I have an extra unnecessary&amp;nbsp;service contract name, a spelling mistake and hence an extra bookmark.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKrs-QrpJMI/AAAAAAAAGkk/de0MO8kMxw0/s1600/ManagerActionComplete.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="65" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKrs-QrpJMI/AAAAAAAAGkk/de0MO8kMxw0/s640/ManagerActionComplete.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Ok, so I went in, altered the service contract name to get rid of the extra IService ref as it should only have an &amp;nbsp;IExpenseService ref. I also renamed my bookmark from ManagerActionComplete to&amp;nbsp;ManagerActionCompleted. Then I re-ran my workflow thinking all was ok.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;An exception was thrown so obviously I just did something incorrectly.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I re-ran my&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Get-ASAppServiceInstance&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;". and saw the following information which of course is very obvious:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The exception is:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;ExceptionMessage: A bookmark with the name 'ManagerActionCompleted|{http://tempuri.org/}IExpenseService' already exists.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Obviously I just named a bookmark in my workflow to the same name as another one.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I renamed&amp;nbsp;ManagerActionCompleted to&amp;nbsp;ManagerActionCompletedReminder as this bookmark gets resumed after a delay activity expiration time has elapsed.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Get-ASAppServiceInstance&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;" now shows:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKrwFsU7hRI/AAAAAAAAGk0/PGduWInzNGc/s1600/LoadedPowerShell_AllGood.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="408" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKrwFsU7hRI/AAAAAAAAGk0/PGduWInzNGc/s640/LoadedPowerShell_AllGood.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;We then wait for the delay time to expire and run&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Get-ASAppServiceInstance&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;" again and we then see:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKrwv1d_5BI/AAAAAAAAGk4/iCzUqNiaWLs/s1600/LoadedPowerShell_AllGoodPostDelay.jpg" imageanchor="1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="408" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKrwv1d_5BI/AAAAAAAAGk4/iCzUqNiaWLs/s640/LoadedPowerShell_AllGoodPostDelay.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-size: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Ok so I set off to write myself an investigative blog into&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Windows PowerShell Modules for AppFabric and this technology already showed me a couple of issues with my workflow. Nice!!&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Again, look at this link for loads of other useful commands: &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee767624(v=WS.10).aspx"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;http://msdn.microsoft.com/en-us/library/ee767624(v=WS.10).aspx&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;thanks&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RuSs&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-5182426085467707197?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/5182426085467707197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/10/appfabric-hosting-powershell-cmdlets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5182426085467707197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5182426085467707197'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/10/appfabric-hosting-powershell-cmdlets.html' title='AppFabric Hosting PowerShell Cmdlets'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKrq1Uk-pBI/AAAAAAAAGkI/ELRJJBrVILo/s72-c/AppFabricDash_BeforePersistedInstance.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-6035556960574316396</id><published>2010-10-05T19:17:00.006+11:00</published><updated>2010-10-19T21:07:43.929+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workflow 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Tracking Profile'/><category scheme='http://www.blogger.com/atom/ns#' term='AppFabric'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.0'/><title type='text'>Why does my workflow die when I add a TransactedReceiveActivity?</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;dzien dobry,&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I dont know the answer to this one but hopefully I will be able to update this post when I find out.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The issue is this:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;When I add a TransactedReceiveScope to a fully functional, persisted workflow monitored by AppFabric the workflow throws an exception.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I have looked at the exception and my trace / log files and can't find any useful information.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;My Workflow looks like this:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKrena2S1iI/AAAAAAAAGj8/NHskMwMogqc/s1600/pictureOfItandF4Properties.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1tuw7kfUI/AAAAAAAAGtA/JTinnX4ezuY/s1600/updatedWhereItIs.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="282" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1tuw7kfUI/AAAAAAAAGtA/JTinnX4ezuY/s640/updatedWhereItIs.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;And the error is this:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKrenICUUbI/AAAAAAAAGj4/sU5X3kN0zQI/s1600/Error.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="300" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKrenICUUbI/AAAAAAAAGj4/sU5X3kN0zQI/s640/Error.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The error text is&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The execution of the InstancePersistenceCommand named {urn:schemas-microsoft-com:System.Activities.Persistence/command}LoadWorkflow was interrupted by an error.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;And the stack trace is:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Server stack trace:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc&amp;amp; rpc)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at System.ServiceModel.Channels.ServiceChannelProxy.InvokeEndService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Exception rethrown at [0]:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp;amp; msgData, Int32 type)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at WindowsClient.ExpenseServiceRef.IExpenseService.EndGetData(IAsyncResult result)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at WindowsClient.ExpenseServiceRef.ExpenseServiceClient.WindowsClient.ExpenseServiceRef.IExpenseService.EndGetData(IAsyncResult result) in C:\PROJECTS\TelerealTrillium.Expense.Workflow.Soln\TelerealTrillium.Expense.Workflow.Soln\WindowsClient\Service References\ExpenseServiceRef\Reference.cs:line 532&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at WindowsClient.ExpenseServiceRef.ExpenseServiceClient.EndGetData(IAsyncResult result) in C:\PROJECTS\TelerealTrillium.Expense.Workflow.Soln\TelerealTrillium.Expense.Workflow.Soln\WindowsClient\Service References\ExpenseServiceRef\Reference.cs:line 537&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; at WindowsClient.Form1.OnStartCompleted(IAsyncResult asr) in C:\PROJECTS\TelerealTrillium.Expense.Workflow.Soln\TelerealTrillium.Expense.Workflow.Soln\WindowsClient\Form1.cs:line 93&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Ill keep hunting for solution and will post back when I find it.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;========================== Time passes =========================&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Ok so I came back to this little issue after remembering about the MSDTC.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I realized that my app. updates my persistence store AND my custom expense database inside the&amp;nbsp;TransactedReceiveActivity. (I update my custom expense database using Entity Framework 4.0)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Now my connection strings for these 2 things are different obviously so I am trying to wrap a transaction around some activities that span 2 databases.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1qgHTdQuI/AAAAAAAAGss/JmbhwDPNjtU/s1600/ConnectionStringEntities.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="58" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1qgHTdQuI/AAAAAAAAGss/JmbhwDPNjtU/s640/ConnectionStringEntities.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1rD3bZ79I/AAAAAAAAGsw/EFyScg_2Gpw/s1600/PersistenceConn.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="34" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1rD3bZ79I/AAAAAAAAGsw/EFyScg_2Gpw/s640/PersistenceConn.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So what I did first was enable MSDTC on my local server that hosts my WCF Workflow 4.0.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;It was like:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1reQYEgyI/AAAAAAAAGs0/EhVuT2xLT7s/s1600/MSDTCwasLike.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TL1reQYEgyI/AAAAAAAAGs0/EhVuT2xLT7s/s400/MSDTCwasLike.jpg" width="366" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Now its like:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1rkcZdo_I/AAAAAAAAGs4/4eyTNoHLizM/s1600/MSDTCNowLike.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1rkcZdo_I/AAAAAAAAGs4/4eyTNoHLizM/s400/MSDTCNowLike.jpg" width="367" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;But that still didnt work. Although I did see a one off Transaction Aborted error which I can't reproduce.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I then went to my remote SQL server that hosts my Persistence store and custom Expense database which is what I should have looked at first really.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I enabled the same open-ish security on the Sql box and it fixed everything!!&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1rkcZdo_I/AAAAAAAAGs4/4eyTNoHLizM/s1600/MSDTCNowLike.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TL1rkcZdo_I/AAAAAAAAGs4/4eyTNoHLizM/s400/MSDTCNowLike.jpg" width="367" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1st5JninI/AAAAAAAAGs8/QgCIn5IpjUI/s1600/GoodResult.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="268" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1st5JninI/AAAAAAAAGs8/QgCIn5IpjUI/s400/GoodResult.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;thanks&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RuSs&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-6035556960574316396?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/6035556960574316396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/10/why-does-my-workflow-die-when-i-add.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6035556960574316396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6035556960574316396'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/10/why-does-my-workflow-die-when-i-add.html' title='Why does my workflow die when I add a TransactedReceiveActivity?'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TL1tuw7kfUI/AAAAAAAAGtA/JTinnX4ezuY/s72-c/updatedWhereItIs.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-67435879786978935</id><published>2010-10-05T18:41:00.001+11:00</published><updated>2010-10-05T20:43:33.620+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workflow 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Tracking Profile'/><category scheme='http://www.blogger.com/atom/ns#' term='AppFabric'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.0'/><title type='text'>Resetting the AppFabric dashboard whilst in development iterations</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Bonjour,&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I have found a little bit of t-sql that cleans out the required sql tables that the AppFabric dashboard uses. I have not researched this much but it seems to do the job.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;It is very useful if you are doing constant development iterations and you don't want loads of instances of your workflow clogging up the AppFabric dashboard.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;The t-sql is this&lt;/b&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;delete&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; [dbo]&lt;span style="color: grey;"&gt;.&lt;/span&gt;[ASWfInstancesTable] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;delete&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; [dbo]&lt;span style="color: grey;"&gt;.&lt;/span&gt;[ASWfEventsTable]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;delete&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; [dbo]&lt;span style="color: grey;"&gt;.&lt;/span&gt;[ASWcfEventsTable]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;delete&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; [System.Activities.DurableInstancing]&lt;span style="color: grey;"&gt;.&lt;/span&gt;[KeysTable] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;delete&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; [System.Activities.DurableInstancing]&lt;span style="color: grey;"&gt;.&lt;/span&gt;[InstancesTable]&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Probably not a god idea to rely on this in anything but a development context.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Please comment if you know any more on this.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;thanks&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RuSs&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-67435879786978935?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/67435879786978935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/10/resetting-appfabric-dashboard-whilst-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/67435879786978935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/67435879786978935'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/10/resetting-appfabric-dashboard-whilst-in.html' title='Resetting the AppFabric dashboard whilst in development iterations'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4773068203330778474</id><published>2010-10-02T02:02:00.022+10:00</published><updated>2010-10-05T21:16:03.640+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workflow 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Tracking Profile'/><category scheme='http://www.blogger.com/atom/ns#' term='AppFabric'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.0'/><title type='text'>Workflow Tracking Profile Editor</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Here is a great link on&amp;nbsp;Dennis van der Stelt's blog about&amp;nbsp;info. about the workflow tracking profile editor.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://bloggingabout.net/blogs/dennis/archive/2010/06/08/workflow-tracking-profile-editor.aspx"&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;http://bloggingabout.net/blogs/dennis/archive/2010/06/08/workflow-tracking-profile-editor.aspx&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;This tool makes it easy to create a tracking profile. It allows you to load up a WF4 XAMLX file. It then shows the editor and you’re allowed to browse through all (composite) activities. After right-clicking an activity (with a blue circle on it) you can specify what you exactly want to track. It even knows everything about arguments and (scoped) variables so you can use checkboxes to turn them on or off.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Here are some screen shots:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKYFyP1OqNI/AAAAAAAAGfw/6SNFGbtdpHY/s1600/WorkflowTrackingProfileEditor.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="420" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKYFyP1OqNI/AAAAAAAAGfw/6SNFGbtdpHY/s640/WorkflowTrackingProfileEditor.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKYFyAo37cI/AAAAAAAAGf0/89OeTSmOSz8/s1600/WorkflowTrackingProfileEditor_design.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKYFyAo37cI/AAAAAAAAGf0/89OeTSmOSz8/s640/WorkflowTrackingProfileEditor_design.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKYFyfDlb9I/AAAAAAAAGf4/ReNU_QLGLBs/s1600/xml.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="434" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKYFyfDlb9I/AAAAAAAAGf4/ReNU_QLGLBs/s320/xml.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;span id="goog_1992741359"&gt;&lt;/span&gt;&lt;span id="goog_1992741360"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So following on from my other post:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://russellmccloy.blogspot.com/2010/10/workflow-40-sample-development.html"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;http://russellmccloy.blogspot.com/2010/10/workflow-40-sample-development.html&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I will create a simple tracking profile for my workflow.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Currently my workflow is using a default tracking profile that is set by my root web.config:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKnSRtPZx2I/AAAAAAAAGgk/c5oOm9aPli4/s1600/rootTrackingProfile.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="186" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKnSRtPZx2I/AAAAAAAAGgk/c5oOm9aPli4/s640/rootTrackingProfile.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You can see that it is using the "HealthMonitoring tracking Profile"which seems to be the default one. there are a few others to choose from and to configure these you:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;right click on your WF in IIS and select "Manage WCF and WF services" and then "Configure..."&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Click on Monitoring&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;then use the slider to choose what you require.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKndXmt1SGI/AAAAAAAAGh0/o4fJL6JnR-U/s1600/MonitoringProfile_Off.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKndXmt1SGI/AAAAAAAAGh0/o4fJL6JnR-U/s640/MonitoringProfile_Off.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKndX_n6YmI/AAAAAAAAGh4/rQbcdR_8wLs/s1600/MonitoringProfile_ErrorsOnly.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKndX_n6YmI/AAAAAAAAGh4/rQbcdR_8wLs/s640/MonitoringProfile_ErrorsOnly.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKndX_mjMoI/AAAAAAAAGh8/RyOKPkpeBEQ/s1600/MonitoringProfile_HealthMonitoring.JPG" imageanchor="1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKndX_mjMoI/AAAAAAAAGh8/RyOKPkpeBEQ/s640/MonitoringProfile_HealthMonitoring.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKndX9IV1rI/AAAAAAAAGiA/va702lh8n4s/s1600/MonitoringProfile_EndtoEndMonitoring.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKndX9IV1rI/AAAAAAAAGiA/va702lh8n4s/s640/MonitoringProfile_EndtoEndMonitoring.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKndYH-o5PI/AAAAAAAAGiE/fsCjAeldCS0/s1600/MonitoringProfile_TroubleShooting.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="480" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKndYH-o5PI/AAAAAAAAGiE/fsCjAeldCS0/s640/MonitoringProfile_TroubleShooting.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;And you can see that in my web.config that is local to my service that I have no tracking profile:&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKnSRV9gu1I/AAAAAAAAGgg/FgGp-2aX4rM/s1600/currentWebConfig.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKnSRV9gu1I/AAAAAAAAGgg/FgGp-2aX4rM/s640/currentWebConfig.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So I will use the&amp;nbsp;Workflow Tracking Profile Editor to point to my current workflow definition and add a tracking item.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;For the purposes of this exercise I have added an int32 variable to my xamlx file called:&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;TempTrackingExpenseId&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_KoOt4I/AAAAAAAAGgs/gRxLrDDZfuo/s1600/TempTrackingExpenseId.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="265" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_KoOt4I/AAAAAAAAGgs/gRxLrDDZfuo/s640/TempTrackingExpenseId.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I then use an Assign activity to set the variable. I suppose I could track the expenseId that hangs of my custon ExpenseResponse object. I tried that before and I could not get anything to appear in appFabric. So for now i'll just stick with a simple integer.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_HaNf3I/AAAAAAAAGgw/V2iTzSFTbKk/s1600/AssignActivity.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="206" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_HaNf3I/AAAAAAAAGgw/V2iTzSFTbKk/s640/AssignActivity.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I then right click in the blue spot in the&amp;nbsp;Workflow Tracking Profile Editor:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_dnMXwI/AAAAAAAAGg0/WrLK9HLqveA/s1600/blueSpotInitial.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="162" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_dnMXwI/AAAAAAAAGg0/WrLK9HLqveA/s640/blueSpotInitial.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;and select "track variables in this activities scope...":&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_k1HgqI/AAAAAAAAGg4/uB0merAUU4c/s1600/trackVarsInThisActivity.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="144" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_k1HgqI/AAAAAAAAGg4/uB0merAUU4c/s400/trackVarsInThisActivity.JPG" width="400" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;And for now ill just select every event type for my variable:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_lHPQ1I/AAAAAAAAGg8/BETQBp-vvvw/s1600/PlacesItsTracked.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="97" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnT_lHPQ1I/AAAAAAAAGg8/BETQBp-vvvw/s400/PlacesItsTracked.JPG" width="400" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I then save my new tracking profile using the&amp;nbsp;Workflow Tracking Profile Editor and insert the resulting Xml into the web.config of my xamlx service.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKnb_i_tFtI/AAAAAAAAGhs/mtPbv09EgYk/s1600/webConfigNotepad.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKnb_i_tFtI/AAAAAAAAGhs/mtPbv09EgYk/s400/webConfigNotepad.JPG" width="260" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Now that I have done this I will fire up my workflow using a windows form client as mentioned in my earlier blog:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://russellmccloy.blogspot.com/2010/10/workflow-40-sample-development.html"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;http://russellmccloy.blogspot.com/2010/10/workflow-40-sample-development.html&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;More on this later... still learning&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnXMXwfwCI/AAAAAAAAGhE/7AqsgLrDwKM/s1600/testtrackingWinForms.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="430" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnXMXwfwCI/AAAAAAAAGhE/7AqsgLrDwKM/s640/testtrackingWinForms.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You can see that I have set a break point on the assign activity that sets the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;TempTrackingExpenseId &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;variable in my ExpenseService.xamlx workflow:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKnXMYQbgHI/AAAAAAAAGhI/8PlonDmgUvQ/s1600/AssignBreakPoint.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="167" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKnXMYQbgHI/AAAAAAAAGhI/8PlonDmgUvQ/s400/AssignBreakPoint.JPG" width="400" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;After I let the debugger run to the end I expect that I have 1 workflow active and persisted in the persistence store and therefore showing on the appFabric dashboard. &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZSwzMmMI/AAAAAAAAGhQ/dj0icK3D8kI/s1600/appFabricStartPage.JPG" imageanchor="1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZSwzMmMI/AAAAAAAAGhQ/dj0icK3D8kI/s1600/appFabricStartPage.JPG" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZTcbICiI/AAAAAAAAGhU/SAYA7RmWTVU/s1600/appFabricActivePersistedWFs.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="135" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZTcbICiI/AAAAAAAAGhU/SAYA7RmWTVU/s400/appFabricActivePersistedWFs.JPG" width="400" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So if I click on the Active persisted WF instances I will see the workflow in question.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZUAVikZI/AAAAAAAAGhY/UQSg0HLd7Wg/s1600/appFabricActivePersistedWFs2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="262" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZUAVikZI/AAAAAAAAGhY/UQSg0HLd7Wg/s640/appFabricActivePersistedWFs2.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;If I right click and select "view tracked events" I can see all the events / activities that have occurred in my workflow already.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;If I just scroll I may be able to find the event im looking for,&amp;nbsp;and therefore the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;TempTrackingExpenseId&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;. What if, however, there are hundreds of activities in my workflow?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I can use the query options to find the data I am looking for. So if a user calls me up and tells me that he is waiting on the approval of an expense and the Id of this expense is 116 then I can select:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Tracked workflow variables&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Equals&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Name: 'TempTrackingExpenseId'; Value: '116'&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;as shown below:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZUyK7YMI/AAAAAAAAGhg/IMrclF6tP_E/s1600/QueryForValue.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="355" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZUyK7YMI/AAAAAAAAGhg/IMrclF6tP_E/s640/QueryForValue.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The result would be as follows:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZXwrKD0I/AAAAAAAAGhk/s-8tApkLRIw/s1600/ResultOfQueryForValue.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="530" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKnZXwrKD0I/AAAAAAAAGhk/s-8tApkLRIw/s640/ResultOfQueryForValue.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;As you can see, Especially compared to workflow 3.5, this is and could be very useful in keeping up with where your workflows are at.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;A great link about tracking:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd807381(VS.100).aspx"&gt;http://msdn.microsoft.com/en-us/library/dd807381(VS.100).aspx&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;That's all for now.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RuSs&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4773068203330778474?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4773068203330778474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-tracking-profile-editor-link.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4773068203330778474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4773068203330778474'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-tracking-profile-editor-link.html' title='Workflow Tracking Profile Editor'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKYFyP1OqNI/AAAAAAAAGfw/6SNFGbtdpHY/s72-c/WorkflowTrackingProfileEditor.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-6909428739865169451</id><published>2010-10-02T01:29:00.007+10:00</published><updated>2010-10-05T20:42:28.566+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workflow 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='AppFabric'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.0'/><title type='text'>Workflow 4.0 - Hosting with AppFabric</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Following on from my last post I will attempt to share with you, the steps I took to get my workflow hosted in AppFabric with Persistence and Monitoring enabled.(I will not talk about AppFabric's caching abilities as I know nothing about these at this point!!)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Ok so from my first post which is here:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://russellmccloy.blogspot.com/2010/10/workflow-40-sample-development.html"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;http://russellmccloy.blogspot.com/2010/10/workflow-40-sample-development.html&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I outlines how I began with workflow 4.0 and a few of the issues I had. I eventually got to a point where I developed a workflow application that, in a very simple way, allowed for the approval of an expense.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;what I will now try to talk about is getting that workflow and it's parts hosted in AppFabric.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;To start with, I created the workflow project as follows in this pic:&lt;/span&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKWuy7gkpoI/AAAAAAAAGbY/WOn9O3wIhgw/s1600/WF+project+Type.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="360" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKWuy7gkpoI/AAAAAAAAGbY/WOn9O3wIhgw/s640/WF+project+Type.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Workflow project creation&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;When you create a new WCF Workflow Service Application the settings default to using the visual Studio 2010 development server. If we want to use AppFabric we need to change the project so that it is hosted, first of all in IIS. The following picture shows this:&lt;/span&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKX9SByFMHI/AAAAAAAAGfM/YL8dUq9JIEg/s1600/VS2010_ServiceWebSettings.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="398" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKX9SByFMHI/AAAAAAAAGfM/YL8dUq9JIEg/s640/VS2010_ServiceWebSettings.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Visual Studio Project Properties&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;If you use the "Create Virtual Directory" button, then VS 2010 will, hopefully create the IIS vertual directory for you as shown here:&lt;/span&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKX9SLi7XoI/AAAAAAAAGfI/0OYgrfUi2RQ/s1600/ServiceHostedInAppFabric.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="296" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKX9SLi7XoI/AAAAAAAAGfI/0OYgrfUi2RQ/s320/ServiceHostedInAppFabric.JPG" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;IIS virtual Directory&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Right so we now have a Wcf service in IIS but it's sort of useless unless we built our own monitoring and hosting tools. Remember that AppFabric gives you loads of stuff out of the box. It also manages hosting and will re-hydrate a workflow from the persistence store when a delay timer expires.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So now what we need to do is install AppFabric.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Once appFabric is installed you need to configure appFabric.&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;To configure AppFabric click on the following link:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKYHYWQ9LOI/AAAAAAAAGgA/THpJ8l0M43c/s1600/Configuring+appFabric.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKYHYWQ9LOI/AAAAAAAAGgA/THpJ8l0M43c/s640/Configuring+appFabric.JPG" width="548" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You will get an explanation page:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7Wvw65kI/AAAAAAAAGiU/EoPdgzWUkAY/s1600/ConfigureAppFabricExplainPage.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="476" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7Wvw65kI/AAAAAAAAGiU/EoPdgzWUkAY/s640/ConfigureAppFabricExplainPage.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;then the connection setup page for your monitoring and persistence database:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7WhPUTxI/AAAAAAAAGiY/jv30zy00JB4/s1600/ConfigureAppFabric_Connections.jpg" imageanchor="1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7WhPUTxI/AAAAAAAAGiY/jv30zy00JB4/s640/ConfigureAppFabric_Connections.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Before you point to the database you will need to run the following scripts that are @:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\SQL\en:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;SqlWorkflowInstanceStoreSchema.sql&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;and&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;SqlWorkflowInstanceStoreLogic.sql&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7d1XpxiI/AAAAAAAAGis/EToBQOpjlbM/s1600/ConfigureAppFabric_PersistenceSchema_Logic.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="408" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7d1XpxiI/AAAAAAAAGis/EToBQOpjlbM/s640/ConfigureAppFabric_PersistenceSchema_Logic.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;the setup wont work with out these. I think they setup a basic persistence store and appFabric then adds additional functionality to it. Not sure right now.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;After you run these 2 scripts successfully on the database of your choice. (You can use any SQL db with any name to store persistence and monitoring data) you can then continue with the AppFabric setup. You may get a warning about Sql agent not being detected as in a runnable state but I checked and mine was running so I think you can assume everything is still ok.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7XGSEMcI/AAAAAAAAGig/2_Cl4_wj58k/s1600/ConfigureAppFabric_Connections_sql_agent_issue.jpg" imageanchor="1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="404" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7XGSEMcI/AAAAAAAAGig/2_Cl4_wj58k/s640/ConfigureAppFabric_Connections_sql_agent_issue.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Following this you should get a success message.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7d9-3ycI/AAAAAAAAGik/qbRFe86c1bA/s1600/ConfigureAppFabric_Success.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="444" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7d9-3ycI/AAAAAAAAGik/qbRFe86c1bA/s640/ConfigureAppFabric_Success.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;And then a final restart IIS message:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7dxUzIDI/AAAAAAAAGio/ciZURwMSwBs/s1600/ConfigureAppFabric_IISReset_Finish.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="478" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7dxUzIDI/AAAAAAAAGio/ciZURwMSwBs/s640/ConfigureAppFabric_IISReset_Finish.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Note&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;: I did not select to setup the caching part of AppFabric.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;After this you need to configure the local details for your site / xamlx service hosting in IIS and AppFabric. The setup we have just done relates the overall global setting for our IIS / AppFabric server. We can get more granular at the site level:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7eA2rOOI/AAAAAAAAGiw/5c6UJYDcvfI/s1600/ConfigureAppFabric_IndividualSite_WhereToClick.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="584" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7eA2rOOI/AAAAAAAAGiw/5c6UJYDcvfI/s640/ConfigureAppFabric_IndividualSite_WhereToClick.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Setup monitoring. Accept default as specified earlier and add some trace and message logging as shown in the following pics:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7k5wvywI/AAAAAAAAGi8/GUQT_8vhtRQ/s1600/ConfigureAppFabric_IndividualSite_Monitoring.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="472" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7k5wvywI/AAAAAAAAGi8/GUQT_8vhtRQ/s640/ConfigureAppFabric_IndividualSite_Monitoring.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7kzB3JMI/AAAAAAAAGjA/Emv_NjUy3xg/s1600/ConfigureAppFabric_IndividualSite_Trace_Msg_Settings.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7kzB3JMI/AAAAAAAAGjA/Emv_NjUy3xg/s640/ConfigureAppFabric_IndividualSite_Trace_Msg_Settings.jpg" width="626" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You may get an issue with net.pipe missing. You can add this in the sites advanced settings as shown below:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7kwij8-I/AAAAAAAAGjE/ECS0TS3aOhI/s1600/ConfigureAppFabric_IndividualSite_Net_Pipe.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="414" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7kwij8-I/AAAAAAAAGjE/ECS0TS3aOhI/s640/ConfigureAppFabric_IndividualSite_Net_Pipe.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;After this is done we can run our windows client in Visual Studio. The windows client submits expense requests to our workflow. &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Before we do this please not that I have neglected to add the c:\MailboxExpenseApproval directory on my server. &amp;nbsp; This will enable us to see the workflow experience and error and "&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;suspend&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;" its self. Using AppFabric we will be able to add the directory &amp;nbsp;to the file system and "&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;resume&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;" the workflow.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So here is the windows client&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7lLJDNMI/AAAAAAAAGjI/49emjzPvyHM/s1600/ConfigureAppFabric_IndividualSite_WindowsSubmitExpenseForm.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7lLJDNMI/AAAAAAAAGjI/49emjzPvyHM/s1600/ConfigureAppFabric_IndividualSite_WindowsSubmitExpenseForm.jpg" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You can see that after submission we get an error:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7lMpWpGI/AAAAAAAAGjM/0War_9AmPUs/s1600/ConfigureAppFabric_IndividualSite_Smtp_Error_Dir_IO.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="414" src="http://1.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7lMpWpGI/AAAAAAAAGjM/0War_9AmPUs/s640/ConfigureAppFabric_IndividualSite_Smtp_Error_Dir_IO.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;It looks like an Smtp error because&amp;nbsp;c:\MailboxExpenseApproval directory on the server is set as the pickupDirectory for sending mail. As it's not there, we get an error which is good for us right now.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;If we look in AppFabric we will see that the workflow is suspended:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qHIO1xI/AAAAAAAAGjQ/8HOdOmqjsb8/s1600/ConfigureAppFabric_IndividualSite_Smtp_Error_Dir_IO_In_AppFabric.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="410" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qHIO1xI/AAAAAAAAGjQ/8HOdOmqjsb8/s640/ConfigureAppFabric_IndividualSite_Smtp_Error_Dir_IO_In_AppFabric.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;We can then add the&amp;nbsp;c:\MailboxExpenseApproval directory and then resume the workflow using AppFabric.Nice!!&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qUYE20I/AAAAAAAAGjU/E1v1A9tu3T0/s1600/ConfigureAppFabric_IndividualSite_Smtp_Error_Dir_IO_In_AppFabric_Resume.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="296" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qUYE20I/AAAAAAAAGjU/E1v1A9tu3T0/s640/ConfigureAppFabric_IndividualSite_Smtp_Error_Dir_IO_In_AppFabric_Resume.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I have then build a web site that is hosted in the same IIS / appFabric as the xamlx service. The website is used to response the the Smtp emails that managers receive asking them to approve expenses. There are links in the emails to point to the approve / reject form:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qdUkKaI/AAAAAAAAGjY/MLV-OQT0K_4/s1600/ConfigureAppFabric_IndividualSite_Web_AprovalList.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="364" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qdUkKaI/AAAAAAAAGjY/MLV-OQT0K_4/s640/ConfigureAppFabric_IndividualSite_Web_AprovalList.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qWRHFaI/AAAAAAAAGjc/UkP9-z8gxzE/s1600/ConfigureAppFabric_IndividualSite_Web_ApproveReject.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="454" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qWRHFaI/AAAAAAAAGjc/UkP9-z8gxzE/s640/ConfigureAppFabric_IndividualSite_Web_ApproveReject.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Once approved the user will see this message:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qeanh5I/AAAAAAAAGjg/vXfvdEB2xQc/s1600/ConfigureAppFabric_IndividualSite_Web_ApprovalMessage.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="350" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKn7qeanh5I/AAAAAAAAGjg/vXfvdEB2xQc/s640/ConfigureAppFabric_IndividualSite_Web_ApprovalMessage.jpg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The persisted instsance of the workflow will then complete and be automatically removed from the persistence store. (Note: you can set some config to keep completed persisted workflow instances if you prefer).&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;That's all for now. Will add more later.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RuSs&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-6909428739865169451?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/6909428739865169451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-40-hosting-with-appfabric.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6909428739865169451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6909428739865169451'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-40-hosting-with-appfabric.html' title='Workflow 4.0 - Hosting with AppFabric'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKWuy7gkpoI/AAAAAAAAGbY/WOn9O3wIhgw/s72-c/WF+project+Type.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-6444454225065545471</id><published>2010-10-01T19:28:00.071+10:00</published><updated>2010-10-05T20:45:39.150+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workflow 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='AppFabric'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.0'/><title type='text'>Workflow 4.0 a brief overview</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;This is a very simple post about my recent findings on using workflow 4.0 (WF 4.0). I build a simple WF which managed expense approval.&lt;/span&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://draft.blogger.com/goog_793098390"&gt;&lt;img border="0" height="480" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKWsS7NT2EI/AAAAAAAAGa0/I-JLlDVB5HI/s640/Server+Info.JPG" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Server Specs&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Windows server 2008 R2 standard (Virtual server with 4gigs RAM)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Components&lt;/b&gt;:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Visual Studio 2010&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;SQL 2008&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;IIS and Appfabric&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Technologies&lt;/b&gt;:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Visual Studio 2010&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Workflow 4.0&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Entity Framework 4.0&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Linq&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;SQL 2008&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;IIS&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;AppFabric&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;SMTP&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Initial setup steps:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Install Visual Studio 2010 Professional&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Install appFabric (More on appFabric configuration in a later post hopefully)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Setup monitoring and persistence (I used the default settings - ie. root web.config in IIS holds settings for any child sites.)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Visual Studio 2010 Development:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I decided that I wanted to try this technology with a useful purpose in mind. It is not a full scale app. but most of the basic building blocks are there.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The app. I build is an expense approval app. using workflow 4.0 (WCF Workflow Service Application):&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKWuy7gkpoI/AAAAAAAAGbY/WOn9O3wIhgw/s1600/WF+project+Type.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="360" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKWuy7gkpoI/AAAAAAAAGbY/WOn9O3wIhgw/s640/WF+project+Type.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;This project allows you to build a workflow and expose it as a WCF service. I ended up at this decision as I started developing workflow using System.Activities.WorkflowApplication. This worked well until I tried to use a delay timer in my WF. I was persisting my workflow successfully but after the expected time period for my timer had elapsed, the workflow was still "asleep" in my persistence store.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Following this I hunted the web for a better soln. I didn't necessarily need a delay timer for anything at this stage but, because the WF was unusable with a delay timer I thought I should keep hunting for a better solution. I came across loads of posts (some wrong, some out of date - this was very frustrating).&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I decided to try and use the WorkflowServiceHost (http://msdn.microsoft.com/en-us/library/system.servicemodel.workflowservicehost.aspx) as it says on the "tin" that this will manage the re-hydration of my workflows from the persistence store.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I can't remember where I got to with the WorkflowServiceHost but in the end after I posted a question on this post:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/ebfa7571-9879-4b0c-93ff-0134764262f7"&gt;http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/ebfa7571-9879-4b0c-93ff-0134764262f7&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;and Stuart pointed me in the right direction I moved to my current, as mentioned above, setup.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;This being windows server 2008 R2 with full appFabric monitoring and persistence installed. I thought, why try and reinvent the wheel when this great infrastructure is provided more or less out of the box.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So, back to the actual workflow development. Here is an overall picture of my workflow. It needs refactoring but i'll plonk it here for now and come back to it later. (Certain parts, like the duplication in the parallel activity need refactoring).&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKW1H7D0T1I/AAAAAAAAGb4/HvmETv2cW-o/s1600/WorkflowService.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKW1H7D0T1I/AAAAAAAAGb4/HvmETv2cW-o/s640/WorkflowService.jpg" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Note&lt;/b&gt;: I wont be going into to much the detail with regard to my code as i'd rather explain the steps taken and a higher level.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The workflow receives an ExpenseRequest. If amount of this ExpenseRequest is under £100 the expense gets auto approved and the expense submitter is notified.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;If the expense is over £100 a notification is sent to a manager for approval. If said manager does not action this request within a period of time the workflow re-hydrates from the persistence store and reminds the manager.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I tested this re-hydration (with my WF hosted bty AppFabric but submitting an expense for over £100 and letting the expense notification reach the manager (Note: the delay activity for the reminder was set to 10 minutes at this point)).&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I then rebooted the server and waited the remainder of time that the delay timer required.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;After the timer was due to expire the workflow came alive and sent the reminder to the manager. Good times!!&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So anyway, The workflow "code" functions correctly. Some points about it that I will point out are.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;The workflow (workflow as a Wcf service hosted in AppFabric (IIS)) is consumed by 3 clients:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;One is a console app. that I have just for some initial setup testing.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The second is a windows forms client that is used to submit the expense request.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The third is a web app. that is used to approve or reject the expense.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Note&lt;/b&gt;: the manager links to the web app. from a link in the Smtp email that the workflow sends out.&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKW1xCkVuhI/AAAAAAAAGcA/wNjrGzsqIig/s1600/SolnFiles.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="370" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKW1xCkVuhI/AAAAAAAAGcA/wNjrGzsqIig/s640/SolnFiles.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;If you right click on the workflow ExpenseService.xalmx file and select "view in browser" you can see the Wcf definition and Wsdl for your workflow. This is good to know as we now know we can definitely host our workflow in IIS / AppFabric. More good times!!&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKW6CEmkXDI/AAAAAAAAGcI/B-QG2PlW7pE/s1600/ViewServiceInBrowser.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="232" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKW6CEmkXDI/AAAAAAAAGcI/B-QG2PlW7pE/s640/ViewServiceInBrowser.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;In my clients I added a service reference to my Workflow .xamlx service. Here are the steps to to this:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Note:&amp;nbsp;&lt;/b&gt;that I selected to "generate asynchronous operations" as I dont want my client apps. to hang around waiting for a "long running process" to complete when all I really care about is whether my ExpenseRequest was sent correctly.&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKW7GwV8r3I/AAAAAAAAGcQ/r4B-b4lraN0/s1600/configureServiceMenu.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKW7GwV8r3I/AAAAAAAAGcQ/r4B-b4lraN0/s640/configureServiceMenu.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKW7NcFKfpI/AAAAAAAAGcY/dnNXUvqt9a4/s1600/configureServiceAsync.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="584" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKW7NcFKfpI/AAAAAAAAGcY/dnNXUvqt9a4/s640/configureServiceAsync.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Once I have my xamlx service referenced in my client apps. I need to write some code to instantiate it. first of all I need these lines:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;private static ExpenseServiceClient client = new ExpenseServiceClient();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;request.Expense = new Expense();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;request.Expense.Amount =200;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;request.Expense.Title = "";&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;client.BeginSubmitExpense(request, OnStartCompleted, null);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;As I said, I am doing this asyc so I only care that my request was successful. Do be sure of this I subscribe to the IAsyncResult.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;The code looks like this:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;SubmitExpenseResponse result = (SubmitExpenseResponse)client.EndSubmitExpense(asr);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;Within the method that waits for the IAsyncResult I have some try catches.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;catch (CommunicationException)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;catch (TimeoutException)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;catch (Exception)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I can then decided what do in my client app. when something goes wrong.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;You can probably see in my workflow that there are some custom activities like:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;AutoScreenExpense, NotifyExpenseSubmitter, RequestManagerAction, SaveExpense, UpdateExpense. These are my own activities that inplement System.Activities.CodeActivity. AutoScreenExpense is a flowchart xaml workflow that I have built that just takes are of the £100 limit decision mentioed earlier.&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKW-4ORTrsI/AAAAAAAAGcg/WWpwy96OuC0/s1600/CustomActivitiesInToolBox.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="202" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKW-4ORTrsI/AAAAAAAAGcg/WWpwy96OuC0/s640/CustomActivitiesInToolBox.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;After you build your custom activities they will appear in the toolbox.&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKW_N34y3jI/AAAAAAAAGcw/T-EHhbxToX0/s1600/AutoScreenExpense.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="344" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKW_N34y3jI/AAAAAAAAGcw/T-EHhbxToX0/s640/AutoScreenExpense.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;AutoScreenExpense&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;is a separate workflow that I have exposed as a custom activity inside the ExpenseService.xamlx workflow. Nice!To write a code based activity you can either implement System.Activities.CodeActivity or System.Activity.NativeActivity.As you can see I implement CodeActivity. Also note that this activity has a public InArgument which is the ExpenseRequest coming into the activity. the expenserequest is then mapped to my Entity Framework 4.0 entity and then saved and a response is sent back to the workflow.&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKXAFqcLxII/AAAAAAAAGc4/pm6Ym4BxRoE/s1600/CodeActivityCode.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="416" src="http://4.bp.blogspot.com/_M8Gn3CMAmQQ/TKXAFqcLxII/AAAAAAAAGc4/pm6Ym4BxRoE/s640/CodeActivityCode.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Another thing I nearly forgot is that the way to get data into and throught a workflow is to use arguements or variables. In this case, I think because I have used a xamlx project type, I only have access to variables as follows:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKXA7yYvnQI/AAAAAAAAGdA/_u5udkbm-1s/s1600/Variables.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="188" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKXA7yYvnQI/AAAAAAAAGdA/_u5udkbm-1s/s640/Variables.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;you can see my ExpenseRequest variable another one for response and a boolean that is used internally by my workflow. Also, I have an ExpenseIDHandle that is used for correlation so that the workflow know which instance of a workflow to work with when a caller asks it to do something.&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKXDaP8QCpI/AAAAAAAAGdQ/lf8xHHxAN54/s1600/model.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="218" src="http://3.bp.blogspot.com/_M8Gn3CMAmQQ/TKXDaP8QCpI/AAAAAAAAGdQ/lf8xHHxAN54/s640/model.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;I mentioned that I am using Entity Framework 4.0 to manage my database updates. I have a couple of tables in an SQL 2008 database. One holds the record of the expense to be approved and the other is just a lookup table:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Obviously this is not very fancy but I plan on building on it later.&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKXEYA_9kBI/AAAAAAAAGdg/l4_YDH12JNA/s1600/EntitySave.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="278" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKXEYA_9kBI/AAAAAAAAGdg/l4_YDH12JNA/s640/EntitySave.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;So now I have a workflow that I can host in IIS and AppFabric. In my next post I will do this.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Over and out!!&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;RuSs&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Ps. If I have got anything wrong here please let me know&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-6444454225065545471?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/6444454225065545471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-40-sample-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6444454225065545471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6444454225065545471'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2010/10/workflow-40-sample-development.html' title='Workflow 4.0 a brief overview'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_M8Gn3CMAmQQ/TKWsS7NT2EI/AAAAAAAAGa0/I-JLlDVB5HI/s72-c/Server+Info.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-3680198308301529513</id><published>2009-04-07T18:47:00.005+10:00</published><updated>2010-10-20T00:23:10.844+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><title type='text'>Building queries for working with Folders</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Credit to:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://sharepointmagazine.net/technical/development/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;http://sharepointmagazine.net/technical/development/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt; for this info.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;------&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;A first variant I will explain is how you can work with folders and sub folders. A folder is a special list item on a list or document library. If you execute a standard CAML query you will end up with list items from the root folder.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;If you want to query all folders and sub folders of a list or document library, you have to define extra query options. If you are working with the object model you have to set the ViewAttributes property of the SPQuery object as follows:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;qry.ViewAttributes = "Scope='Recursive'";&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;If you work with GetListItems method of the Lists.asmx SharePoint web service, you have to define an extra node with the QueryOptions element:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;XmlNode queryOptionsNode = camlDocument.CreateElement("QueryOptions");&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;queryOptionsNode.InnerXml = "&lt;/span&gt;&lt;viewattributes scope="\&amp;quot;Recursive\&amp;quot;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;";&lt;br /&gt;&lt;br /&gt;If you want to query a specific sub folder using the SPQuery object, you have to set the Folder property:&lt;br /&gt;&lt;br /&gt;qry.Folder = list.ParentWeb.GetFolder("Folders DocLib/2008");&lt;br /&gt;&lt;br /&gt;When working with the web services you have to do the following:&lt;br /&gt;&lt;br /&gt;XmlNode queryOptionsNode = camlDocument.CreateElement("QueryOptions");&lt;br /&gt;&lt;br /&gt;queryOptionsNode.InnerXml = "&lt;/span&gt;     &lt;folder&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Folders DocLib/2008&lt;/span&gt;&lt;/folder&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;";&lt;br /&gt;&lt;br /&gt;-----&lt;br /&gt;&lt;br /&gt;So my CAML looked like this:&lt;br /&gt;&amp;lt;Query&amp;gt;&lt;br /&gt;&amp;lt;Where&amp;gt;&amp;lt;Eq&amp;gt;&amp;lt;FieldRef Name='FileLeafRef'/&amp;gt;&amp;lt;Value Type='Text'&amp;gt;testdoc.docx&amp;lt;/Value&amp;gt;&amp;lt;/Eq&amp;gt;&amp;lt;/Where&amp;gt;&lt;br /&gt;&amp;lt;/Query&amp;gt;&lt;br /&gt;&amp;lt;ViewFields&amp;gt;&lt;br /&gt;&amp;lt;FieldRef Name='Title' /&amp;gt;&lt;br /&gt;&amp;lt;/ViewFields&amp;gt;&lt;br /&gt;&amp;lt;QueryOptions&amp;gt;&lt;br /&gt;&amp;lt;Folder&amp;gt;Documents/[002643][Test%20project%20for%20Adam]/[ACPC][126573][1][writeFileAndXmlTest2]&amp;lt;/Folder&amp;gt;&lt;br /&gt;&amp;lt;OptimizeFor&amp;gt;FolderUrls&amp;lt;/OptimizeFor&amp;gt;&lt;br /&gt;&amp;lt;/QueryOptions&amp;gt;&lt;br /&gt;&lt;br /&gt;RuSs&lt;/span&gt;   &lt;/viewattributes&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-3680198308301529513?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/3680198308301529513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2009/04/building-queries-for-working-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3680198308301529513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3680198308301529513'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2009/04/building-queries-for-working-with.html' title='Building queries for working with Folders'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-7722934230236730658</id><published>2009-03-10T21:53:00.007+11:00</published><updated>2009-03-10T22:02:41.813+11:00</updated><title type='text'>DLL Binding Redirect</title><content type='html'>&lt;/br&gt;&lt;br /&gt;We had an issue where an old app was breaking because it was looking for an old version of Microsoft AJAX when we had upgraded to Microsoft AJAX 3.5.&lt;br /&gt;&lt;br /&gt;To quickly get around this issue we did a binging redirect:&lt;br /&gt;&lt;span style="color:red;"&gt; &lt;br /&gt;&amp;lt;dependentAssembly&amp;gt;&lt;br /&gt; &amp;lt;assemblyIdentity name="System.Web.Extensions"  publicKeyToken="31bf3856ad364e35" /&amp;gt;&lt;br /&gt;    &amp;lt;!-- Assembly versions can be redirected in application, publisher policy, or machine configuration files. --&amp;gt;&lt;br /&gt;    &amp;lt;bindingRedirect oldVersion="1.0.61025.0" newVersion="3.5.0.0"/&amp;gt;&lt;br /&gt;    &amp;lt;publisherPolicy apply="no" /&amp;gt;&lt;br /&gt;&amp;lt;/dependentAssembly&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Pretty easy. Although we may move to the machine.config for a more global solution.&lt;br /&gt;&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-7722934230236730658?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/7722934230236730658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2009/03/dll-binding-redirect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/7722934230236730658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/7722934230236730658'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2009/03/dll-binding-redirect.html' title='DLL Binding Redirect'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-2835702801970351720</id><published>2009-03-05T02:18:00.001+11:00</published><updated>2009-03-05T02:20:01.132+11:00</updated><title type='text'>Detect columns and copy a row - t-sql</title><content type='html'>&lt;span style="font-family:verdana;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;This is a way to copy a row in a table without caring whether someone has added new columns.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;USE [TRAM]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;/****** Object:  StoredProcedure [dbo].[COPY_Subleases_2]    Script Date: 03/04/2009 15:16:34 ******/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SET ANSI_NULLS ON&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SET QUOTED_IDENTIFIER ON&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;ALTER PROCEDURE [dbo].[COPY_Subleases_2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;@iSourceTable VARCHAR (150), &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;@lPrintIt INT, &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;@CurrentAssetID INT, &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;@NewAssetID INT, &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;@CurrentsubleaseID INT OUTPUT,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;@executeIt int&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;AS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;BEGIN &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;DECLARE @cName varchar(150)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;DECLARE @lCnt int&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;DECLARE @lColumnList varchar(MAX)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SET NOCOUNT ON;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;-- SET @iSourceTable = 'PropertyAnnualProperty'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;-- SET @lPrintIt = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SET @lColumnList = ''&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;DECLARE _LIST&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;INSENSITIVE SCROLL CURSOR&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;FOR &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SELECT column_name&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;FROM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;information_schema.columns&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;WHERE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;table_name = @iSourceTable AND&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;data_type &lt;&gt; 'timestamp' AND&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;column_name &lt;&gt; 'SubLeaseID' AND&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;column_name &lt;&gt; 'AssetID'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;ORDER BY&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;ordinal_position&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;OPEN _LIST    &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;IF @lPrintIt = 1 print 'Column names returned...' + convert(char(8),@@cursor_rows)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;-- Check for an error&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;IF @@CURSOR_ROWS = 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    GOTO Done_Loop_LIST&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;END&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;-- Grab the first record&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;FETCH FIRST FROM _LIST&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;INTO @cName&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SELECT @lCnt = 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Loop_LIST:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    SELECT @lCnt = @lCnt + 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    SELECT @lColumnList = @lColumnList + '[' + @cName + '],'  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;FETCH NEXT FROM _LIST&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;INTO @cName&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;-- Any more ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;IF @@FETCH_STATUS != -1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    GOTO Loop_LIST&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;END&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Done_Loop_LIST:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;DEALLOCATE _LIST&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;-- Remove the trailing ','&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;print '@lColumnList: ' + convert(varchar(MAX), @lColumnList)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SELECT @lColumnList = substring(@lColumnList,1,datalength(@lColumnList)-1)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;IF @lPrintIt = 1 PRINT @lColumnList&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;DECLARE @stm varchar(MAX)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SET @stm = 'INSERT INTO ' + @iSourceTable + ' (AssetId, ' + @lColumnList + ') SELECT ' + Convert(varchar(10), @NewAssetID) + ', ' + @lColumnList + ' from ' + @iSourceTable +&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;' where assetid = ' + Convert(varchar(10), @CurrentAssetID)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;PRINT @stm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;IF(@executeIt = 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    EXEC(@STM)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;END&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SELECT @CurrentsubleaseID = @@identity&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-2835702801970351720?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/2835702801970351720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2009/03/detect-columns-and-copy-row-t-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2835702801970351720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2835702801970351720'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2009/03/detect-columns-and-copy-row-t-sql.html' title='Detect columns and copy a row - t-sql'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-1367112682890607411</id><published>2009-02-04T01:51:00.006+11:00</published><updated>2009-02-04T01:55:19.757+11:00</updated><title type='text'>Cant Install Message Queuing</title><content type='html'>&lt;/br&gt;&lt;br /&gt;I get an error everytime i install message queing "MSMQ cannot be started error 0x42c dependency service or group failed to start"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;I fixed it by doing this:&lt;/span&gt;&lt;br /&gt;start cmd prompt&lt;br /&gt;net stop msdtc&lt;br /&gt;msdtc -uninstall&lt;br /&gt;msdtc - install&lt;br /&gt;net start msdtc&lt;br /&gt;&lt;br /&gt;Then I reinstalled MSMQ and it worked.&lt;br /&gt;&lt;br /&gt;RuSs&lt;br /&gt;&lt;/br&gt;&lt;br /&gt;&lt;/br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-1367112682890607411?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/1367112682890607411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2009/02/cant-install-message-queuing.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1367112682890607411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1367112682890607411'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2009/02/cant-install-message-queuing.html' title='Cant Install Message Queuing'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-6878598113118296831</id><published>2009-01-28T03:06:00.001+11:00</published><updated>2009-01-28T03:08:51.389+11:00</updated><title type='text'>'Sys' is undefined</title><content type='html'>&lt;/br&gt;&lt;br /&gt;Things are missing from your web.config.&lt;br /&gt;&lt;br /&gt;Look at:&lt;br /&gt;&amp;lt;add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&amp;gt;&lt;br /&gt;&lt;br /&gt;under &amp;lt;httpHandlers&amp;gt; (this is the new one)&lt;br /&gt;&amp;lt;add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/&amp;gt;&lt;br /&gt;&lt;br /&gt;RuSs&lt;br /&gt;&lt;/br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-6878598113118296831?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/6878598113118296831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2009/01/sys-is-undefined.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6878598113118296831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6878598113118296831'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2009/01/sys-is-undefined.html' title='&apos;Sys&apos; is undefined'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-8137703422754016082</id><published>2009-01-23T22:28:00.006+11:00</published><updated>2009-01-23T22:55:29.164+11:00</updated><title type='text'>Sharepoint web service and HTTP 401.1 - Unauthorized: Logon Failed</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;Hello all,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Well, I just spent 3 weeks on this issue and it has been the most frustrating time. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;I built a SharePoint workflow that was tested on our development server. I then started to deploy it to our TEST server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;The deployment process was easy and I expected it to be up and running in a couple of hours.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Note: The TEST SharePoint server had Kerberos on it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;So when I started a workflow running I realised that all the endpoints that were talking to the builtin SharePoint web services failed with various security errors. Ititally I realised that all my endpoint and binding settings needed to be converted for the Kerberos environment so I began setting up everything for Kerberos.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Ie.. using setspn to create SPNs etc..&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Did all this and using System.Diagnostics and the trace I could see I was getting somewhere but getting what I thought were Kerberos errors.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Remember that I was using WCF that was wrapped around (old fashioned) SharePoint web services.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Anyway, spent too long on this so it was decided that I should forget WCF and use old fashioned web services as I really had no need for all the functionality and security of WCF as the data being passed was internal and then not that important.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;So I changed everything to old fashioned web services assuming that this would "just work".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Then I deployed and started getting 401.1 errors. (&lt;/span&gt;&lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;HTTP 401.1 - Unauthorized: Logon Failed&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;)&lt;br /&gt;&lt;br /&gt;I could not get around these errors. I checked everything from Sharepoint list access, app pool accounts in IIS... etc....&lt;br /&gt;&lt;br /&gt;Then I tried talking from my DEV server's old fashion webservices to my TEST server's Sharepoint web service and it worked. WEIRD.&lt;br /&gt;&lt;br /&gt;So at this point I could talk from a remote client to the TEST server but not from the TEST server to the TEST server. Grrrr.&lt;br /&gt;&lt;br /&gt;Another few days went past and my boss stumbled apon this link:&lt;br /&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;896861"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;896861&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Notes from the link:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Symptoms:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(204, 0, 0);font-size:85%;" &gt;When you use the fully qualified domain name (FQDN) or a custom host header to browse a local Web site that is hosted on a computer that is running Microsoft Internet Information Services (IIS) 5.1 or IIS 6, you may receive an error message that resembles the following:&lt;/span&gt;&lt;div style="color: rgb(204, 0, 0);" class="kb_errormsgbody"&gt;&lt;div class="kb_errorcontent"&gt;&lt;div class="errormsg"&gt;&lt;span style="font-size:85%;"&gt;HTTP 401.1 - Unauthorized: Logon Failed&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style="color: rgb(204, 0, 0);font-size:85%;" &gt;This issue occurs when the Web site uses Integrated Authentication and has a  name that is mapped to the local loopback address.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt; &lt;span style="font-style: italic;"&gt;You only receive this error message if you try to browse the Web site directly on the server. If you browse the Web site from a client computer, the Web site works as expected.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;Cause:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);font-size:85%;" &gt;This issue occurs if you install Microsoft Windows XP Service Pack 2 (SP2) or Microsoft Windows Server 2003 Service Pack 1 (SP1). Windows XP SP2 and Windows Server 2003 SP1 include a loopback check security feature that is designed to &lt;span style="font-weight: bold;"&gt;help prevent reflection attacks on your computer&lt;/span&gt;. Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;Resolution:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;h3  style="color: rgb(204, 0, 0);font-family:trebuchet ms;" id="tocHeadRef"&gt;&lt;span style="font-size:85%;"&gt;Method 1: Disable the loopback chec &lt;/span&gt;&lt;/h3&gt;&lt;script type="text/javascript"&gt;         loadTOCNode(2, 'workaround');       &lt;/script&gt;&lt;span style="color: rgb(204, 0, 0);font-family:trebuchet ms;font-size:85%;"  &gt;Follow these steps:&lt;/span&gt;&lt;ol  style="color: rgb(204, 0, 0);font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Click &lt;strong class="uiterm"&gt;Start&lt;/strong&gt;, click &lt;strong class="uiterm"&gt;Run&lt;/strong&gt;, type &lt;span class="userInput"&gt;regedit&lt;/span&gt;, and then click &lt;strong class="uiterm"&gt;OK&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;In Registry Editor, locate and then click the following registry key: &lt;/span&gt;&lt;div class="indent"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong class="uiterm"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Right-click &lt;strong class="uiterm"&gt;Lsa&lt;/strong&gt;, point to &lt;strong class="uiterm"&gt;New&lt;/strong&gt;, and then click &lt;strong class="uiterm"&gt;DWORD Value&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Type &lt;span class="userInput"&gt;DisableLoopbackCheck&lt;/span&gt;, and then press ENTER.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Right-click &lt;strong class="uiterm"&gt;DisableLoopbackCheck&lt;/strong&gt;, and then click &lt;strong class="uiterm"&gt;Modify&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;In the &lt;strong class="uiterm"&gt;Value data&lt;/strong&gt; box, type &lt;span class="userInput"&gt;1&lt;/span&gt;, and then click &lt;strong class="uiterm"&gt;OK&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Quit Registry Editor, and then restart your computer.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3  style="color: rgb(204, 0, 0);font-family:trebuchet ms;" id="tocHeadRef"&gt;&lt;span style="font-size:85%;"&gt;Method 2: Specify host names&lt;/span&gt;&lt;/h3&gt;&lt;script type="text/javascript"&gt;         loadTOCNode(2, 'workaround');       &lt;/script&gt;&lt;span style="color: rgb(204, 0, 0);font-family:trebuchet ms;font-size:85%;"  &gt;To specify the host names that are mapped to the loopback address and can connect to Web sites on your computer, follow these steps:&lt;/span&gt;&lt;ol  style="color: rgb(204, 0, 0);font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Click &lt;strong class="uiterm"&gt;Start&lt;/strong&gt;, click &lt;strong class="uiterm"&gt;Run&lt;/strong&gt;, type &lt;span class="userInput"&gt;regedit&lt;/span&gt;, and then click &lt;strong class="uiterm"&gt;OK&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;In Registry Editor, locate and then click the following registry key: &lt;/span&gt;&lt;div class="indent"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong class="uiterm"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Right-click &lt;strong class="uiterm"&gt;MSV1_0&lt;/strong&gt;, point to &lt;strong class="uiterm"&gt;New&lt;/strong&gt;, and then click &lt;strong class="uiterm"&gt;Multi-String Value&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Type &lt;span class="userInput"&gt;BackConnectionHostNames&lt;/span&gt;, and then press ENTER.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Right-click &lt;strong class="uiterm"&gt;BackConnectionHostNames&lt;/strong&gt;, and then click &lt;strong class="uiterm"&gt;Modify&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;In the &lt;strong class="uiterm"&gt;Value data&lt;/strong&gt; box, type the host name or the host names for the sites that are on the local  computer, and then click &lt;strong class="uiterm"&gt;OK&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Quit Registry Editor, and then restart the IISAdmin service.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;I chose method 1 and then rebooted and everything just started to work.&lt;br /&gt;BUT, what a nightmare 3 weeks I had.&lt;br /&gt;&lt;br /&gt;To summarize. I registry hack needed to be done to make server1 to server1 calls.&lt;br /&gt;Whilst this was there to stop attacks on the server, I am still very annoyed that it took so long to find the solution and we only found it by accident.&lt;br /&gt;&lt;br /&gt;Just wondering if anyone else has had the similar issue?&lt;br /&gt;&lt;br /&gt;I am assuming that now, if I could be bother, I could go back to using Kerberos and things would probably work.&lt;br /&gt;&lt;br /&gt;Grrrrrrrrrr!&lt;br /&gt;&lt;br /&gt;thanks&lt;br /&gt;RuSs&lt;br /&gt;&lt;/br&gt;&lt;br /&gt;&lt;/br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-8137703422754016082?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/8137703422754016082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2009/01/sharepoint-web-service-and-http-4011.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/8137703422754016082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/8137703422754016082'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2009/01/sharepoint-web-service-and-http-4011.html' title='Sharepoint web service and HTTP 401.1 - Unauthorized: Logon Failed'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-2164650003941837987</id><published>2008-12-09T21:17:00.006+11:00</published><updated>2008-12-09T21:21:35.722+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='t-sql'/><category scheme='http://www.blogger.com/atom/ns#' term='sql2008'/><category scheme='http://www.blogger.com/atom/ns#' term='sql2005'/><title type='text'>Reconnect an SQL login to a user</title><content type='html'>Sometimes a user in a database gets disconnected from a server login and you can re-map the login to the database as the user is already there.&lt;br /&gt;&lt;br /&gt;This usually happens after you restore a database to a server.&lt;br /&gt;&lt;br /&gt;So the following gived you a report of all the disconnected users:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;sp_change_users_login report&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And this remaps a login(tramdba(server login)) to a user(tramdba(user))&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;sp_change_users_login update_one,tramdba,tramdba&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;thanks&lt;br /&gt;&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-2164650003941837987?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/2164650003941837987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/12/reconnect-sql-login-to-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2164650003941837987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2164650003941837987'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/12/reconnect-sql-login-to-user.html' title='Reconnect an SQL login to a user'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-8637486729747160517</id><published>2008-12-04T00:17:00.002+11:00</published><updated>2008-12-04T01:29:01.304+11:00</updated><title type='text'>Batch Deleting in T-SQL</title><content type='html'>&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;DECLARE @BatchSize int &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;DECLARE @Rows int&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SET @Rows = 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SET @BatchSize = 100000 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;WHILE (@Rows &gt; 0)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;delete TOP (@BatchSize) FROM PropertyMonthProperty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;from PropertyMonthProperty PMP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;inner join Property P&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;PMP.propertyid = P.propertyid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;where&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;p.scenarioid = 14149&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;SET @Rows = @@ROWCOUNT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;END&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-8637486729747160517?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/8637486729747160517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/12/batch-deleting-in-t-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/8637486729747160517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/8637486729747160517'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/12/batch-deleting-in-t-sql.html' title='Batch Deleting in T-SQL'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4139809096282105543</id><published>2008-12-03T23:36:00.008+11:00</published><updated>2008-12-03T23:38:39.893+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='datetime'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='convert'/><title type='text'>Convert a c# datetime to the XML format</title><content type='html'>&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;XmlConvert.ToString(DateTime.Now, "yyyy-MM-ddTHH:mm:ss")&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4139809096282105543?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4139809096282105543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/12/concert-c-datatime-to-xml-format.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4139809096282105543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4139809096282105543'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/12/concert-c-datatime-to-xml-format.html' title='Convert a c# datetime to the XML format'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-518528710736818248</id><published>2008-12-03T23:31:00.002+11:00</published><updated>2008-12-03T23:33:11.333+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='t-sql'/><category scheme='http://www.blogger.com/atom/ns#' term='sql2008'/><category scheme='http://www.blogger.com/atom/ns#' term='sql2005'/><title type='text'>Getting all the column names in a table</title><content type='html'>&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;SELECT COLUMN_NAME from information_schema.columns WHERE TABLE_NAME = 'table name'&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-518528710736818248?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/518528710736818248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/12/getting-all-column-names-in-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/518528710736818248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/518528710736818248'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/12/getting-all-column-names-in-table.html' title='Getting all the column names in a table'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-5828516843515657004</id><published>2008-11-26T22:24:00.001+11:00</published><updated>2008-11-26T22:24:48.306+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='TFS'/><title type='text'>Branching in TFS</title><content type='html'>&lt;div style="font-family: verdana;" class="messageData"&gt;&lt;p&gt;Ahhh... I think I know what you're running into.&lt;/p&gt; &lt;p&gt;Are you getting "The target item $/foo/sub cannot be under the source item $/foo"?&lt;/p&gt; &lt;p&gt;Basically, we don't allow you to branch everything in a folder to a subfolder of itself. The branch itself would work, but subsequent merges would get...messy.&lt;/p&gt; &lt;p&gt;The way to deal with this is to create a single top-level folder directly under your team project (so, if your Team Project is "foo", put all of your source in something like "$/foo/Main"); then, if you need multiple branches within the team project, you can branch $/foo/Main to $/foo/a, or $/foo/a to $/foo/a.1, etc.&lt;/p&gt; &lt;p&gt;Let me know if that will work for you or not; or especially if you're seeing some other error when you attempt your branch.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-5828516843515657004?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/5828516843515657004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/11/branching-in-tfs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5828516843515657004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5828516843515657004'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/11/branching-in-tfs.html' title='Branching in TFS'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-250248590872326209</id><published>2008-11-20T21:38:00.009+11:00</published><updated>2008-11-20T23:36:56.128+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Workflow'/><title type='text'>Top ten things that waste my time in Windows Workflow</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;The reason for this list is I keep running into dodgy issues and keep spending time on them only to remember I had the same issue from 6 months ago (this list is for my personal use so I appologise if it doesnt not seem clear, it's just to jog my memory!):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;ol  style="font-family:trebuchet ms;"&gt;&lt;li&gt;I suffer compile hell and then I remember that IIS caches my DLLs in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\&lt;span style="font-weight: bold;font-family:verdana;" &gt;Temporary ASP.NET Files&lt;/span&gt; for my WCF service. I try everything and then I remember this after throwing my laptop against the wall. I recommend restarting IIS and delelting &lt;span style="font-weight: bold;font-family:verdana;" &gt;Temporary ASP.NET Files&lt;/span&gt; every time you recompile. I just dont trust what is being cached.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Some of my DLLs may be set, by default, to copy local so the GAC doesnt get updated and I cant figure out what is going on.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Always remember to separate each bit of functionality into separate projects. If you have it all in 1 project then VS 2008 parses the whole workflow every time and this takes ages.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Work on a machine with loads  of power, when I changed machines from a blade to a super dooper machine by development time increased by and 10*. Also, to deploy  to Sharepoint rime decreased from about 40 seconds to about 6 sencinds..NICE!!!&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Always remember to do an "UPDATE SERVICE REFERENCE" on your WCF refs. It seems theses do not get updated sometimes and this caused datatype errors with little red errors in your workflow. This is also related to point 1 above (&lt;span style="font-weight: bold;font-family:verdana;" &gt;Temporary ASP.NET Files&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Because workflow is so complex I recommend writing unit test on every layer other wise you will spend too long looking for issues in one layer when they could be raised elsewhere.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If you change a SN.KEY file your Public key token changes. Pretty obvious but spend ages thinking I had another issue.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Dont forget to map dependency activities declaratively to child activities. This is the most trustworthy way of passing data / properties between activities.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If you get the designer cant load type errors that give you no info what so ever firstly do IIS reset, then delete &lt;span style="font-weight: bold;font-family:verdana;" &gt;Temporary ASP.NET Files &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;then restart visual &lt;/span&gt;studio. Then recompile the repen the WF design surface. (sounds like over kill but worth the effort I reckon)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Was having DLL hell and then I ran a visual studio CLEAN command on my Solution  and the DLL hell went away.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-250248590872326209?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/250248590872326209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/11/top-ten-things-that-waste-my-time-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/250248590872326209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/250248590872326209'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/11/top-ten-things-that-waste-my-time-in.html' title='Top ten things that waste my time in Windows Workflow'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-3221997114753245755</id><published>2008-11-19T19:23:00.007+11:00</published><updated>2008-11-19T19:26:41.503+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio 2008'/><title type='text'>Workflow Public Key Tokens</title><content type='html'>&lt;/br&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;Sharepoint workflow assemblies must be strongly named.  The feature installation requires that you indicate the publick key token for the workflow assembly.  There are a number of hoops one can jump through in order to obtain this public key.  Here's some I've heard today:&lt;br /&gt;&lt;br /&gt;* Drag the built assembly into the GAC, browse to the GAC, copy and paste the public key token from the explorer window;&lt;br /&gt;* Drop to a command prompt, browse to the SDK/Bin directory, use the SN.EXE command line tool to retrieve the public key token, copy all the contents of the command window into notepad, find the public key entry, copy and paste into your xml file&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;You can be a lazy programmer like me and simply take the following steps:&lt;br /&gt;&lt;br /&gt;* In Visual Studio&lt;br /&gt;* Tools/External Tools&lt;br /&gt;* Title: Get Public Key; Command: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe; Arguments: -Tp "$(TargetPath)"; use Output Window&lt;br /&gt;&lt;br /&gt;Now you'll have an option on your Tools menu called "Get Public Key."  Simply build your strongly named assembly, select Tools/Get Public Key and in the output window you'll be presented with the public key token, simply copy and paste... wala lazy programming shortcut.&lt;br /&gt;&lt;br /&gt;this is from: &lt;br /&gt;&lt;a href="http://blogs.officezealot.com/jkremer/archive/2007/01/17/20075.aspx"&gt;http://blogs.officezealot.com/jkremer/archive/2007/01/17/20075.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;RuSs&lt;br /&gt;&lt;br /&gt;&lt;/br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-3221997114753245755?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/3221997114753245755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/11/workflow-public-key-tokens-sharepoint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3221997114753245755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3221997114753245755'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/11/workflow-public-key-tokens-sharepoint.html' title='Workflow Public Key Tokens'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-569881213963173695</id><published>2008-10-29T21:47:00.006+11:00</published><updated>2008-11-25T22:05:07.763+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='query'/><category scheme='http://www.blogger.com/atom/ns#' term='sql2005'/><title type='text'>Add columns to t-sql table</title><content type='html'>&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ALTER TABLE&lt;/span&gt; ModelDataByID&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ADD&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;A_DebtFeesRate &lt;span style="color: rgb(51, 51, 255);"&gt;   decimal&lt;/span&gt;(11, 2)    NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;A_CcaFeesRa&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;   decimal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;te (11, 2)    NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;A_ExchangeDate &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;   decimal &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;A_ConditionalDate &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;   decimal &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;A_CompletionDate &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;   decimal&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; NULL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;ALTER TABLE [User] ALTER COLUMN Internal_External varchar (20);&lt;br /&gt;&lt;br /&gt;that's it.&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-569881213963173695?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/569881213963173695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/10/add-columns-to-t-sql-table.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/569881213963173695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/569881213963173695'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/10/add-columns-to-t-sql-table.html' title='Add columns to t-sql table'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4583247302024716547</id><published>2008-10-23T20:08:00.000+11:00</published><updated>2008-10-23T20:10:55.810+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='duplicates'/><category scheme='http://www.blogger.com/atom/ns#' term='query'/><category scheme='http://www.blogger.com/atom/ns#' term='sql2005'/><title type='text'>Finding Duplicates with SQL</title><content type='html'>&lt;pre&gt;&lt;span style="font-family: verdana;"&gt;Info was found here:&lt;br /&gt;&lt;a href="http://www.petefreitag.com/item/169.cfm"&gt;http://www.petefreitag.com/item/169.cfm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here's a handy query for finding duplicates in a table. Suppose you&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;want to find all email addresses in a table that exist more than once:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SELECT email,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;COUNT(email) AS NumOccurrences&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;FROM users&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;GROUP BY email&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;HAVING ( COUNT(email) &gt; 1 )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;You could also use this technique to find rows that occur exactly once:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SELECT email&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;FROM users&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;GROUP BY email&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;HAVING ( COUNT(email) = 1 )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;RuSs&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4583247302024716547?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4583247302024716547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/10/finding-duplicates-with-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4583247302024716547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4583247302024716547'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/10/finding-duplicates-with-sql.html' title='Finding Duplicates with SQL'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4218535280341112726</id><published>2008-10-10T21:07:00.001+11:00</published><updated>2008-10-10T21:09:05.022+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='service pack'/><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><title type='text'>How to install WSS and MOSS SP1</title><content type='html'>&lt;p face="verdana"&gt;Thanks to the Sharepoint farmer's almanac for this:&lt;/p&gt;&lt;p face="verdana"&gt;&lt;a href="http://msmvps.com/blogs/shane/archive/2007/12/14/how-to-install-wss-and-moss-sp1.aspx"&gt;http://msmvps.com/blogs/shane/archive/2007/12/14/how-to-install-wss-and-moss-sp1.aspx&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p face="verdana"&gt;Service Pack 1 for SharePoint is here. The SharePoint Team blog has a great full length article on all of fixes and tweaks. You can read it here &lt;a href="http://blogs.msdn.com/sharepoint/archive/2007/12/11/announcing-the-release-of-wss-3-0-sp1-and-office-sharepoint-server-2007-sp1.aspx"&gt;Announcing the Release of WSS 3.0 SP1 and Office SharePoint Server 2007 SP1&lt;/a&gt;. &lt;/p&gt; &lt;p style="font-family: verdana;"&gt;This post is just meant to give you the easy version of the install instructions. If you have complex scenarios or have issues I highly recommend you read &lt;a href="http://go.microsoft.com/fwlink/?LinkID=105621&amp;amp;clcid=0x409"&gt;&lt;span style="font-size:10;"&gt;Planning and deploying SP1 for Microsoft Office SharePoint Server&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:10;"&gt; instead of my instructions. Cool?&lt;/span&gt; &lt;/p&gt; &lt;p style="font-family: verdana;"&gt;Ok here is my setup that I am about to patch. Server 1 is the SQL 2005 SP2 database box. Server 2 is a Windows Server 2003 SP2 with MOSS 2007 Enterprise installed. I am doing everything on Server 2. I give you run times on the longer parts for reference points. Your times will vary!&lt;span style=";font-size:10;color:black;"  &gt; &lt;/span&gt;&lt;/p&gt; &lt;ol style="font-family: verdana;"&gt;&lt;li&gt;Backup SharePoint! Seriously &lt;a class="" href="http://go.microsoft.com/fwlink/?LinkId=102839&amp;amp;clcid=0x409" target="_blank"&gt;handy little paper here&lt;/a&gt; if you need help. &lt;/li&gt;&lt;li&gt; &lt;div&gt;Download the software you need. For my servers I downloaded the 32 bit editions. You must install BOTH the WSS and MOSS update if you have MOSS installed. &lt;/div&gt; &lt;ol&gt;&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=4191A531-A2E9-45E4-B71E-5B0B17108BD2&amp;amp;displaylang=en"&gt;WSS SP1 downloads&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=AD59175C-AD6A-4027-8C2F-DB25322F791B&amp;amp;displaylang=en"&gt;MOSS SP1 downloads&lt;/a&gt; &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt; &lt;div&gt;Stop the World Wide Web Publishing Services to keep your users off the server. &lt;/div&gt; &lt;ol&gt;&lt;li&gt;Start &gt; Administrative Tools &gt; Services &lt;/li&gt;&lt;li&gt;Scroll to the bottom of the list, click World Wide Web Publishing Service &lt;/li&gt;&lt;li&gt;Click the Stop button &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt; &lt;div&gt;Install the Windows SharePoint Services Service Pack (total time less than 2 minutes) &lt;/div&gt; &lt;ol&gt;&lt;li&gt;Find the downloaded file. For me this was wssv3sp1-kb936988-x86-fullfile-en-us.exe &lt;/li&gt;&lt;li&gt;Double click to run the file &lt;/li&gt;&lt;li&gt;Read the license terms, click accept &lt;/li&gt;&lt;li&gt;Click continue &lt;/li&gt;&lt;li&gt;At the reminder message click OK &lt;/li&gt;&lt;li&gt;Now it starts processing the update. &lt;/li&gt;&lt;li&gt;At the installation complete message click OK &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;Now if you have just WSS skip to step 8 &lt;/li&gt;&lt;li&gt;If the configuration wizard opens close it. &lt;/li&gt;&lt;li&gt; &lt;div&gt;Install the MOSS update (total time less than 2 minutes) &lt;/div&gt; &lt;ol&gt;&lt;li&gt;Find the downloaded file. For me this was officeserver2007sp1-kb936984-x86-fullfile-en-us.exe &lt;/li&gt;&lt;li&gt;Double click to run the file &lt;/li&gt;&lt;li&gt;Read the license terms, click accept &lt;/li&gt;&lt;li&gt;Click continue &lt;/li&gt;&lt;li&gt;At the reminder message click OK &lt;/li&gt;&lt;li&gt;Now the update processes… &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt; &lt;div&gt;Run SharePoint Configuration Wizard (15 minutes) &lt;/div&gt; &lt;ol&gt;&lt;li&gt;Start &gt; All Programs &gt; Microsoft Office Server &gt; SharePoint Product and Technologies Configuration Wizard &lt;/li&gt;&lt;li&gt;Click Next at the Welcome screen &lt;/li&gt;&lt;li&gt;Click Yes at the warning about restarting services &lt;/li&gt;&lt;li&gt;Click Next at the Completing the SharePoint Product and Technologies Configuration Wizard &lt;/li&gt;&lt;li&gt;Your server is now processing step 1 &lt;/li&gt;&lt;li&gt; &lt;div&gt;You will be prompted to now install the updates on other servers in your farm. Click OK since you only have 1 SharePoint server. &lt;/div&gt; &lt;ol&gt;&lt;li&gt;NOTE: If you did have multiple servers you would repeat all of the above steps on each of those servers before moving on. Also, if you are wondering you should probably start with the server that host central admin. &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;Now your server is processing steps 2 through 9. &lt;/li&gt;&lt;li&gt;Speaking of step 8 it took my server approximately 13 minutes to process 4.4 GB of content. I am sure your times will vary. Just don't panic on this step if it takes a while. It is essentially touching all of your content. &lt;/li&gt;&lt;li&gt;At Configuration Successful click Finish &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt; &lt;div&gt;Check out Central Admin &lt;/div&gt; &lt;ol&gt;&lt;li&gt;Restart the World Wide Web Publishing service you stopped in step 2. If you had to reboot this is not necessary. &lt;/li&gt;&lt;li&gt;Click Operations tab &lt;/li&gt;&lt;li&gt;Under Topologies and Services click Servers in farm &lt;/li&gt;&lt;li&gt;Next to your server you should see Version 12.0.0.6219 not 12.0.0.4518. If you do you should be good to go. &lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p style="font-family: verdana;"&gt;That is it. :) &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4218535280341112726?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4218535280341112726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/10/how-to-install-wss-and-moss-sp1.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4218535280341112726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4218535280341112726'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/10/how-to-install-wss-and-moss-sp1.html' title='How to install WSS and MOSS SP1'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-2396065830323805457</id><published>2008-10-10T18:26:00.005+11:00</published><updated>2008-10-10T18:30:08.282+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Workflow'/><title type='text'>Seeing decent error messages in Sharepoint</title><content type='html'>&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;I dont know about anyone else but I am sick of seeing:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;font-family:verdana;" &gt;"An error has occurred"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;in Sharepoint then having to look in the logs to see what the error is.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;I just found out that if you set &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;CallStack="true"&lt;/span&gt; in the relevant sites web.config you get the error on the screen. How easy is that!!!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I knew this already but you can also turn on tracing which will provide lots more info.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;RuSs&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-2396065830323805457?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/2396065830323805457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/10/seeing-decent-error-messages-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2396065830323805457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2396065830323805457'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/10/seeing-decent-error-messages-in.html' title='Seeing decent error messages in Sharepoint'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4314516067163748725</id><published>2008-10-09T21:33:00.002+11:00</published><updated>2008-10-09T21:41:05.518+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='delete'/><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server'/><category scheme='http://www.blogger.com/atom/ns#' term='command line'/><title type='text'>How do delete a TFS team project</title><content type='html'>open visual Studio 2008 command prompt from&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;START &gt; Programs &gt; VS 2008 &gt; VS tools &gt; VS Command Prompt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;enter:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0); font-weight: bold;"&gt;tfsDeleteProject /force /server:TLONDEV002 "MSDN Calc v2"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;You will get the following info and it may take a few minutes:&lt;/span&gt;&lt;br /&gt;E:\Program Files\Microsoft Visual Studio 9.0\VC&gt;tfsDeleteProject /force /server:&lt;br /&gt;TLONDEV002 "MSDN Calc v2"&lt;br /&gt;Warning: Deleting a team project is an irrecoverable operation. All version cont&lt;br /&gt;rol, work item tracking and Team Foundation build data will be destroyed from th&lt;br /&gt;e system. The only way to recover this data is by restoring a stored backup of t&lt;br /&gt;he databases. Are you sure you want to delete the team project and all of its da&lt;br /&gt;ta (Y/N)?y&lt;br /&gt;&lt;br /&gt;Deleting from Build ...&lt;br /&gt;Done&lt;br /&gt;Deleting from Work Item Tracking ...&lt;br /&gt;Done&lt;br /&gt;Deleting from Version Control ...&lt;br /&gt;Done&lt;br /&gt;Deleting Report Server files ...&lt;br /&gt;Done&lt;br /&gt;Deleting SharePoint site ...&lt;br /&gt;Done&lt;br /&gt;Deleting from Team Foundation Core ...&lt;br /&gt;Done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4314516067163748725?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4314516067163748725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/10/how-do-delete-tfs-team-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4314516067163748725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4314516067163748725'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/10/how-do-delete-tfs-team-project.html' title='How do delete a TFS team project'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-1071036854715610322</id><published>2008-09-26T20:44:00.002+10:00</published><updated>2008-09-26T20:48:10.790+10:00</updated><title type='text'>Using XPath with XML returned by SharePoint Web services</title><content type='html'>Using XPath with XML returned by SharePoint Web services&lt;br /&gt;&lt;br /&gt;I've seen quite often people writing code that parses thru XML returned by SPS Web services as strings instead of using XPath - cause the XmlDocument throws this error all the time if you dont use an XmlNameSpaceManager&lt;br /&gt;&lt;br /&gt;"Namespace Manager or XsltContext needed. This query has a  prefix, variable, or user-defined function."&lt;br /&gt;&lt;br /&gt;Heres a snippet that tells you how to use the XmlNameSpaceManager to use XPath with the XmlDocument.&lt;br /&gt;&lt;br /&gt;Dim Document As New XmlDocument&lt;br /&gt;Dim xml As String&lt;br /&gt;&lt;br /&gt;xml = "&amp;lt;listitems xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882=" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882=" xmlns:rs="urn:schemas-microsoft-com:rowset=" xmlns:z="#RowsetSchema=" TimeStamp="2004-12-20T20:57:26Z=" xmlns="http:="//schemas.microsoft.com/sharepoint/soap/"&amp;gt;&amp;lt;rs:data ItemCount="0="&amp;gt;&amp;lt;/rs:data&amp;gt;&amp;lt;rs:data ItemCount="0="&amp;gt;&amp;lt;/rs:data&gt;&amp;lt;/listitems&gt;"&lt;br /&gt;Document.LoadXml(xml)&lt;br /&gt;&lt;br /&gt;'Since the XML returned by SPS contains namespace prefixes - we need to create a XmlNamespaceManager&lt;br /&gt;Dim SharePointNamespacePrefix As String = "sp"&lt;br /&gt;Dim SharePointNamespaceURI As String = "http://schemas.microsoft.com/sharepoint/soap/"&lt;br /&gt;&lt;br /&gt;Dim ListItemsNamespacePrefix As String = "z"&lt;br /&gt;Dim ListItemsNamespaceURI As String = "#RowsetSchema"&lt;br /&gt;&lt;br /&gt;Dim PictureLibrariesNamespacePrefix As String = "s"&lt;br /&gt;Dim PictureLibrariesNamespaceURI As String = "uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"&lt;br /&gt;&lt;br /&gt;Dim WebPartsNamespacePrefix As String = "dt"&lt;br /&gt;Dim WebPartsNamespaceURI As String = "uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"&lt;br /&gt;&lt;br /&gt;Dim DirectoryNamespacePrefix As String = "rs"&lt;br /&gt;Dim DirectoryNamespaceURI As String = "urn:schemas-microsoft-com:rowset"&lt;br /&gt;&lt;br /&gt;'now associate with the xmlns namespaces (part of all XML nodes returned&lt;br /&gt;'from SharePoint) a namespace prefix which we can then use in the queries&lt;br /&gt;Dim NamespaceMngr As XmlNamespaceManager&lt;br /&gt;NamespaceMngr = New XmlNamespaceManager(Document.NameTable)&lt;br /&gt;&lt;br /&gt;NamespaceMngr.AddNamespace(SharePointNamespacePrefix, SharePointNamespaceURI)&lt;br /&gt;NamespaceMngr.AddNamespace(ListItemsNamespacePrefix, ListItemsNamespaceURI)&lt;br /&gt;NamespaceMngr.AddNamespace(PictureLibrariesNamespacePrefix, PictureLibrariesNamespaceURI)&lt;br /&gt;NamespaceMngr.AddNamespace(WebPartsNamespacePrefix, WebPartsNamespaceURI)&lt;br /&gt;NamespaceMngr.AddNamespace(DirectoryNamespacePrefix, DirectoryNamespaceURI)&lt;br /&gt;&lt;br /&gt;'run the XPath query and return the result nodes&lt;br /&gt;Dim xNodeList As XmlNodeList&lt;br /&gt;xNodeList = Document.SelectNodes("//z:row[@ows_Title]", NamespaceMngr)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-1071036854715610322?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/1071036854715610322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/09/using-xpath-with-xml-returned-by_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1071036854715610322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1071036854715610322'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/09/using-xpath-with-xml-returned-by_26.html' title='Using XPath with XML returned by SharePoint Web services'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-3372487630382864913</id><published>2008-08-13T17:07:00.002+10:00</published><updated>2008-08-13T17:17:25.200+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='service pack'/><title type='text'>Visual Studio 2008 Service Pack 1 and .NET Framework 3.5 Service Pack 1</title><content type='html'>&lt;p&gt;VS2008 sp1 is finally realeased.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Visual Studio 2008 and the .NET Framework 3.5 enable developers to rapidly create connected applications that deliver high quality and rich user experiences. Visual Studio 2008 enables organizations of every size to rapidly create secure, manageable, and reliable applications that are optimized for Windows Vista™, SQL Server, the Microsoft 2007 Office system and the Web.&lt;/p&gt;&lt;p&gt;Visual Studio 2008 Service Pack 1 (SP1) and .NET Framework 3.5 SP1 continue Microsoft’s investment in market leading development tools and developer platform. SP1 addresses issues that were found through a combination of customer and partner feedback, as well as internal testing. These service packs offer customers improvements in responsiveness, stability and performance. &lt;/p&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx"&gt;http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-3372487630382864913?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/3372487630382864913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/08/visual-studio-2008-service-pack-1-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3372487630382864913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3372487630382864913'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/08/visual-studio-2008-service-pack-1-and.html' title='Visual Studio 2008 Service Pack 1 and .NET Framework 3.5 Service Pack 1'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-3796827820261458024</id><published>2008-06-12T20:15:00.001+10:00</published><updated>2008-06-12T20:17:08.237+10:00</updated><title type='text'>SQL GetDate() in Oracle</title><content type='html'>SQL GetDate() in Oracle is &lt;span style="font-weight: bold; font-family: verdana;"&gt;SYSDATE&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;For example:&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; color: rgb(51, 102, 255);"&gt;INSERT INTO WORKFLOW_RESULTS&lt;br /&gt;(XML_INPUT, INSERT_DATE, STATUS, PROCESSED_DATE)&lt;br /&gt;VALUES&lt;br /&gt;(&lt;br /&gt;'&lt;testtag&gt;testing1&lt;/testtag&gt;'&lt;br /&gt;,SYSDATE&lt;br /&gt;,'TTT'&lt;br /&gt;,SYSDATE&lt;br /&gt;)&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-3796827820261458024?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/3796827820261458024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/06/sql-getdate-in-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3796827820261458024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3796827820261458024'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/06/sql-getdate-in-oracle.html' title='SQL GetDate() in Oracle'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-2279431758388288529</id><published>2008-06-12T19:25:00.001+10:00</published><updated>2008-06-12T19:33:44.349+10:00</updated><title type='text'>Using an Oracle Function in .NET</title><content type='html'>&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Hey,&lt;br /&gt;&lt;br /&gt;Just blogging this as it was a pain in the bum to get right:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;        public Acres.DataContracts.BusinessCaseContentType GetFullCaseDataFromClarity( Acres.DataContracts.BusinessCaseContentType contract ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;            string xml_clob = string.Empty;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;            System.Data.OracleClient.OracleConnection conn = new System.Data.OracleClient.OracleConnection( ConfigurationManager.ConnectionStrings[ "ClarityConnection" ].ConnectionString );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;            using ( System.Data.OracleClient.OracleCommand cmd = new System.Data.OracleClient.OracleCommand() ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                conn.Open();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                cmd.Connection = conn;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                cmd.CommandText = "Workflow_procedures.webcall_business_case";&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                cmd.CommandType = CommandType.StoredProcedure;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                OracleParameter p_retval = new OracleParameter("p_retval", OracleType.Clob);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                p_retval.Direction = ParameterDirection.ReturnValue;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                cmd.Parameters.Add(p_retval);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                cmd.Parameters.Add( "p_bc_id", OracleType.Int32 ).Value = contract.ClarityBusinessCaseId;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                cmd.ExecuteNonQuery();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                xml_clob = ( (System.Data.OracleClient.OracleLob)( p_retval.Value ) ).Value.ToString();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                contract =&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                    (Acres.DataContracts.BusinessCaseContentType)Acres.Workflow.UtilityCode.Utility.DeserialiseObject&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;                ( xml_clob, typeof( Acres.DataContracts.BusinessCaseContentType ) );&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;            return contract;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255); font-family: verdana;"&gt;        }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-2279431758388288529?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/2279431758388288529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/06/using-oracle-function-in-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2279431758388288529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2279431758388288529'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/06/using-oracle-function-in-net.html' title='Using an Oracle Function in .NET'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-1277957083380744597</id><published>2008-06-05T22:15:00.005+10:00</published><updated>2008-06-05T22:39:28.760+10:00</updated><title type='text'>Sharepoint and .resx files with workflow task form</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Bonjour,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;I just figured how to use a &lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;resx file&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; in my workflow aspx task form.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;I needed to style my aspx task form with &lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;XSLT &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;and I just hard coded it in the page knowing that I would come back to it and put it into a resource file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 153, 0); font-family: verdana;"&gt;NOTE: the resx files are in the following location on your sharepoint server:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;When I tried this it was not easy.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;I tried many things but then stumbled upon the &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);font-family:verdana;" &gt;SPUtility.GetLocalizedString&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; code.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Orginally this would not work as I was trying to embed an XSLT file inside the resx file and both are XML so it was gettign confused. I then replaced all the &amp;lt; + &amp;gt; tags with &amp;amp;lt; +  &amp;amp;gt; but only in the XSLT part of the resx file (the &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:verdana;" &gt;red&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; bit below)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 153, 0);font-family:verdana;" &gt;Then in my c# code I do the following:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        string theApproversXSLT = SPUtility.GetLocalizedString( "$Resources:&lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;Approvers&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;", "&lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;Acres&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;", SPContext.Current.Web.Language );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;Approvers &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;is the name you can see in the resx file and &lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;Acres &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;is the name of my file&lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;: Acres&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;.resx.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 153, 0);font-family:verdana;" &gt;You can use this also for language options but as you can see I just used the current:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;SPContext.Current.Web.Language&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;So here is my resx file:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&amp;lt;root&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;!--&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Microsoft ResX Schema&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Version 2.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    The primary goals of this format is to allow a simple XML format&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    that is mostly human readable. The generation and parsing of the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    various data types are done through the TypeConverter classes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    associated with the data types.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    ... ado.net/XML headers &amp;amp; schema ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;resheader name="resmimetype"&amp;gt;text/microsoft-resx&amp;lt;/resheader&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;resheader name="version"&amp;gt;2.0&amp;lt;/resheader&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;resheader name="reader"&amp;gt;System.Resources.ResXResourceReader, System.Windows.Forms, ...&amp;lt;/resheader&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;resheader name="writer"&amp;gt;System.Resources.ResXResourceWriter, System.Windows.Forms, ...&amp;lt;/resheader&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;data name="Name1"&amp;gt;&amp;lt;value&amp;gt;this is my long string&amp;lt;/value&amp;gt;&amp;lt;comment&amp;gt;this is a comment&amp;lt;/comment&amp;gt;&amp;lt;/data&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;data name="Color1" type="System.Drawing.Color, System.Drawing"&amp;gt;Blue&amp;lt;/data&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        &amp;lt;value&amp;gt;[base64 mime encoded serialized .NET Framework object]&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;/data&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        &amp;lt;value&amp;gt;[base64 mime encoded string representing a byte array form of the .NET Framework object]&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        &amp;lt;comment&amp;gt;This is a comment&amp;lt;/comment&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;/data&amp;gt;&lt;/span&gt;&lt;br /&gt;           &lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    There are any number of "resheader" rows that contain simple&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    name/value pairs.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Each data row contains a name, and value. The row also contains a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    type or mimetype. Type corresponds to a .NET class that support&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    text/value conversion through the TypeConverter architecture.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Classes that don't support this are serialized and stored with the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    mimetype set.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    The mimetype is used for serialized objects, and tells the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    ResXResourceReader how to depersist the object. This is currently not&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    extensible. For a given mimetype the value must be set accordingly:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    Note - application/x-microsoft.net.object.binary.base64 is the format&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    that the ResXResourceWriter will generate, however the reader can&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    read any of the formats listed below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    mimetype: application/x-microsoft.net.object.binary.base64&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    value   : The object must be serialized with&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            : and then encoded with base64 encoding.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    mimetype: application/x-microsoft.net.object.soap.base64&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    value   : The object must be serialized with&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            : and then encoded with base64 encoding.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    mimetype: application/x-microsoft.net.object.bytearray.base64&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    value   : The object must be serialized into a byte array&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            : using a System.ComponentModel.TypeConverter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            : and then encoded with base64 encoding.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;xsd:import namespace="http://www.w3.org/XML/1998/namespace" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;xsd:element name="root" msdata:IsDataSet="true"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;      &amp;lt;xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        &amp;lt;xsd:choice maxOccurs="unbounded"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;          &amp;lt;xsd:element name="metadata"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &amp;lt;xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;                &amp;lt;xsd:element name="value" type="xsd:string" minOccurs="0" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;/xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute name="name" use="required" type="xsd:string" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute name="type" type="xsd:string" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute name="mimetype" type="xsd:string" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute ref="xml:space" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;          &amp;lt;/xsd:element&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;          &amp;lt;xsd:element name="assembly"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &amp;lt;xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute name="alias" type="xsd:string" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute name="name" type="xsd:string" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;          &amp;lt;/xsd:element&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;          &amp;lt;xsd:element name="data"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &amp;lt;xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;                &amp;lt;xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;                &amp;lt;xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;/xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute ref="xml:space" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;          &amp;lt;/xsd:element&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;          &amp;lt;xsd:element name="resheader"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &amp;lt;xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;                &amp;lt;xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;/xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;              &amp;lt;xsd:attribute name="name" type="xsd:string" use="required" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;          &amp;lt;/xsd:element&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        &amp;lt;/xsd:choice&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;      &amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;/xsd:element&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;/xsd:schema&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;resheader name="resmimetype"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;value&amp;gt;text/microsoft-resx&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;/resheader&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;resheader name="version"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;/resheader&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;resheader name="reader"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;value&amp;gt;System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;/resheader&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;resheader name="writer"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;    &amp;lt;value&amp;gt;System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;/resheader&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;  &amp;lt;data name="&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;&lt;span style="font-weight: bold;"&gt;Approvers&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;" type="System.Resources.ResXFileRef, System.Windows.Forms"&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight: bold;font-family:verdana;" &gt; &amp;lt;value&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;&amp;lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;  &amp;lt;xsl:template match="/"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;    &amp;lt;table border="0"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;      &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;        &amp;lt;td class="ms-formlabel"&amp;gt;Name&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;        &amp;lt;td class="ms-formlabel"&amp;gt;Role Type&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;        &amp;lt;td class="ms-formlabel"&amp;gt;Seq&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;        &amp;lt;td class="ms-formlabel"&amp;gt;Action Type&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;        &amp;lt;td class="ms-formlabel"&amp;gt;Email&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;      &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;      &amp;lt;xsl:for-each select="BusinessCaseContentType/Approvers/Data_ApprovalChainMember_Contract"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;        &amp;lt;xsl:choose&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;          &amp;lt;xsl:when test="IsCurrentInWorkflowChain = 'true'"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="FirstName"/&amp;gt;.&amp;lt;xsl:value-of select="LastName"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="AuthorityRoleType"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="ResourceSeqNumber"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="AuthorityActionType"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="Email"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;          &amp;lt;/xsl:when&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;          &amp;lt;xsl:otherwise&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td style="background-color:#eeeeee;color:#999999;" class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="FirstName"/&amp;gt;.&amp;lt;xsl:value-of select="LastName"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td style="background-color:#eeeeee;color:#999999;" class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="AuthorityRoleType"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td style="background-color:#eeeeee;color:#999999;" class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="ResourceSeqNumber"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td style="background-color:#eeeeee;color:#999999;" class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="AuthorityActionType"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td style="background-color:#eeeeee;color:#999999;" class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;xsl:value-of select="Email"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;          &amp;lt;/xsl:otherwise&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;        &amp;lt;/xsl:choose&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;      &amp;lt;/xsl:for-each&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;    &amp;lt;/table&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;  &amp;lt;/xsl:template&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;  &amp;lt;/data&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;  &amp;lt;data name="ExpenditureLines" type="System.Resources.ResXFileRef, System.Windows.Forms"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;    &amp;lt;value&amp;gt;?xml version="1.0" encoding="iso-8859-1"?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;&amp;lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;  &amp;lt;xsl:decimal-format name="euro" decimal-separator="," grouping-separator="."/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;  &amp;lt;xsl:key name="cowKey" match="ExpenditureLine" use="CowType"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;  &amp;lt;xsl:template match="/"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;    &amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;      &amp;lt;body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;        &amp;lt;table border="1"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;          &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;td class="ms-formlabel"&amp;gt;Cow&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;td class="ms-formlabel"&amp;gt;Amount&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;          &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;          &amp;lt;xsl:for-each select="//ExpenditureLine[generate-id(.)=generate-id(key('cowKey',CowType))]"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;xsl:sort select="count(key('cowKey',CowType))" order="descending" data-type="text"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;td colspan="3"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;b&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                  &amp;lt;xsl:value-of select="CowType"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;/b&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;xsl:for-each select="key('cowKey',CowType)"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;td class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                  &amp;lt;xsl:value-of select="position()"/&amp;gt;.&amp;lt;xsl:value-of select="Cow"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;td class="ms-formbody"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                  £&amp;lt;xsl:value-of select="format-number(Amount, '#.###,00', 'euro')"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;                &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;              &amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;            &amp;lt;/xsl:for-each&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;          &amp;lt;/xsl:for-each&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;        &amp;lt;/table&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;      &amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;    &amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;  &amp;lt;/xsl:template&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-family:verdana;" &gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&amp;lt;/data&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&amp;lt;/root&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Hope this helps someone&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;RuSs&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-1277957083380744597?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/1277957083380744597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/06/sharepoint-and-resx-files-with-workflow.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1277957083380744597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1277957083380744597'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/06/sharepoint-and-resx-files-with-workflow.html' title='Sharepoint and .resx files with workflow task form'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-1388893456425957088</id><published>2008-06-03T20:17:00.002+10:00</published><updated>2008-06-03T20:19:37.628+10:00</updated><title type='text'>SharePoint Manager 2007</title><content type='html'>The Sharepoint Manager 2007 tool is a great tool for visually seeing the heirarchical tree of your MOSS 2007 site.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/spm"&gt;http://www.codeplex.com/spm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It requires no installation as it's just an EXE so no risk of stuffing up your sharepoint installation.&lt;br /&gt;&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-1388893456425957088?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/1388893456425957088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/06/sharepoint-manager-2007.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1388893456425957088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1388893456425957088'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/06/sharepoint-manager-2007.html' title='SharePoint Manager 2007'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-9049210562149108032</id><published>2008-06-03T20:15:00.000+10:00</published><updated>2008-06-03T20:16:59.131+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Workflow'/><title type='text'>Approval Workflow does not send Email to approvers</title><content type='html'>Thanks to Bryant Duke for this one:&lt;br /&gt;&lt;a href="http://forums.microsoft.com/technet/showpost.aspx?postid=1964290&amp;amp;siteid=17&amp;amp;sb=0&amp;amp;d=1&amp;amp;at=7&amp;amp;ft=11&amp;amp;tf=0&amp;amp;pageid=1"&gt;http://forums.microsoft.com/technet/showpost.aspx?postid=1964290&amp;amp;siteid=17&amp;amp;sb=0&amp;amp;d=1&amp;amp;at=7&amp;amp;ft=11&amp;amp;tf=0&amp;amp;pageid=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;" id="_ctl0_MainContent_PostFlatView"&gt;&lt;/span&gt;                                                                                                                                                                                                                                                                                                                                            &lt;span style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;I finally found the underlying problem with email being sent with the Workflow.  After much research and digging, I found several different articles which addressed the issue.  Each one of them presented a portion of the solution, but none of them clearly explained it to me.  I will try to explain what I mean.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;First of all, I didn't know of a MAJOR limitation to the task list of a site collection.  Apparently, you can only have ONE task list in a site collection with advanced option of "Send email when ownership is assigned".  This option can be found under List Settings, Advanced Settings.  After testing on two separate installations, I can conclude that if you turn this option on for both Task Lists, only one of them can actually send email on immediate notification.  They will send email for late tasks, deleted tasks and even changed tasks, but the behavior was intermittent.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;While creating, deleting and changing the options of two or more task lists, I watched the property and values which changed in the background.  You can do this by downloading and installing "Sharepoint Manager 2007" from code-plex. &lt;/span&gt;&lt;a title="http://www.codeplex.com/spm" href="http://www.codeplex.com/spm"&gt;&lt;span style="font-size:100%;color:#800080;"&gt;http://www.codeplex.com/spm&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:100%;"&gt;  After you download and install this tool (which is a great tool), you can use the tree structure to explore your way down your portal farm configuration.  First open the main + at the farm level, then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p align="left"&gt; &lt;/p&gt; &lt;p align="left"&gt;&lt;span style="font-size:100%;"&gt;-{name_of_farm}&lt;/span&gt;&lt;/p&gt; &lt;blockquote dir="ltr" style="margin-right: 0px;"&gt; &lt;p align="left"&gt;&lt;span style="font-size:100%;"&gt;-Content Service&lt;/span&gt;&lt;/p&gt; &lt;blockquote dir="ltr" style="margin-right: 0px;"&gt; &lt;p align="left"&gt;&lt;span style="font-size:100%;"&gt;-Web Applications&lt;/span&gt;&lt;/p&gt; &lt;blockquote dir="ltr" style="margin-right: 0px;"&gt; &lt;p align="left"&gt;&lt;span style="font-size:100%;"&gt;-[name_of_web_app}&lt;/span&gt;&lt;/p&gt; &lt;blockquote dir="ltr" style="margin-right: 0px;"&gt; &lt;p align="left"&gt;&lt;span style="font-size:100%;"&gt;-Site Collection&lt;/span&gt;&lt;/p&gt; &lt;blockquote dir="ltr" style="margin-right: 0px;"&gt; &lt;p align="left"&gt;&lt;span style="font-size:100%;"&gt;-http://{url_name}&lt;/span&gt;&lt;/p&gt; &lt;blockquote dir="ltr" style="margin-right: 0px;"&gt; &lt;p align="left"&gt;&lt;span style="font-size:100%;"&gt;-{name_of_portal}&lt;/span&gt;&lt;/p&gt; &lt;blockquote dir="ltr" style="margin-right: 0px;"&gt; &lt;p align="left"&gt;&lt;span style="font-size:100%;"&gt;-Webs&lt;/span&gt;&lt;/p&gt; &lt;blockquote dir="ltr" style="margin-right: 0px;"&gt; &lt;p align="left"&gt;&lt;span style="font-size:100%;"&gt;-Alert Collection&lt;/span&gt;&lt;/p&gt; &lt;p align="left"&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt; &lt;p dir="ltr" align="left"&gt;&lt;span style="font-size:100%;"&gt;This is assuming you are using a fairly default portal installation, and you are using the default Task List in the Document Center.  If not, explore to the appropriate Webs section you are working in.&lt;/span&gt;&lt;/p&gt; &lt;p dir="ltr" align="left"&gt; &lt;/p&gt; &lt;p dir="ltr" align="left"&gt;&lt;span style="font-size:100%;"&gt;Under the "Alert Collection" of the appropriate Webs section, you should see a "System" object which will show you the properties of the "Immediate" alert template.  If the object is not present, no immediate alerts will be sent.  Also notice, that if you set two separate Task Lists with the option "Send email when ownership is assigned", that there will still only be ONE system object.  In the properties of the object, you can see which list it is bound to under the "List" property.&lt;/span&gt;&lt;/p&gt; &lt;p dir="ltr" align="left"&gt; &lt;/p&gt; &lt;p dir="ltr" align="left"&gt;&lt;span style="font-size:100%;"&gt;If the task list is not sending immediate emails, then go to the list and change the option "Send email when ownership is assigned" to NO, close the list and wait a few minutes (usually about 5 minutes).  The timer service should delete the "system" object.&lt;/span&gt;&lt;/p&gt; &lt;p dir="ltr" align="left"&gt; &lt;/p&gt; &lt;p dir="ltr" align="left"&gt;&lt;span style="font-size:100%;"&gt;Once the object is gone (you can check Sharepoint Manager 2007 using the "Refresh" option), then go back to the task list and re-enable the option.  After about 5 minutes, the "System" object should return for that list.&lt;/span&gt;&lt;/p&gt; &lt;p dir="ltr" align="left"&gt; &lt;/p&gt; &lt;p dir="ltr" align="left"&gt;&lt;span style="font-size:100%;"&gt;I hope all of this make sense, and can help people solve the "Missing Emails" mystery.&lt;/span&gt;&lt;/p&gt; &lt;p dir="ltr" align="left"&gt; &lt;/p&gt; &lt;p dir="ltr" align="left"&gt;&lt;span style="font-size:100%;"&gt;Bryant&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-9049210562149108032?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/9049210562149108032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/06/approval-workflow-does-not-send-email.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/9049210562149108032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/9049210562149108032'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/06/approval-workflow-does-not-send-email.html' title='Approval Workflow does not send Email to approvers'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-5200349400294883980</id><published>2008-06-03T19:00:00.002+10:00</published><updated>2008-06-03T19:03:21.485+10:00</updated><title type='text'>HOTFIX 946517 and MOSS 2007</title><content type='html'>Was wondering why my MOSS 2007 server was not sending emails so I went into the relay settings and tried to change some options that would allow my server to send email to ALL recipients.&lt;br /&gt;&lt;br /&gt;As shown in the following post by VIJAYSHINVA KARNURE you get an unspecified error with no event log info.&lt;br /&gt;&lt;br /&gt;This is caused by hotfix 946517.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://blogs.msdn.com/vijaysk/archive/2008/04/14/issue-smtp-configuration-unspecified-error.aspx"&gt;here&lt;/a&gt; for more info.&lt;br /&gt;&lt;br /&gt;cheers&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-5200349400294883980?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/5200349400294883980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/06/hotfix-946517-and-moss-2007.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5200349400294883980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5200349400294883980'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/06/hotfix-946517-and-moss-2007.html' title='HOTFIX 946517 and MOSS 2007'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-3560078565163590287</id><published>2008-05-31T19:43:00.003+10:00</published><updated>2008-05-31T20:02:58.893+10:00</updated><title type='text'>How to group with XSLT</title><content type='html'>Bonjour,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;Note: I used Altova 2008 XML Spy which is a great tool.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I just spent a little while trying to understand grouping of data using XSLT.&lt;br /&gt;&lt;br /&gt;I first started out using XSLT 2.0 and was quite happy with how easy it was to group until I tried to transform the XSLT  with C#. Guess what, .NET 2.0 doesnt support XSLT 2.0 even though W3C says it's the current standard.&lt;br /&gt;&lt;br /&gt;Anyway, so I went back to using XSLT 1.0 which was not my friend until now. It's a lot more complex to group using XSLT 1.0 but I eventually got there.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Here is my XSLT:&lt;/span&gt;&lt;br /&gt;&lt;div style="border: 1px solid red; margin: 10px; padding: 5px; color: Red;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;&lt;br /&gt;&amp;lt;xsl:stylesheet version="1.0"&lt;br /&gt;xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:key name="cowKey" match="ExpenditureLine" use="CowType" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:template match="/"&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:for-each select="//ExpenditureLine[generate-id(.)=generate-id(key('cowKey',CowType))]"&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;xsl:sort select="count(key('cowKey',CowType))" order="descending" data-type="text"/&amp;gt;&lt;br /&gt;   &amp;lt;h2&amp;gt;&lt;br /&gt;    &amp;lt;xsl:value-of select="position()"/&amp;gt;&lt;br /&gt;    &amp;lt;xsl:text&amp;gt;.&amp;lt;/xsl:text&amp;gt;&lt;br /&gt;   *&amp;lt;xsl:value-of select="CowType"/&amp;gt;*&lt;br /&gt;    &amp;lt;br&amp;gt;&amp;lt;/br&amp;gt;&lt;br /&gt;    &amp;lt;xsl:text&amp;gt; Count: &amp;lt;/xsl:text&amp;gt;&lt;br /&gt;    &amp;lt;xsl:value-of select="count(key('cowKey',CowType))"/&amp;gt;&lt;br /&gt;   &amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;ol&amp;gt;&lt;br /&gt;    &amp;lt;xsl:for-each select="key('cowKey',CowType)"&amp;gt;&lt;br /&gt;     &amp;lt;li&amp;gt;&lt;br /&gt;    &amp;lt;b&amp;gt;&amp;lt;xsl:value-of select="Cow"/&amp;gt;:&amp;lt;/b&amp;gt;&lt;br /&gt;    &amp;lt;xsl:value-of select="Amount"/&amp;gt;&lt;br /&gt;     &amp;lt;/li&amp;gt;&lt;br /&gt;    &amp;lt;/xsl:for-each&amp;gt;&lt;br /&gt;    &amp;lt;!--&lt;br /&gt;     This nested for-each loops through the City elements that have&lt;br /&gt;      the same value for the State attribute as the current City in&lt;br /&gt;      the outer for-each loop.&lt;br /&gt;    --&amp;gt;&lt;br /&gt;   &amp;lt;/ol&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/xsl:for-each&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;and here is my XML:&lt;/span&gt;&lt;br /&gt;&lt;div style="border: 1px solid red; margin: 10px; padding: 5px; color: Red;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;ExpenditureLines&amp;gt;&lt;br /&gt; &amp;lt;ExpenditureLine&amp;gt;&lt;br /&gt;  &amp;lt;Cow&amp;gt;RAND&amp;lt;/Cow&amp;gt;&lt;br /&gt;  &amp;lt;CowType&amp;gt;Capital&amp;lt;/CowType&amp;gt;&lt;br /&gt;  &amp;lt;Amount&amp;gt;2222&amp;lt;/Amount&amp;gt;&lt;br /&gt; &amp;lt;/ExpenditureLine&amp;gt;&lt;br /&gt; &amp;lt;ExpenditureLine&amp;gt;&lt;br /&gt;  &amp;lt;Cow&amp;gt;LAND7&amp;lt;/Cow&amp;gt;&lt;br /&gt;  &amp;lt;CowType&amp;gt;Capital&amp;lt;/CowType&amp;gt;&lt;br /&gt;  &amp;lt;Amount&amp;gt;000005&amp;lt;/Amount&amp;gt;&lt;br /&gt; &amp;lt;/ExpenditureLine&amp;gt;&lt;br /&gt; &amp;lt;ExpenditureLine&amp;gt;&lt;br /&gt;  &amp;lt;Cow&amp;gt;LAND3&amp;lt;/Cow&amp;gt;&lt;br /&gt;  &amp;lt;CowType&amp;gt;Furniture&amp;lt;/CowType&amp;gt;&lt;br /&gt;  &amp;lt;Amount&amp;gt;9875&amp;lt;/Amount&amp;gt;&lt;br /&gt; &amp;lt;/ExpenditureLine&amp;gt;&lt;br /&gt; &amp;lt;ExpenditureLine&amp;gt;&lt;br /&gt;  &amp;lt;Cow&amp;gt;ACPB&amp;lt;/Cow&amp;gt;&lt;br /&gt;  &amp;lt;CowType&amp;gt;Revenue&amp;lt;/CowType&amp;gt;&lt;br /&gt;  &amp;lt;Amount&amp;gt;1111&amp;lt;/Amount&amp;gt;&lt;br /&gt; &amp;lt;/ExpenditureLine&amp;gt;&lt;br /&gt; &amp;lt;ExpenditureLine&amp;gt;&lt;br /&gt;  &amp;lt;Cow&amp;gt;LAND2&amp;lt;/Cow&amp;gt;&lt;br /&gt;  &amp;lt;CowType&amp;gt;Furniture&amp;lt;/CowType&amp;gt;&lt;br /&gt;  &amp;lt;Amount&amp;gt;3333&amp;lt;/Amount&amp;gt;&lt;br /&gt; &amp;lt;/ExpenditureLine&amp;gt;&lt;br /&gt; &amp;lt;ExpenditureLine&amp;gt;&lt;br /&gt;  &amp;lt;Cow&amp;gt;LAND1&amp;lt;/Cow&amp;gt;&lt;br /&gt;  &amp;lt;CowType&amp;gt;Furniture&amp;lt;/CowType&amp;gt;&lt;br /&gt;  &amp;lt;Amount&amp;gt;7677&amp;lt;/Amount&amp;gt;&lt;br /&gt; &amp;lt;/ExpenditureLine&amp;gt;&lt;br /&gt;&amp;lt;ExpenditureLine&amp;gt;&lt;br /&gt; &amp;lt;Cow&amp;gt;YELK&amp;lt;/Cow&amp;gt;&lt;br /&gt; &amp;lt;CowType&amp;gt;Other&amp;lt;/CowType&amp;gt;&lt;br /&gt; &amp;lt;Amount&amp;gt;000005&amp;lt;/Amount&amp;gt;&lt;br /&gt;&amp;lt;/ExpenditureLine&amp;gt;  &lt;br /&gt; &amp;lt;ExpenditureLine&amp;gt;&lt;br /&gt;  &amp;lt;Cow&amp;gt;LAND3&amp;lt;/Cow&amp;gt;&lt;br /&gt;  &amp;lt;CowType&amp;gt;Furniture&amp;lt;/CowType&amp;gt;&lt;br /&gt;  &amp;lt;Amount&amp;gt;9875&amp;lt;/Amount&amp;gt;&lt;br /&gt; &amp;lt;/ExpenditureLine&amp;gt;&lt;br /&gt;&amp;lt;/ExpenditureLines&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;and here is the result:&lt;/span&gt;&lt;br /&gt;&lt;div style="border: 1px solid blue; margin: 10px; padding: 5px; color: blue;"&gt;&lt;br /&gt;&lt;br /&gt; &lt;b&gt;1.Furniture&lt;br /&gt;Count: 4&lt;/b&gt;&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;LAND3:&lt;/b&gt;9875&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;LAND2:&lt;/b&gt;3333&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;LAND1:&lt;/b&gt;7677&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;LAND3:&lt;/b&gt;9875&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt; &lt;b&gt;2.Capital&lt;br /&gt;Count: 2&lt;/b&gt;&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;RAND:&lt;/b&gt;2222&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;LAND7:&lt;/b&gt;000005&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt; &lt;b&gt;3.Revenue&lt;br /&gt;Count: 1&lt;/b&gt;&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;ACPB:&lt;/b&gt;1111&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt; &lt;b&gt;4.Other&lt;br /&gt;Count: 1&lt;/b&gt;&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;b&gt;YELK:&lt;/b&gt;000005&lt;/li&gt;&lt;br /&gt; &lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-3560078565163590287?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/3560078565163590287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/05/how-to-group-with-xslt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3560078565163590287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3560078565163590287'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/05/how-to-group-with-xslt.html' title='How to group with XSLT'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-6016302988126277346</id><published>2008-05-15T00:12:00.011+10:00</published><updated>2008-05-15T00:29:19.626+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Workflow'/><category scheme='http://www.blogger.com/atom/ns#' term='SendActivity'/><category scheme='http://www.blogger.com/atom/ns#' term='Attributes'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Workflow Send activity + WCF [DataMember] and the story of why I am an idiot!!!</title><content type='html'>&lt;span style="font-family:verdana;"&gt;If you have a class &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:verdana;" &gt;BusinessCaseContentType&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; whose properties are not decorated with the [DataMember] attribute and you try and use a Workflow SendActivity to receive this class &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:verdana;" &gt;BusinessCaseContentType&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; it will always come back un-populated.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-family:verdana;" &gt;using System;&lt;br /&gt;using System.Runtime.Serialization;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;&lt;br /&gt;namespace Acres.DataContracts&lt;br /&gt;{&lt;br /&gt;  &amp;nbsp;&amp;nbsp;[Serializable()]&lt;br /&gt;  &amp;nbsp;&amp;nbsp;[DataContract]&lt;br /&gt;  &amp;nbsp;&amp;nbsp;public class BusinessCaseContentType&lt;br /&gt;  &amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;private string _BusinessCaseType;&lt;br /&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="font-weight: bold;"&gt; [DataMember] // - not my friend at the moment&lt;/span&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;public string BusinessCaseType&lt;br /&gt;  &amp;nbsp;&amp;nbsp;{&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;get { return _BusinessCaseType; }&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set { _BusinessCaseType = value; }&lt;br /&gt;  &amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Thing is, you wont get an error you will just get a NULL instance of &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-family:verdana;" &gt;BusinessCaseContentType&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Now this really sucks as I spent 2 days looking a for a needle in a haystack when in fact I was looking for a tractor in a haystack!!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Oh well, at least I know for next time!!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Can I have a beer please!!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;RuSs&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-6016302988126277346?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/6016302988126277346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/05/workflow-send-activity-wcf-datamember.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6016302988126277346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/6016302988126277346'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/05/workflow-send-activity-wcf-datamember.html' title='Workflow Send activity + WCF [DataMember] and the story of why I am an idiot!!!'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4324447639464557862</id><published>2008-05-14T18:10:00.005+10:00</published><updated>2008-05-14T18:25:14.621+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='proxy'/><title type='text'>Making sharepoint RSS feed work behind your firewall</title><content type='html'>Morning,&lt;br /&gt;&lt;br /&gt;Just found a great little post &lt;a href="http://curvinglearn.blogspot.com/2007_06_01_archive.html"&gt;here&lt;/a&gt; that shows you how to make RSS feeds work in Sharepoint inside your company firewall.&lt;br /&gt;&lt;br /&gt;You add the following inside the &lt;system.net&gt; section in the site  web.config.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;   &amp;lt;defaultProxy&amp;gt;&lt;br /&gt;      &amp;lt;proxy autoDetect="true" &lt;br /&gt;         usesystemdefault="false"&lt;br /&gt;         proxyaddress="http://YOUR_PROXY_SERVER:YOUR_PORT_NUMBER"&lt;br /&gt;         bypassonlocal="true" /&amp;gt;&lt;br /&gt;      &lt;br /&gt;    &amp;lt;/defaultProxy&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Works perfectly.. just wait a few more seconds for your site to recompile.&lt;br /&gt;&lt;br /&gt;thanks&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4324447639464557862?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4324447639464557862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/05/making-sharepoint-rss-feed-work-behind.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4324447639464557862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4324447639464557862'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/05/making-sharepoint-rss-feed-work-behind.html' title='Making sharepoint RSS feed work behind your firewall'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-56538730336976872</id><published>2008-05-13T20:37:00.020+10:00</published><updated>2008-05-14T18:00:23.344+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bdc'/><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><title type='text'>Starting out with Sharepoint 2007 BDC</title><content type='html'>This post is a simple step by step of how to set up BDC.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://video.msn.com/video.aspx/?mkt=en-gb&amp;tab=soapbox&amp;vid=67aaecb0-4686-433e-a936-ac89bb8bf33d&amp;wa=wsignin1.0"&gt;Here&lt;/a&gt; is a great video  that walks you though it.&lt;br /&gt;&lt;a href="https://www.microsoft.com/resources/virtuallabs/step3-technet.aspx?LabId=4158bffc-ebb8-44ad-86b3-8794796daca8"&gt;Here&lt;/a&gt; also is a virtual lab but you will need an MSDN login for this and it needs to run in IE.&lt;br /&gt;&lt;a href="http://download.microsoftvirtuallabs.com/download/8/a/7/8a71365b-4c80-4e60-8185-8f12f59bf1d4/HOL311_Getting%20Started%20with%20the%20Business%20Data%20Catalog%20in%20Microsoft%20Office%20SharePoint%20Server%202007.pdf"&gt;Here&lt;/a&gt; is the PDF that goes with the lab.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Firstly go and get:&lt;/span&gt; &lt;br /&gt;&lt;span style="font-style:italic;"&gt;BDC Meta Man&lt;/span&gt; - this will save you hours as it creates the XML defintion files for you.&lt;br /&gt;&lt;a href="http://www.lightningtools.com/bdc-meta-man/default.aspx"&gt;http://www.lightningtools.com/bdc-meta-man/default.aspx&lt;/a&gt;&lt;br /&gt;This tool is great although unless you pay for it you will only be able to add 2 tables max and you get a lot of popup messages telling you about the paid for version. But the free version is really good besides that.&lt;br /&gt;&lt;br /&gt;Then you just select the type of connection you want. This post will only cover database connections.&lt;br /&gt;&lt;br /&gt;So connect to your SQL 2005 database using the connect to datasource drop down inside BDC Meta Man.&lt;br /&gt;then drag the table(s) on to the design surface. Drag 2 tables that are relates as you get more functionality in Sharepoint if you do this. (ie.. master details stuff)&lt;br /&gt;Go and choose the columns you want etc... but you are better to get most of the columns as you can filter them later in MOSS.&lt;br /&gt;One thing I had trouble with is not being able to connect to my database as the credentials it was  passing were the IIS settings.&lt;br /&gt;&lt;br /&gt;So in my XML defintion file that was created by BDC Meta Man I did the folllowing:&lt;br /&gt;&lt;br /&gt;  &amp;lt;LobSystemInstances&amp;gt;&lt;br /&gt;    &amp;lt;LobSystemInstance Name="PropertyPortal_030Instance"&amp;gt;&lt;br /&gt;      &amp;lt;Properties&amp;gt;&lt;br /&gt;        &amp;lt;Property Name="AuthenticationMode" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAuthenticationMode"&amp;gt;PassThrough&amp;lt;/Property&amp;gt;&lt;br /&gt;        &amp;lt;Property Name="DatabaseAccessProvider" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAccessProvider"&amp;gt;SqlServer&amp;lt;/Property&amp;gt;&lt;br /&gt;        &amp;lt;Property Name="RdbConnection Data Source" Type="System.String"&amp;gt;&lt;b&gt;MY_SERVER_NAME&lt;/b&gt;&amp;lt;/Property&amp;gt;&lt;br /&gt;        &amp;lt;Property Name="RdbConnection Initial Catalog" Type="System.String"&amp;gt;&lt;b&gt;MY_DATABASE_NAME&lt;/b&gt;&amp;lt;/Property&amp;gt;&lt;br /&gt;        &amp;lt;Property Name="RdbConnection Integrated Security" Type="System.String"&amp;gt;False&amp;lt;/Property&amp;gt;&lt;br /&gt;        &lt;b&gt;&amp;lt;Property Name="RdbConnection Password" Type="System.String"&amp;gt;&lt;b&gt;MY_PASSWORD&lt;/b&gt;&amp;lt;/Property&amp;gt;&lt;/b&gt;&lt;br /&gt;        &amp;lt;Property Name="RdbConnection Pooling" Type="System.String"&amp;gt;false&amp;lt;/Property&amp;gt;&lt;br /&gt;       &lt;b&gt;&amp;lt;Property Name="RdbConnection User ID"Type="System.String"&amp;gt;&lt;b&gt;MY_USER_NAME&lt;/b&gt;&amp;lt;/Property&amp;gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;/Properties&amp;gt;&lt;br /&gt;    &amp;lt;/LobSystemInstance&amp;gt;&lt;br /&gt;  &amp;lt;/LobSystemInstances&amp;gt;&lt;br /&gt;&lt;br /&gt;As you can see I have put a user name and password in the config.&lt;br /&gt;&lt;br /&gt;Ok so now you have your definition file.&lt;br /&gt;Go to central adminitration and select your shared service from share services admin.&lt;br /&gt;Look in the Business Data Catalog section on the right and select "Import application defintion".&lt;br /&gt;Browse to your XML def. and upload it. I left all the setting the same.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Now go to your site and enable:&lt;/span&gt;&lt;br /&gt;Office SharePoint Server Enterprise Site Collection features&lt;br /&gt;Stay in your site and edit a page you want to add these things to.&lt;br /&gt;Click on Add a web part.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Choose Business Data List &lt;br /&gt;AND&lt;br /&gt;Business Data Related List&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These 2 will be part of our master detail functionality.&lt;br /&gt;The web part will prompt you to open the tool panel so do this for the business data list first.&lt;br /&gt;Type: click on the book and select the parent table you configure in BDC Meta Man&lt;br /&gt;Apprearance: you can change the title and widths etc..&lt;br /&gt;Click ok.&lt;br /&gt;&lt;br /&gt;Do the same for the child table.&lt;br /&gt;Then click ok.&lt;br /&gt;&lt;br /&gt;Go to the child webpart and click Edit drop down in top right corner and select connections / Get Related Item From .. and choose your parent web part.&lt;br /&gt;You can also edit the view to remove some columns and do filtering if you like.&lt;br /&gt;Think that's it... spend a bit of time configuring the page as it takes a while to get it looking good.&lt;br /&gt;The most important thing was the SQL username and Password I mentioned above.&lt;br /&gt;&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-56538730336976872?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/56538730336976872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/05/starting-out-with-sharepoint-2007-bdc.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/56538730336976872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/56538730336976872'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/05/starting-out-with-sharepoint-2007-bdc.html' title='Starting out with Sharepoint 2007 BDC'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-3644974578084141223</id><published>2008-05-02T00:50:00.003+10:00</published><updated>2008-05-02T00:55:10.716+10:00</updated><title type='text'>How to Serialize and Deserialize objects. Greate for WCF</title><content type='html'>This code rocks thanks to &lt;span style="font-weight:bold;"&gt;Raymond Skelly&lt;/span&gt; for stealing it from someone to give to me!&lt;br /&gt;&lt;br /&gt;        public static string SerialiseObject(object o)&lt;br /&gt;        {&lt;br /&gt;            StringWriter sw = new StringWriter();&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                XmlSerializer s = new XmlSerializer(o.GetType());&lt;br /&gt;                s.Serialize(sw, o);&lt;br /&gt;            }&lt;br /&gt;            catch (Exception e)&lt;br /&gt;            {&lt;br /&gt;                string x = e.Message;&lt;br /&gt;            }&lt;br /&gt;            return sw.ToString();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static object DeserialiseObject(string ObjectString, Type ObjectType)&lt;br /&gt;        {&lt;br /&gt;            XmlSerializer s = new XmlSerializer(ObjectType);&lt;br /&gt;            return s.Deserialize(new StringReader(ObjectString));&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-3644974578084141223?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/3644974578084141223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/05/how-to-serialize-and-deserialize.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3644974578084141223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3644974578084141223'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/05/how-to-serialize-and-deserialize.html' title='How to Serialize and Deserialize objects. Greate for WCF'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-1797190683157426687</id><published>2008-04-30T23:06:00.005+10:00</published><updated>2008-04-30T23:10:29.969+10:00</updated><title type='text'>Serialize a class into XML</title><content type='html'>&lt;b&gt;To serialize a class into XML do the following:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;            FileStream fs = new FileStream("SerializedDate.XML", FileMode.Create);&lt;br /&gt;&lt;br /&gt;            // Create an XmlSerializer object to perform the serialization&lt;br /&gt;&lt;br /&gt;            XmlSerializer xs = new XmlSerializer(typeof(Acres.DataContracts.Data_NewCase_Contract));&lt;br /&gt;&lt;br /&gt;            // Use the XmlSerializer object to serialize the data to the file&lt;br /&gt;            Acres.DataContracts.Data_NewCase_Contract newCase = new Data_NewCase_Contract();&lt;br /&gt;            newCase.CaseId = 7;&lt;br /&gt;            newCase.CaseName = "caseSerialize";&lt;br /&gt;&lt;br /&gt;            xs.Serialize(fs, newCase);&lt;br /&gt;&lt;br /&gt;            // Close the file&lt;br /&gt;&lt;br /&gt;            fs.Close();&lt;br /&gt;&lt;br /&gt;&lt;b&gt;And the result is: &lt;/b&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;Data_NewCase_Contract xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;&lt;br /&gt;  &amp;lt;CaseId&amp;gt;7&amp;lt;/CaseId&amp;gt;&lt;br /&gt;  &amp;lt;CaseName&amp;gt;caseSerialize&amp;lt;/CaseName&amp;gt;&lt;br /&gt;&amp;lt;/Data_NewCase_Contract&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-1797190683157426687?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/1797190683157426687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/04/serialize-class-into-xml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1797190683157426687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1797190683157426687'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/04/serialize-class-into-xml.html' title='Serialize a class into XML'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-2019596604480835109</id><published>2008-04-30T20:38:00.012+10:00</published><updated>2008-04-30T21:02:44.188+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Infopath 2007'/><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='stsadm'/><title type='text'>Delete Infopath 2007 Forms from Sharepoint</title><content type='html'>I was trying to delete infopath 2007 forms from:&lt;br /&gt;&lt;br /&gt;&lt;a href="_admin/ManageFormTemplates.aspx"&gt;_admin/ManageFormTemplates.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I could delete them but they just remained in the deleting status.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;I found I had to do the following at the command prompt:&lt;/span&gt;&lt;br /&gt;cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN&lt;br /&gt;stsadm.exe -o execadmsvcjobs&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;It outputs the following:&lt;/span&gt;&lt;br /&gt;Executing .&lt;br /&gt;Executing solution-deployment-form-ebformpublished1-370.wsp-0.&lt;br /&gt;Operation completed successfully.&lt;br /&gt;&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-2019596604480835109?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/2019596604480835109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/04/delete-infopath-forms-from-sharepoint.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2019596604480835109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2019596604480835109'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/04/delete-infopath-forms-from-sharepoint.html' title='Delete Infopath 2007 Forms from Sharepoint'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-3260128120484169061</id><published>2008-04-30T17:18:00.003+10:00</published><updated>2008-04-30T21:09:00.520+10:00</updated><title type='text'>TFSDeleteProject</title><content type='html'>Hello me,&lt;br /&gt;&lt;br /&gt;You can use the FTSDeleteProject command line tool to delete a project from Team Foundation server.&lt;br /&gt;&lt;br /&gt;The Microsoft post is here:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms181482(VS.80).aspx"&gt;TFSDeleteProject&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The syntax is &lt;br /&gt;Use CMD prompt&lt;br /&gt;&lt;br /&gt;cd C:\Program Files\Microsoft Visual Studio 8\Common7\IDE&lt;br /&gt;&lt;br /&gt;TFSDeleteproject [/q] [/force] [/server:servername] team project name&lt;br /&gt;&lt;br /&gt;It goes through and deletes the following stuff; (NOTE: it takes ages)&lt;br /&gt;Deleting from Build ...&lt;br /&gt;Done&lt;br /&gt;Deleting from Work Item Tracking ...&lt;br /&gt;Done&lt;br /&gt;Deleting from Version Control ...&lt;br /&gt;Done&lt;br /&gt;Deleting Report Server files ...&lt;br /&gt;Done&lt;br /&gt;Deleting SharePoint site ...&lt;br /&gt;Done&lt;br /&gt;Deleting from Team Foundation Core ...&lt;br /&gt;Done&lt;br /&gt;&lt;br /&gt;Seems to just mark is deleted but not permanently delete it.&lt;br /&gt;&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-3260128120484169061?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/3260128120484169061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/04/tfsdeleteproject.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3260128120484169061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3260128120484169061'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/04/tfsdeleteproject.html' title='TFSDeleteProject'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-441151751552293737</id><published>2008-04-16T22:09:00.015+10:00</published><updated>2008-04-16T22:30:23.679+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ContentType'/><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Workflow'/><title type='text'>My Sharepoint Workflow is not seeing my custom content type column</title><content type='html'>Just like to say a big thanks to Andrew Carter for pointing me in the right direction on this one.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Andrew Carter's post&lt;/span&gt;&lt;br /&gt;&lt;a href="http://suguk.org/forums/thread/9820.aspx"&gt;http://suguk.org/forums/thread/9820.aspx&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scott Wickham's post &lt;/span&gt; &lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1131769&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1131769&amp;amp;SiteID=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It seems you have to create your own hash variable along side the other variable:&lt;br /&gt;&lt;br /&gt;  taskHash["UserInputField"] = UserInputField.Text;&lt;br /&gt;  taskHash["UserInputField_ForHash"] = UserInputField.Text;&lt;br /&gt;  taskHash["Status"] = "Completed";&lt;br /&gt;  taskHash["Status_ForHash"] = "Completed";&lt;br /&gt;&lt;br /&gt;=============================================================================&lt;br /&gt;Here is a copy of the answer from Scott in the above link:&lt;br /&gt;Since we're using WSS 3.0 and not MOSS 2007, we have to create and use ASP forms for any custom Workflow Task Edit pages instead of being able to use InfoPath forms (which would be nice...maybe some day we'll step up to MOSS). The custom Workflow Edit Pages are used for custom Task Content Types that we create so that our Workflow Tasks can have additional fields beyond the standard Workflow Task fields. Once you've collected the values for the Task fields from the user on the ASP Workflow Task Edit form, the typical procedure is to create a hashtable and fill the hashtable with key/value pairs that represent the names of your Task fields and their associated values, as such:&lt;br /&gt;&lt;br /&gt;// This function is called when the user clicks the Save/Submit button&lt;br /&gt;// on the Custom Task Edit ASP form&lt;br /&gt;public void btnSubmit_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;  // Create a hashtable that will be used to update the values of task fields&lt;br /&gt;  Hashtable taskHash = new Hashtable();&lt;br /&gt;  // For each field, create two values in the hashtable. If the field name &lt;br /&gt;  // matches a field in the Task content type, the field name will not be &lt;br /&gt;  // searchable as a key within the ExtendedProperties hashtable. So &lt;br /&gt;  // create a second field that is a duplicate of the first but having a &lt;br /&gt;  // name that doesn't exactly match an existing field in the Task &lt;br /&gt;  // content type. That way it will be a searchable key within the &lt;br /&gt;  // ExtendedProperties hashtable.&lt;br /&gt;  taskHash["UserInputField"] = UserInputField.Text;&lt;br /&gt;  taskHash["UserInputField_ForHash"] = UserInputField.Text;&lt;br /&gt;  taskHash["Status"] = "Completed";&lt;br /&gt;  taskHash["Status_ForHash"] = "Completed";&lt;br /&gt;  // Alter the task using the vaues in the hashtable&lt;br /&gt;  SPWorkflowTask.AlterTask(taskListItem, taskHash, true);&lt;br /&gt;  // Redirect to the appropriate web page&lt;br /&gt;  SPUtility.Redirect(taskList.DefaultViewUrl, SPRedirectFlags.UseSource, HttpContext.Current);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;When you make the SPWorkflowTask.AlterTask() call, the values in the hashtable are stored in the Task in the ExtendedProperties collection for the Task. That having been done, the onTaskChanged() event of your Workflow (if you have defined one for this task) will fire. If you want to access the just-changed values for this task, you will find them in the ExtendedProperties collection of the AfterProperties for the task: &lt;br /&gt;&lt;br /&gt;private void onTaskChanged_Invoked(object sender, ExternalDataEventArgs e)&lt;br /&gt;{&lt;br /&gt;    // The taskIsComplete boolean variable is used as the&lt;br /&gt;    // test for the while loop in our workflow that controls&lt;br /&gt;    // when we break out of the loop and move to the &lt;br /&gt;    // CompleteTask() step. When the value is set to &lt;br /&gt;    // "Complete" on the ASP form, the ASP form saves it &lt;br /&gt;    // in the Task and then we retrieve it here in the&lt;br /&gt;    // onTaskChanged() event&lt;br /&gt;    if (taskAfterProperties.ExtendedProperties["Status_ForHash"] == "Completed")&lt;br /&gt;        taskIsComplete = true;&lt;br /&gt;    else&lt;br /&gt;        taskIsComplete = false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The thing to note (and the thing that caused us a lot of grief trying to figure out) is that you cannot access the field in the ExtendedProperties hashtable using the actual name of the field. This is because, for some reason, even though you store the field in the hashtable using the Name of the field as the key (e.g., "Status"), the ExtendedProperties collection actually uses the GUID of the field as the key and not the field name.&lt;br /&gt;&lt;br /&gt;To show it visually, here are the actual contents of the hashtable from the code above (using Visual Studio debugger). The first column shows the key values for the hashtable, and the second column shows the corresponding values for each key:&lt;br /&gt;&lt;br /&gt;ExtendedProperties Count = 10 System.Collections.Hashtable&lt;br /&gt;&lt;br /&gt;[{53101f38-dd2e-458c-b245-0c236cc13d1a}] "DOMAIN\\swickham" &lt;br /&gt;[{c15b34c3-ce7d-490a-b133-3f4de8801b76}] "Completed" &lt;br /&gt;["Status_ForHash"]                       "Completed" &lt;br /&gt;[{1c5518e2-1e99-49fe-bfc6-1a8de3ba16e2}] "ows_UserInputField_ForHash='yes' ows_Status_ForHash='Completed' " &lt;br /&gt;[{f1e020bc-ba26-443f-bf2f-b68715017bbc}] "512" &lt;br /&gt;[{8cbb9252-1035-4156-9c35-f54e9056c65a}] "&lt;HTMLxx&gt;\n  &lt;HEADxx&gt;\n    &lt;STYLExx&gt;\nTABLE.mail\n{\n..." &lt;br /&gt;[{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}] 155 &lt;br /&gt;[{4c12d635-7607-4911-a54a-7c239acdfcc3}] "yes" &lt;br /&gt;["UserInputField_ForHash"]               "yes" &lt;br /&gt;[{4d2444c2-0e97-476c-a2a3-e9e4a9c73009}] "2007-01-19T17:10:55Z" &lt;br /&gt;&lt;br /&gt;Notice that both values got saved for each field, but in the case of the field name for "Status", the GUID for the Status field is saved as the key and not the string "Status" that we asked it to save. Therefore, you can't retrieve the value of the Status field using "Status" as the key to the hashtable. The only time the ExtendedProperties will actually use the values you store as Field Names for the key is when the Field Names you use do not match any actual field names in the Task Content Type. That's why we use the scheme in the first block of code where we save the value of the field twice...first using the actual Field Name and the second time using a modified version of the field name that is similar enough to recognize. Then whenever we want to access the Task Field values in situations where we can get at them directly through the Field Collection (vs. through the ExtendedProperties Collection), we can use code such as:&lt;br /&gt;&lt;br /&gt;string taskStatus = taskListItem["Status"];&lt;br /&gt;&lt;br /&gt;And whenever we want to access the Task Field values in situations where we can't get at them directly through the Field Collection and must use the ExtendedProperties Collection, we can use code such as:&lt;br /&gt;&lt;br /&gt;string taskStatus = taskAfterProperties.ExtendedProperties["Status_ForHash"];&lt;br /&gt;&lt;br /&gt;and both values will be the same.&lt;br /&gt;&lt;br /&gt;Please let us know if we're missing a much better way of doing this!&lt;br /&gt;&lt;br /&gt;Scott&lt;br /&gt;=============================================================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-441151751552293737?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/441151751552293737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/04/my-sharepoint-workflow-is-not-seeing-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/441151751552293737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/441151751552293737'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/04/my-sharepoint-workflow-is-not-seeing-my.html' title='My Sharepoint Workflow is not seeing my custom content type column'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-3402166594285277063</id><published>2008-04-07T16:55:00.000+10:00</published><updated>2008-04-07T17:03:41.650+10:00</updated><title type='text'>SendActivity with Workflow, WCF and Sharepoint MOSS 2007</title><content type='html'>Recently, I had to include a Sharepoint Workflow &lt;span style="font-weight:bold;"&gt;SendActivity &lt;/span&gt;in one of my workflows as I needed to talk to a &lt;span style="font-weight:bold;"&gt;remote WCF service&lt;/span&gt; I had written to talk to an Oracle database.&lt;br /&gt;&lt;br /&gt;Everything was working great until I deployed my workflow to Sharepoint. Alas there was &lt;span style="font-weight:bold;"&gt;no config for the WCF endpoint&lt;/span&gt; and it took me ages to figure out where to put it.&lt;br /&gt;&lt;br /&gt;In the end it was easy that's to some tips from Andrew Carter:&lt;br /&gt;&lt;a href="http://suguk.org/members/Hope4sun.aspx"&gt;http://suguk.org/members/Hope4sun.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;All I had to do was paste my &lt;span style="font-weight:bold;"&gt;System.ServiceModel config&lt;/span&gt; into the configuration section of the Web.config of my current Sharepoint Site.&lt;br /&gt;&lt;br /&gt;Nice and seems like the type of thing that a lot of people would run into but it was a nightmare trying to find posts on this item.&lt;br /&gt;&lt;br /&gt;RuSs &lt;br /&gt;&lt;br /&gt;oh..ps...&lt;br /&gt;This guy has some commments to:&lt;br /&gt;&lt;a href="http://blogs.msdn.com/bgeorgi/archive/2007/01/06/calling-a-wcf-web-service-from-sharepoint.aspx"&gt;Click here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-3402166594285277063?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/3402166594285277063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/04/sendactivity-with-workflow-wcf-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3402166594285277063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/3402166594285277063'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/04/sendactivity-with-workflow-wcf-and.html' title='SendActivity with Workflow, WCF and Sharepoint MOSS 2007'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4319631812733885349</id><published>2008-04-03T18:44:00.001+11:00</published><updated>2008-04-30T17:26:43.945+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Workflow'/><title type='text'>The debug settings are not valid. Restart the SharePoint Workflow Project Setup Wizard to enter the settings again.</title><content type='html'>I recently renames a workflow project in Visual Studio and in Visual Source Control.&lt;br /&gt;&lt;br /&gt;All was fine but then my project would not deploy to sharepoint with the following message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The debug settings are not valid. Restart the SharePoint Workflow Project Setup Wizard to enter the settings again.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I couldnt figure out what it was but then I right clicked on the workflow project and selected &lt;br /&gt;&lt;br /&gt;Sharepoint debug Settings ...&lt;br /&gt;(VS 2008)&lt;br /&gt;&lt;br /&gt;And I saw that it had reset the SPList that I was pointing to.&lt;br /&gt;&lt;br /&gt;I put it all back the way it should be and all was ok after that.&lt;br /&gt;&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4319631812733885349?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4319631812733885349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/04/debug-settings-are-not-valid-restart.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4319631812733885349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4319631812733885349'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/04/debug-settings-are-not-valid-restart.html' title='The debug settings are not valid. Restart the SharePoint Workflow Project Setup Wizard to enter the settings again.'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-5819064845980765334</id><published>2008-03-14T23:02:00.001+11:00</published><updated>2008-03-14T23:02:50.550+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cursor'/><category scheme='http://www.blogger.com/atom/ns#' term='sql2005'/><title type='text'>My sample cursor</title><content type='html'>set ANSI_NULLS ON&lt;br /&gt;set QUOTED_IDENTIFIER ON&lt;br /&gt;GO&lt;br /&gt;-- =============================================&lt;br /&gt;-- Author:  &lt;Author,,Name&gt;&lt;br /&gt;-- Create date: &lt;Create Date,,&gt;&lt;br /&gt;-- Description: &lt;Description,,&gt;&lt;br /&gt;-- =============================================&lt;br /&gt;ALTER PROCEDURE [dbo].[COPY_MASTER] &lt;br /&gt;&lt;br /&gt;@scenarioID int,&lt;br /&gt;@NewScenarioName varchar(50)&lt;br /&gt;&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt; DECLARE @NewScenarioID int&lt;br /&gt;&lt;br /&gt; DECLARE @CurrentPropertyID int&lt;br /&gt; DECLARE @NewPropertyID int&lt;br /&gt;&lt;br /&gt; DECLARE @CurrentAssetID int&lt;br /&gt;&lt;br /&gt; DECLARE @NewAssetID int &lt;br /&gt;&lt;br /&gt; DECLARE @CurrentHeadleaseID int&lt;br /&gt; DECLARE @CurrentSubleaseID int&lt;br /&gt;&lt;br /&gt; SET NOCOUNT ON;&lt;br /&gt;&lt;br /&gt; -- COPY SCENARIO&lt;br /&gt; print  ' - BEGINNING TO COPY SCENARIO - ' + Convert(varchar(20), @scenarioID)&lt;br /&gt;&lt;br /&gt; EXEC COPY_Scenario @scenarioID, @NewScenarioName, @NewScenarioID OUTPUT&lt;br /&gt; DECLARE Properties_Cursor CURSOR FOR&lt;br /&gt;&lt;br /&gt; SELECT propertyID&lt;br /&gt; FROM [Property]&lt;br /&gt; WHERE ScenarioID = @scenarioID&lt;br /&gt;&lt;br /&gt; OPEN Properties_Cursor&lt;br /&gt;   &lt;br /&gt; FETCH NEXT FROM Properties_Cursor&lt;br /&gt; INTO @CurrentPropertyID   &lt;br /&gt;&lt;br /&gt; WHILE @@FETCH_STATUS = 0&lt;br /&gt;&lt;br /&gt; BEGIN&lt;br /&gt;  print '====================================================='&lt;br /&gt;  print '   -- The current propertyID is - ' + Convert(varchar(20), @CurrentPropertyID)&lt;br /&gt;&lt;br /&gt;  EXEC COPY_Properties @scenarioID, @NewScenarioID, @CurrentPropertyID, @NewPropertyID OUTPUT&lt;br /&gt;&lt;br /&gt;   -- GET ALL ASSETS TO LOOP THROUGH ------------------------&lt;br /&gt;   DECLARE Assets_Cursor CURSOR FOR&lt;br /&gt;   SELECT DISTINCT AssetID from [asset] WHERE propertyID = @CurrentPropertyID&lt;br /&gt;&lt;br /&gt;   OPEN Assets_Cursor&lt;br /&gt;     &lt;br /&gt;   FETCH NEXT FROM Assets_Cursor&lt;br /&gt;   INTO @CurrentAssetID   &lt;br /&gt;&lt;br /&gt;   WHILE @@FETCH_STATUS = 0&lt;br /&gt;&lt;br /&gt;   BEGIn&lt;br /&gt;    print ''&lt;br /&gt;    print '     --- The current assetID is - ' + Convert(varchar(20), @CurrentAssetID)&lt;br /&gt;&lt;br /&gt;    EXEC COPY_Assets @NewPropertyID, @CurrentAssetID, @NewAssetID OUTPUT &lt;br /&gt;&lt;br /&gt;    EXEC COPY_Headleases @CurrentAssetID, @NewAssetID, @CurrentHeadleaseID OUTPUT &lt;br /&gt;&lt;br /&gt;    IF @CurrentHeadleaseID &gt; 0&lt;br /&gt;     BEGIN&lt;br /&gt;      print '       ----- The current HeadleaseID is - ' + Convert(varchar(20), @CurrentHeadleaseID)&lt;br /&gt;     END&lt;br /&gt;    ELSE&lt;br /&gt;     print '       ----- NO HEADLEASE'&lt;br /&gt;&lt;br /&gt;    EXEC COPY_Subleases @CurrentAssetID, @NewAssetID, @CurrentSubleaseID OUTPUT&lt;br /&gt;&lt;br /&gt;    IF @CurrentSubleaseID &gt; 0&lt;br /&gt;     BEGIN&lt;br /&gt;      print '       ----- The current SubleaseID is - ' + Convert(varchar(20), @CurrentSubleaseID)&lt;br /&gt;     END&lt;br /&gt;    ELSE&lt;br /&gt;     print '       ----- NO SUBLEASE'&lt;br /&gt;&lt;br /&gt;    FETCH NEXT FROM Assets_Cursor&lt;br /&gt;    INTO @CurrentAssetID&lt;br /&gt;   END&lt;br /&gt;&lt;br /&gt;   CLOSE Assets_Cursor&lt;br /&gt;   DEALLOCATE Assets_Cursor&lt;br /&gt;   ---------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  FETCH NEXT FROM Properties_Cursor&lt;br /&gt;  INTO @CurrentPropertyID&lt;br /&gt; END&lt;br /&gt;&lt;br /&gt; CLOSE Properties_Cursor&lt;br /&gt; DEALLOCATE Properties_Cursor&lt;br /&gt;&lt;br /&gt; print '*******************************************************'&lt;br /&gt; print '*******************************************************'&lt;br /&gt; print  '***** THE SCENARIO - ' + Convert(varchar(20), @scenarioID) + ' WAS COPIED SUCCESSFULLY ****'&lt;br /&gt; print '*******************************************************'&lt;br /&gt; print '*******************************************************'&lt;br /&gt;&lt;br /&gt;END&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-5819064845980765334?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/5819064845980765334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/03/my-sample-cursor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5819064845980765334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5819064845980765334'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/03/my-sample-cursor.html' title='My sample cursor'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-1046592873707030322</id><published>2008-03-13T00:16:00.001+11:00</published><updated>2008-03-13T00:16:38.541+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='w3wp'/><title type='text'>Determining the correct w3wp process</title><content type='html'>Determining the correct w3wp process can be a bit tricky. To isolate the correct process:&lt;br /&gt;- From the server machine, open a command prompt&lt;br /&gt;- Navigate to the System32 directory and run the following script: iisapp.vbs. This script will list all the currently running w3wp.exe processes, listing their PID and associated application pool id. The application pool id is the only relation between the pid and your application.&lt;br /&gt;- Use the PID to identify the correct w3wp.exe on the “Attach to Process” screen.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-1046592873707030322?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/1046592873707030322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/03/determining-correct-w3wp-process.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1046592873707030322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1046592873707030322'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/03/determining-correct-w3wp-process.html' title='Determining the correct w3wp process'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-2111439610950357239</id><published>2008-02-27T18:22:00.000+11:00</published><updated>2008-02-27T18:25:15.374+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='GAC'/><title type='text'>Toolbox drag fails in VS 2008</title><content type='html'>When creating a new custom activity in VS 2008 and dragging this new activity from the toolbox it fails and says it's removing it from the toolbox. &lt;br /&gt;&lt;br /&gt;What you need to do is shut VS 2008, uninstall the .dll from the GAC, restart VS 2008, rebuild project to put the .dll back into the GAC and you should now be able the drag your new custom activity from the toolbox.&lt;br /&gt;&lt;br /&gt;Thanks for wasting my time MS!&lt;br /&gt;&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-2111439610950357239?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/2111439610950357239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/02/toolbox-drag-fails-in-vs-2008.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2111439610950357239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2111439610950357239'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/02/toolbox-drag-fails-in-vs-2008.html' title='Toolbox drag fails in VS 2008'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4121308919397263556</id><published>2008-02-07T13:14:00.000+11:00</published><updated>2008-02-07T13:16:53.332+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='comments'/><category scheme='http://www.blogger.com/atom/ns#' term='help'/><title type='text'>Free Download: Sticky Notes tool for Visual Studio 2008</title><content type='html'>This is an interesting little utility!  Imagine being able to attach notes to code to remind you of "issues" or things that you need to remember about that piece of code.  In the past, I would have put those messages into comment blocks within the code, but honestly those notes get lost in the mix with my regular code-comments.  So, although this will be one of those tools that you might install and forget to use it, you might find it useful and the cost is reasonable: FREE.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.msdn.microsoft.com/StickyNotes/Release/ProjectReleases.aspx?ReleaseId=67"&gt;Get it here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4121308919397263556?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://code.msdn.microsoft.com/StickyNotes/Release/ProjectReleases.aspx?ReleaseId=67' title='Free Download: Sticky Notes tool for Visual Studio 2008'/><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4121308919397263556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/02/free-download-sticky-notes-tool-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4121308919397263556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4121308919397263556'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/02/free-download-sticky-notes-tool-for.html' title='Free Download: Sticky Notes tool for Visual Studio 2008'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-9015168371843141167</id><published>2008-01-12T01:50:00.000+11:00</published><updated>2008-01-12T01:51:25.068+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='sql2005'/><title type='text'>Create SQL 2005 pivot table</title><content type='html'>CREATE TABLE #FinalTable&lt;br /&gt;(&lt;br /&gt; [Name] varchar(10),&lt;br /&gt; [Month] varchar(10),&lt;br /&gt; amount float      &lt;br /&gt;)&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Insert into #finaltable values ('Ray','Jan',1)&lt;br /&gt;Insert into #finaltable values ('Ray','Feb',2)&lt;br /&gt;Insert into #finaltable values ('Ray','Mar',3)&lt;br /&gt;&lt;br /&gt;Insert into #finaltable values ('Eimaer','Jan',5)&lt;br /&gt;Insert into #finaltable values ('Eimaer','Feb',6)&lt;br /&gt;Insert into #finaltable values ('Eimaer','Mar',7)&lt;br /&gt; &lt;br /&gt;select &lt;br /&gt; [Name],&lt;br /&gt; isnull(sum([Jan]),0) as 'Jan',&lt;br /&gt; isnull(sum([Feb]),0) as 'Feb',&lt;br /&gt; isnull(sum([Mar]),0) as 'MAr'&lt;br /&gt;from #FinalTable&lt;br /&gt; AS Data PIVOT( &lt;br /&gt;    SUM( amount) &lt;br /&gt;    FOR [Month] IN&lt;br /&gt;    ([Jan],[Feb],[Mar])&lt;br /&gt;&lt;br /&gt; ) AS PVT&lt;br /&gt;&lt;br /&gt;group by [Name]&lt;br /&gt;&lt;br /&gt;drop table #FinalTable&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-9015168371843141167?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/9015168371843141167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/01/create-sql-2005-pivot-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/9015168371843141167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/9015168371843141167'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/01/create-sql-2005-pivot-table.html' title='Create SQL 2005 pivot table'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-4754652838794686741</id><published>2008-01-07T21:15:00.000+11:00</published><updated>2008-01-07T21:17:11.518+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><title type='text'>Microsoft.Office.Workflow.Utility</title><content type='html'>The 2007 Office System Starter Kit: Enterprise Content Management Starter Kit (ECMsk) has in it some Visual Studio project templates to get you started with using SharePoint and Workflow together.  However, it’s in beta so it’s not perfect…&lt;br /&gt;&lt;br /&gt;The first issue isn’t that bad, it adds a reference to Microsoft.Office.Workflow.Tasks – which isn’t installed with WSSv3 – even with Office 2007 Pro and InfoPath 2007  installed.  It means removing the reference and the using line ‘using Microsoft.Office.Workflow.Utility’ in the workflow1.cs file.   Not that big a deal all things considered.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-4754652838794686741?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/4754652838794686741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/01/microsoftofficeworkflowutility.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4754652838794686741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/4754652838794686741'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/01/microsoftofficeworkflowutility.html' title='Microsoft.Office.Workflow.Utility'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-5089080513302228959</id><published>2008-01-05T01:42:00.001+11:00</published><updated>2008-01-05T01:42:54.984+11:00</updated><title type='text'>Where is my PostBuildActions.Bat file GRRR</title><content type='html'>This is from Scott Guthrie:&lt;br /&gt;&lt;br /&gt;Microsoft called me at work and confirmed that, out of the box, VS 2008's new Build/Deploy option will not support deployment of InfoPath workflow forms (intialization, association, task, modfication) required by a SharePoint workflow project.  VS 2005, via add-ons created by Microsoft, supported deployment of those forms, as long as they were published to the DeploymentFiles\FeatureFiles subdirectory.  To bring VS 2008 to the same level of support as VS 2005 provides, I was told that I would have to (1) manually create the same directory structure as VS 2005 uses, immediately after creating the new Project of type SharePoint workflow, (2) move workflow.xml and feature.xml from where they were originally created to the DeploymentFiles\FeatureFiles subdirectory, (3) borrow a copy of PostBuildActions.bat from an older VS 2005 project and make extensive (but unspecified) changes to it comment/remove lines that duplicate the functionality of the Build/Deploy menu item.&lt;br /&gt;&lt;br /&gt;Developers will have to decide for themselves if the gains outweigh the losses when it comes to using VS 2008 for creating SharePoint workflow projects.  I have sent Microsoft a revised edition of my analysis of this situation.&lt;br /&gt;&lt;br /&gt;Until and unless enough developers demand that VS 2008 provide at least as much support for SharePoint workflow development that includes InfoPath task forms as VS 2005 provides, there is no way to tell when VS 2008 will be the equal of VS 2005 in this particular area.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-5089080513302228959?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/5089080513302228959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/01/where-is-my-postbuildactionsbat-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5089080513302228959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5089080513302228959'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/01/where-is-my-postbuildactionsbat-file.html' title='Where is my PostBuildActions.Bat file GRRR'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-1110500977072132960</id><published>2008-01-04T20:21:00.000+11:00</published><updated>2008-01-04T20:48:23.618+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='GAC'/><title type='text'>Deactivate and delete a workflow feature from Sharepoint</title><content type='html'>You must deactivate the feature first. You can do this with the following line or click deactivate in the browser.&lt;br /&gt;&lt;br /&gt;Use command line.&lt;br /&gt;&lt;br /&gt;You may need to navigate here first:&lt;br /&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN&lt;br /&gt;&lt;br /&gt;stsadm -o deactivatefeature -filename RollOffDiceWF\feature.xml -url http://my2003server&lt;br /&gt;stsadm -o uninstallfeature -filename RollOffDiceWF\feature.xml&lt;br /&gt;&lt;br /&gt;You can uninstall from the GAC as follows:&lt;br /&gt;&lt;br /&gt;Navigate to:&lt;br /&gt;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322&lt;br /&gt;&lt;br /&gt;I just right clicked "uninstall" as the comment line way would not work&lt;br /&gt;&lt;br /&gt;Also navigate to here:&lt;br /&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES&lt;br /&gt;Delete the folder that relates to the project you want to read&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-1110500977072132960?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/1110500977072132960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2008/01/deactivate-and-delete-workflow-feature.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1110500977072132960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/1110500977072132960'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2008/01/deactivate-and-delete-workflow-feature.html' title='Deactivate and delete a workflow feature from Sharepoint'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-2051382623099525222</id><published>2007-12-17T23:28:00.000+11:00</published><updated>2007-12-17T23:31:04.345+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='DLLS'/><title type='text'>Where are all the sharepoint DLLs</title><content type='html'>copy the DLL's from &lt;span style="font-weight:bold;"&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI&lt;/span&gt; on the server to the same folder on my development machine.&lt;br /&gt;B) Register the following in the GAC (Just drag drop from the ....\ISAPI folder&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-2051382623099525222?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/2051382623099525222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2007/12/where-are-all-sharepoint-dlls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2051382623099525222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/2051382623099525222'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2007/12/where-are-all-sharepoint-dlls.html' title='Where are all the sharepoint DLLs'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-555737248013148828</id><published>2007-12-17T22:50:00.000+11:00</published><updated>2007-12-17T23:31:29.338+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DLLS'/><category scheme='http://www.blogger.com/atom/ns#' term='GAC'/><title type='text'>How to get all your GAC DLLs ?</title><content type='html'>From CMD prompt enter: C:\windows\assembly\ : XCOPY GAC_MSIL c:\temp /E&lt;br /&gt;&lt;br /&gt;And you have your dlls, classified by namespace !&lt;br /&gt;&lt;br /&gt;(if you want to extract DLLs from the non-msil part of the GAC, the command line become : XCOPY GAC c:\temp /E)&lt;br /&gt;&lt;br /&gt;Always wondered how to get them out!&lt;br /&gt;&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-555737248013148828?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/555737248013148828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2007/12/how-to-get-all-your-gac-dlls.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/555737248013148828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/555737248013148828'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2007/12/how-to-get-all-your-gac-dlls.html' title='How to get all your GAC DLLs ?'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-99218194333390577</id><published>2007-12-12T01:24:00.000+11:00</published><updated>2007-12-12T02:37:19.165+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Workflow'/><title type='text'>Visual Studio 2008 - Code snippets Missing</title><content type='html'>Afternoon,&lt;br /&gt;&lt;br /&gt;I just started to write a sequential workflow and noticed that the DependencyProperty code snippet  for workflow was missing. Had a hunt around on the web with no luck.&lt;br /&gt;&lt;br /&gt;I looked at the existing snippets and noticed they were located here:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;e:\Program Files\Microsoft Visual Studio 9.0\VC#\Snippets\1033\Visual C#\else.snippet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So I looked around and found a folder called:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;E:\Program Files\Microsoft Visual Studio 9.0\VC#\Snippets\1033\Other\Workflow\DependencyProperty - Property.snippet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I clicked Add in my Tools &gt; Code Snippets Manager... and went to the path mentioned for the workflow properties above. I noticed that the propd shortcut was still not available in intellisense so I opened the DependencyProperty - Property.snippet XML file in visual studio and changed the following to:&lt;br /&gt;&lt;Shortcut&gt;&lt;span style="font-weight:bold;"&gt;propd&lt;/span&gt;&lt;/Shortcut&gt;&lt;br /&gt;instead of:&lt;br /&gt;&lt;Shortcut&gt;wfd&lt;/Shortcut&gt;.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;RuSs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-99218194333390577?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/99218194333390577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2007/12/visual-studio-2008-code-snippets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/99218194333390577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/99218194333390577'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2007/12/visual-studio-2008-code-snippets.html' title='Visual Studio 2008 - Code snippets Missing'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3805743522888899142.post-5746104100268123468</id><published>2007-12-06T18:52:00.000+11:00</published><updated>2008-12-10T23:47:11.235+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server'/><category scheme='http://www.blogger.com/atom/ns#' term='TFS'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Setting up Microsoft Team Foundation Server 2008</title><content type='html'>Morning,&lt;br /&gt;&lt;br /&gt;Came in early today to set this up on a new fresh server with windows Server 2003 R2 standard &lt;span style="font-weight: bold;"&gt;x64&lt;/span&gt; edition SP2.&lt;br /&gt;&lt;br /&gt;After much installing of pre-requisites I realised that TFS 2008 cant run on a x64 bit machine.&lt;br /&gt;&lt;br /&gt;What a waste of a day.&lt;br /&gt;&lt;br /&gt;Stay tuned for a post later when get a 32 bit server.&lt;br /&gt;&lt;br /&gt;Bugger!!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/R1kV0ogMh5I/AAAAAAAABXQ/pCGDSUH4i8c/s1600-h/untitled.bmp"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_M8Gn3CMAmQQ/R1kV0ogMh5I/AAAAAAAABXQ/pCGDSUH4i8c/s320/untitled.bmp" alt="" id="BLOGGER_PHOTO_ID_5141164443589969810" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3805743522888899142-5746104100268123468?l=www.russellmccloy.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.russellmccloy.com/feeds/5746104100268123468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.russellmccloy.com/2007/12/setting-up-microsoft-team-foundation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5746104100268123468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3805743522888899142/posts/default/5746104100268123468'/><link rel='alternate' type='text/html' href='http://www.russellmccloy.com/2007/12/setting-up-microsoft-team-foundation.html' title='Setting up Microsoft Team Foundation Server 2008'/><author><name>russell mccloy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-e5rUnhnuzaY/AAAAAAAAAAI/AAAAAAAAG6E/w-blid46y08/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_M8Gn3CMAmQQ/R1kV0ogMh5I/AAAAAAAABXQ/pCGDSUH4i8c/s72-c/untitled.bmp' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
