<?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-30976103</id><updated>2011-12-15T03:13:03.509Z</updated><category term='Typemock'/><category term='Unit Testing'/><title type='text'>El Blanco's Office 2007 Blog</title><subtitle type='html'>A large amount of my professional time is spent developing solutions based on Microsoft SharePoint Server 2003 (SPS 2003) and more recently Microsoft Office SharePoint Server 2007 (MOSS 2007) which I've been using since beta1 timescales.

This is a blog where I will share interesting technical findings about these technologies (even though most postings will be based on MOSS) which I hope other developers and techies will find useful.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-30976103.post-5575416748070345141</id><published>2009-07-29T12:58:00.002+01:00</published><updated>2009-07-29T13:06:10.214+01:00</updated><title type='text'>Update: ItemCheckingIn Event and Detecting a Major Document Version</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;In my &lt;a href="http://chrissyblanco.blogspot.com/2009/07/interrogate-document-version-within.html"&gt;last post&lt;/a&gt; I detailed a problem where within the ItemCheckingIn event receiver I couldn't determine whether the document was being checked in as a major or a minor version and this was causing me big problems. I posted on the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/1c036e6e-2d6a-4e7b-97b5-d0d2545d7197"&gt;MSDN forums&lt;/a&gt; and Aaron Han from Microsoft very kindly investigated the issue in detail and came up with a solution.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The solution is only for those of us running Service Pack 2, but I am running it so it's not an issue for me. If you're hitting this same issue, then here's a reason to update !&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The solution revolves around the "vti_level" property that is available in the BeforeProperties and AfterProperties collections. Here's the breakdown of what this contains when checking in a major version:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Without SP2&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;properties.BeforeProperties["vti_level"] (value is 255)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;properties.AfterProperties["vti_level"] (value is 255)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;With SP2&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;properties.BeforeProperties["vti_level"] (value is 255)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;properties.AfterProperties["vti_level"] (value is 1)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Thanks to SP2 we can now write code such as the following within our ItemCheckingIn event receiver that can detect whether the item being checked in is a major version:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier;font-size:10;"&gt;public override void ItemCheckingIn(SPItemEventProperties properties)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base.ItemCheckingIn(properties);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int beforeLevel = (int)properties.BeforeProperties["vti_level"];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int afterLevel= (int)properties.AfterProperties ["vti_level"];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if((beforeLevel==255) &amp;amp;&amp;amp; (afterLevel==1))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// This is a major version that is being checked in . . .&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int majorVer= properties.ListItem.File.MajorVersion+1; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Hopefully this is helpful as I can't believe I'm the only one who's ever needed this information. Thanks to Aaron Han from Microsoft !!&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/30976103-5575416748070345141?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/5575416748070345141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=5575416748070345141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5575416748070345141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5575416748070345141'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2009/07/update-itemcheckingin-event-and.html' title='Update: ItemCheckingIn Event and Detecting a Major Document Version'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-2736625538089004179</id><published>2009-07-20T15:49:00.002+01:00</published><updated>2009-07-20T15:51:06.219+01:00</updated><title type='text'>Interrogate the Document Version within the ItemCheckingIn Event Receiver?</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;I've added an event receiver to a content type, and I've overridden the &lt;span style="font-family:Courier;font-size:10;"&gt;ItemCheckingIn&lt;/span&gt; event. My scenario is that if the document is being checked in as a Major version (i.e. x dot zero) then unless it fulfils some other criteria I want to prevent the check in from occurring (i.e. set the &lt;span style="font-family:Courier;font-size:10;"&gt;properties.Cancel&lt;/span&gt; property to true, and set the &lt;span style="font-family:Courier;font-size:10;"&gt;properties.ErrorMessage&lt;/span&gt; property to some message indicate that the user must perform some action or other before a major version can be checked in).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So my scenario is that in the &lt;span style="font-family:Courier;font-size:10;"&gt;ItemCheckingIn&lt;/span&gt; event receiver method I want to interrogate whether the document is being checked in as a minor or a major version - sounds simple enough, right?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I first of all checked the following property within my event receiver:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier;font-size:10;"&gt;properties.ListItem.File.UIVersionLabel&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;But I soon realised that since &lt;span style="font-family:Courier;font-size:10;"&gt;ItemCheckingIn&lt;/span&gt; is the synchronous event receiver method, then the item hasn't actually been checked in yet, so I won't have the new version number applied yet. So I changed this to check the following within my event receiver:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10;"&gt;&lt;span style="font-family:Courier;"&gt;properties.AfterProperties[&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;"&lt;/span&gt;&lt;span style="font-family:Courier;"&gt;vti_sourcecontrolversion&lt;/span&gt;&lt;span style="font-family:Calibri;"&gt;"&lt;/span&gt;&lt;span style="font-family:Courier;"&gt;]&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;However this still doesn't work – when I check in a major version, it just gives me the minor version number. If I check this property afterwards in the &lt;span style="font-family:Courier;font-size:10;"&gt;ItemCheckedIn&lt;/span&gt; event then I DO get the correct major version number, but obviously this is too late to cancel the check in operation since &lt;span style="font-family:Courier;font-size:10;"&gt;ItemCheckedIn&lt;/span&gt; is the asynchronous event receiver and it's not possible to prevent the operation in this event receiver method.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Has anyone come across this problem before – in the &lt;span style="font-family:Courier;font-size:10;"&gt;ItemCheckingIn&lt;/span&gt; event receiver method how can I tell what version of the document is being checked in i.e. whether it's a major or a minor version?!&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/30976103-2736625538089004179?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/2736625538089004179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=2736625538089004179' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/2736625538089004179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/2736625538089004179'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2009/07/interrogate-document-version-within.html' title='Interrogate the Document Version within the ItemCheckingIn Event Receiver?'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-4601505015897827724</id><published>2009-05-19T08:43:00.001+01:00</published><updated>2009-05-19T08:46:40.417+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Typemock'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Testing'/><title type='text'>ASP.NET Unit Testing</title><content type='html'>&lt;a href="http://www.typemock.com/"&gt;Unit Testing&lt;/a&gt; ASP.NET? &lt;a href="http://www.typemock.com/ASP.NET_unit_testing_page.php"&gt;ASP.NET unit testing&lt;/a&gt; has never been this easy.&lt;br /&gt;&lt;br /&gt;Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle - and for the launch will be giving out FREE licenses to bloggers and their readers.&lt;br /&gt;&lt;br /&gt;The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both &lt;a href="http://www.typemock.com/"&gt;Typemock Isolator&lt;/a&gt;, a &lt;a href="http://www.typemock.com/"&gt;unit test&lt;/a&gt; tool and &lt;a href="http://sm-art.biz/Ivonna.aspx"&gt;Ivonna&lt;/a&gt;, the Isolator add-on for &lt;a href="http://sm-art.biz/Ivonna.aspx"&gt;ASP.NET unit testing&lt;/a&gt;, for a bargain price.&lt;br /&gt;&lt;br /&gt;Typemock Isolator is a leading &lt;a href="http://www.typemock.com/"&gt;.NET unit testing&lt;/a&gt; tool (C# and VB.NET) for many ‘hard to test’ technologies such as &lt;a href="http://typemock.com/sharepointpage.php"&gt;SharePoint&lt;/a&gt;, &lt;a href="http://www.typemock.com/ASP.NET_unit_testing_page.php"&gt;ASP.NET&lt;/a&gt;, &lt;a href="http://www.typemock.com/ASP.NET_unit_testing_page.php"&gt;MVC&lt;/a&gt;, &lt;a href="http://www.typemock.com/wcfpage.php"&gt;WCF&lt;/a&gt;, WPF, &lt;a href="http://www.typemock.com/Silverlight_unit_testing_page.php"&gt;Silverlight&lt;/a&gt; and more. Note that for &lt;a href="http://www.typemock.com/Silverlight_unit_testing_page.php"&gt;unit testing Silverlight&lt;/a&gt; there is an open source Isolator add-on called &lt;a href="http://www.typemock.com/Silverlight_unit_testing_page.php"&gt;SilverUnit&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The first 60 bloggers who will blog this text in their blog and &lt;a href="http://blog.typemock.com/2009/05/get-free-typemock-licenses-aspnet.html"&gt;tell us about it&lt;/a&gt;, will get a Free Isolator ASP.NET Bundle license (Typemock Isolator + Ivonna). If you post this in an ASP.NET dedicated blog, you'll get a license automatically (even if more than 60 submit) during the first week of this announcement.&lt;br /&gt;&lt;br /&gt;Also 8 bloggers will get an additional 2 licenses (each) to give away to their readers / friends.&lt;br /&gt;&lt;br /&gt;Go ahead, click the following link for &lt;a href="http://blog.typemock.com/2009/05/get-free-typemock-licenses-aspnet.html"&gt;more information &lt;/a&gt;on how to get your free license.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-4601505015897827724?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/4601505015897827724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=4601505015897827724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4601505015897827724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4601505015897827724'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2009/05/aspnet-unit-testing.html' title='ASP.NET Unit Testing'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-7858563082625265120</id><published>2008-10-31T08:11:00.005Z</published><updated>2008-10-31T08:21:18.885Z</updated><title type='text'>The BlancoWorld Workflow Reporting Feature</title><content type='html'>&lt;span xmlns=""&gt;It's been a while since my last blog post because I've been extremely busy in SharePoint land with my job and finding spare time to write blog posts or work on useful add-ons has been very hard indeed. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span xmlns=""&gt;However, over the last few weeks in the spare few minutes I manage to grab here and there I've been working on another add-on that hopefully some people will find useful. A fair few clients I work with have asked the question "how can I report on the workflows that are running or have completed in my site collection ?". The simple answer, as far as I'm aware, is that out of the box, you can't. This has led me to develop my lastest add-on – the BlancoWorld Workflow Reporting Feature. This feature is packaged, as you would expect, as a SharePoint solution file (.wsp) which you can &lt;a href="http://www.codeplex.com/elblanco/Release/ProjectReleases.aspx?ReleaseId=18930"&gt;download from here&lt;/a&gt;. &lt;/span&gt;&lt;br /&gt;&lt;span xmlns=""&gt;&lt;/span&gt;&lt;br /&gt;&lt;span xmlns=""&gt;Once you had deployed the solution you need to activate a site collection feature appropriately called "BlancoWorld Workflow Reporting". Once this feature has been activated then anyone with the "Manage Lists" right will see a new item in their Site Actions menu called "Workflow Reporting" as seen below:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span xmlns=""&gt;&lt;p&gt;&lt;/span&gt;&lt;/p&gt;&lt;span xmlns=""&gt;&lt;img id="BLOGGER_PHOTO_ID_5263228508387059410" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 261px; CURSOR: hand; HEIGHT: 206px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Yj6YHomwaTk/SQq-cU4eptI/AAAAAAAAB-w/GHcqIC5WeUY/s400/1.PNG" border="0" /&gt;&lt;/span&gt;&lt;p&gt;&lt;span xmlns=""&gt;Selecting this menu option will display the following page:&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5263228854626446450" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 158px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_Yj6YHomwaTk/SQq-weuYbHI/AAAAAAAAB-4/tr1E5g02Y5I/s400/2.PNG" border="0" /&gt;Using this page you can determine at what level you wish to run the report. There are three options:&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;This Site Only – selecting this option reports on workflows running only in the current site. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;This Site and Child Sites – selecting this option reports on any workflows running in the current site and any workflows running in any site beneath the current site. This is a recursive option that will interrogate every site in the site collection that resides beneath the current site.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Entire Site Collection – as the name implies, selecting this option will report on any workflow within the whole site collection. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Once you have selected your desired option click on the "OK" button to proceed and the workflow report will be generated and displayed. In the example shown below I've chosen to report on workflows throughout the entire site collection:&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5263229085736793650" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 158px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Yj6YHomwaTk/SQq-97rYdjI/AAAAAAAAB_A/Vzuqni_KdnM/s400/3.PNG" border="0" /&gt; &lt;p&gt;&lt;/p&gt;&lt;p&gt;The report that is generated contains the following columns:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Site – a hyperlink to the site where the workflow is located.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;List – a hyperlink to the list or library where the workflow is located.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Workflow Association Name – the name of the workflow association.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;List Item – a hyperlink to the list item on which the workflow is currently running or ran in the past.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Workflow State – the current state of the workflow.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Workflow Status – a hyperlink to the workflow status page for the workflow. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;When you have finished interrogating your report click on the "Done" button. &lt;/p&gt;&lt;p&gt;Hopefully people will find this add-on useful. I've only tested this add-on in pretty basic scenarios and not in scenarios where there are hundreds / thousands of workflow instances in the site collection so I'd be interested to hear from peoples experiences in these scenarios. I imagine in these sort of scenarios the report may take a while to generate, so I'll consider wrapping the functionality in an SPLongOperation if this turns out to be the case. &lt;/p&gt;&lt;p&gt;If you have any issues with the add-on please drop me an email and I'll try and help as much as a I can. Also, if you'd like to see any other functionality included in the add-on then again please let me know and I'll see what I can do !!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-7858563082625265120?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/7858563082625265120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=7858563082625265120' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7858563082625265120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7858563082625265120'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2008/10/blancoworld-workflow-reporting-feature.html' title='The BlancoWorld Workflow Reporting Feature'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Yj6YHomwaTk/SQq-cU4eptI/AAAAAAAAB-w/GHcqIC5WeUY/s72-c/1.PNG' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-5001050591695444822</id><published>2008-07-04T11:40:00.003+01:00</published><updated>2008-07-11T08:17:43.920+01:00</updated><title type='text'>MOSS Licensing / General Microsoft Licensing Questions ?</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;I don't know how many people know about this blog, I certainly didn't, but &lt;a href='http://ladylicensing.spaces.live.com/default.aspx'&gt;Lady Licensing's blog&lt;/a&gt; covers most things people ask about Microsoft Licensing.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;She has a recent post on &lt;a href='http://ladylicensing.spaces.live.com/blog/cns!87F95F1B5B21B01E!575.entry'&gt;MOSS licensing&lt;/a&gt; which may answer a few questions for people.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Check it out to answer all of your MS licensing questions &lt;span style='font-family:Wingdings'&gt;J&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;Technorati Tags:&lt;a href="http://technorati.com/tag/MOSS+Licensing" rel="tag"&gt;MOSS Licensing&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-5001050591695444822?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/5001050591695444822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=5001050591695444822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5001050591695444822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5001050591695444822'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2008/07/moss-licensing-general-microsoft.html' title='MOSS Licensing / General Microsoft Licensing Questions ?'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-1542421427274753596</id><published>2008-07-03T15:14:00.009+01:00</published><updated>2008-07-03T15:36:25.873+01:00</updated><title type='text'>Adding a SharePoint Site Picker to a _layouts Page</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;I've come across this scenario of a few times . . . you're implementing an application page that sets up some configuration for a SharePoint application you're developing. As part of this configuration, you need your end-user to enter a site from the current site collection. You could just put a text box on your _layout page and let them enter the URL to the site, perhaps adding some server-side validation to ensure that the URL the user entered corresponds to an actual site. A more user friendly approach would be to repurpose the SharePoint site picker dialog box that no doubt you have seen in a few places throughout SharePoint configuration settings: &lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5218791382780712978" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_Yj6YHomwaTk/SGzfHL-DmBI/AAAAAAAAArY/E8I-GBbdL9M/s400/site+picker.PNG" border="0" /&gt; How can you go about doing this ? Well, it's not as hard as you might expect:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;div&gt;Create your _layout page as you normally would, and add two server controls to the .aspx page: a standard ASP.NET text box called txtWebUrl and a standard ASP.NET button contol called btnBrowse.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;In the code behind of your _layout page override the OnPreRender method as shown below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:10;"&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;&lt;strong&gt;protected&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; &lt;/span&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;&lt;strong&gt;override&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; &lt;/span&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;&lt;strong&gt;void&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt; &lt;span style="font-family:Courier New;"&gt;OnPreRender(EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptLink.Register(&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;.Page, &lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"&lt;span style="font-family:Courier New;"&gt;PickerTreeDialog.js"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt;, &lt;/span&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt;);&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddSitePickerControlClientScript();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;.OnPreRender(e);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;}&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;The OnPreRender method registers the "PickerTreeDialog" javascript file that ships with MOSS and contains the "LaunchPickerTreeDialog" function. OnPreRender also calls the "AddSitePickerControlClientScript" method that we need to define as shown below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:10;"&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;&lt;strong&gt;private&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; &lt;/span&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;&lt;strong&gt;void&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt; &lt;span style="font-family:Courier New;"&gt;AddSitePickerControlClientScript()&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;strong&gt;string&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt; script =&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;var lastSelectedSiteSmtPickerId = null; "&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; +&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"function LaunchSitePicker() "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"{ "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"if (!document.getElementById) return; "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;var siteTextBox = document.getElementById('"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; +&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;SPHttpUtility.EcmaScriptStringLiteralEncode(&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;.txtWebUrl.ClientID) +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"'); "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"if (siteTextBox == null) return; "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;var serverUrl = '"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; +&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;SPHttpUtility.EcmaScriptStringLiteralEncode(&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;SPContext.Current.Web.ServerRelativeUrl) +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"'; "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;var callback = function(results) "&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; +&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"{ "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"if (results == null results[1] == null) return; "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;lastSelectedSiteSmtPickerId = results[0]; "&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; +&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;siteTextBox.value = results[1]; "&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; +&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"}; "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;LaunchPickerTreeDialog("&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; +&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"'CbqPickerSelectSiteTitle',"&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"'CbqPickerSelectSiteText', "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"'websOnly','', "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;serverUrl, lastSelectedSiteSmtPickerId,"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; +&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"'','','/_layouts/images/smt_icon.gif','', "&lt;/span&gt;&lt;span style="color:black;"&gt; +&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;callback); "&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; +&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;"}"&lt;/span&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;.Page.ClientScript.RegisterClientScriptBlock(&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;typeof&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;(TestPage),&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"&lt;span style="font-family:Courier New;"&gt;LaunchSitePicker"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt;,&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;script, &lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;}&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;This method defines a JavaScript function called "LaunchSitePicker". The "LaunchSitePicker" function defines a JavaScript callback function which is used by the site picker dialog when the dialog is closed. In the callback function is code that sets the txtWebUrl text box to contain the URL of the selected site. The "LaunchSitePicker" function then calls the "LaunchPickerTreeDialog" function which is part of "PickerTreeDialog.js" i.e. the file that ships with MOSS that we linked to in the OnPreRender method above.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The "AddSitePickerControlClientScript" then calls the RegisterClientScriptBlock page method to register the JavaScript function we defined.&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;The final step is to add the following code in your Page_Load method:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:10;"&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;&lt;strong&gt;protected&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; &lt;/span&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;&lt;strong&gt;void&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt; &lt;span style="font-family:Courier New;"&gt;Page_Load(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;&lt;strong&gt;object&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt; sender, EventArgs e)&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt; (!IsPostBack)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:black;"&gt;.btnBrowse.Attributes.Add(&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"&lt;span style="font-family:Courier New;"&gt;onClick"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt;, &lt;/span&gt;&lt;span style="color:maroon;"&gt;"&lt;span style="font-family:Courier New;"&gt;LaunchSitePicker()"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:black;"&gt;);&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:black;"&gt;}&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;This simply adds on onClick attribute to the btnBrowse button so that the "LaunchSitePicker" JavaScript function we defined is called when the button is clicked.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Following all of the above intructions should give you a _layout page that looks like the following:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5218792349973272338" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_Yj6YHomwaTk/SGzf_fCu1xI/AAAAAAAAAro/ult5IzVwIW8/s400/test+page.PNG" border="0" /&gt; &lt;p&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;Clicking on the "Browse…" button will display the site picker allowing you to select the desired site in your site collection. When you close the site picker by clicking the "OK" button the URL of the selected site will be injected into the text box. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Hopefully this will allow you to develop more user-friendly _layout application pages for your applications.&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/30976103-1542421427274753596?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/1542421427274753596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=1542421427274753596' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/1542421427274753596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/1542421427274753596'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2008/07/adding-sharepoint-site-picker-to_03.html' title='Adding a SharePoint Site Picker to a _layouts Page'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_Yj6YHomwaTk/SGzfHL-DmBI/AAAAAAAAArY/E8I-GBbdL9M/s72-c/site+picker.PNG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-6314159868963597040</id><published>2008-06-26T21:14:00.027+01:00</published><updated>2008-06-27T08:20:30.905+01:00</updated><title type='text'>My Fist Developer Feature: The BlancoWorld Notification Framework</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;&lt;span style="font-size:12;"&gt;&lt;strong&gt;A Call for Beta Testers . . .&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Have you ever had a list with a date/time column (e.g. a column called "Review Date") and you wanted some custom notification functionality to execute 'x' days prior to the date, on the actual date, or 'y' days after the date for each list item in the list?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Are you sick of developing SPJobDefinition classes that simply trawl lists within site collections and implement some custom functionality when a date on that list has expired?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Welcome to the BlancoWorld Notification Framework . . . .&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="TEXT-DECORATION: underline;font-size:12;" &gt;&lt;strong&gt;Installing / Deploying the BlancoWorld Notification Framework&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The BlancoWorld Notification Framework is installed as a SharePoint Solution (BlancoWorld.NotificationFramework.wsp) and once installed and deployed it presents itself as an additional link in the Central Administration site accessed via the "Application Management" tab: &lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5216298731079295026" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_Yj6YHomwaTk/SGQEDwxNYDI/AAAAAAAAAm8/HLeYJ6AofFo/s400/1.PNG" border="0" /&gt; &lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="TEXT-DECORATION: underline;font-size:12;" &gt;&lt;strong&gt;Configuring the BlancoWorld Notification Framework&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Clicking on the "Manage BlancoWorld notification framework" link displays a management page allowing you to specify the web applications and site collections for which the BlancoWorld Notification Framework is enabled and how often the functionality executes: &lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5216299982244108194" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_Yj6YHomwaTk/SGQFMluJV6I/AAAAAAAAAnE/I77bkoDtu7c/s400/2.PNG" border="0" /&gt; &lt;p&gt;&lt;/p&gt;&lt;p&gt;Using this form, select the appropriate Web Application, and select whether to enable or disable the functionality for each Site Collection in the selected Web Application. Finally specify how often the functionality should run for the selected Web Application (e.g. every 10 minutes) – the BlancoWorld Notification Framework runs as a timer job and hence can be scheduled to run every 'x' minutes for each Web Application. &lt;/p&gt;&lt;p&gt;Once the functionality has been enabled for a particular site collection then the link shown below will be displayed on the list settings page for each list within that site collection: &lt;/p&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5216300833882334722" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_Yj6YHomwaTk/SGQF-KUhZgI/AAAAAAAAAnM/YIfURfe6DQY/s400/3.PNG" border="0" /&gt; Clicking on the "Item notification settings" link from the list settings page for a particular list allows you to specify the notification settings for items in that list: &lt;/p&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5216300838250520098" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_Yj6YHomwaTk/SGQF-al-niI/AAAAAAAAAnU/kgnvogHclvI/s400/4.PNG" border="0" /&gt; Tick the "Item Notification Functionality Enabled" checkbox to enable the BlancoWorld Notification Framework functionality on the list. You must then specify the following information: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;The column on which to calculate whether or not to raise notifications – the "Column to Interrogate" drop-down list details all of the Date/Time columns defined on the list. Select the desired column on which to calculate whether or not to raise notifications. &lt;/li&gt;&lt;li&gt;The full assembly name and class name of the type implementing the BlancoWorld Notification Framework Event Handler (see below for details).&lt;/li&gt;&lt;li&gt;The Desired Notification Settings – a list can be configured for Pre-Notifications (i.e. notifications raised 'x' days before the date/time specified in the selected column); Notifications (i.e. notifications raised when the actual date/time specified in the selected column is exceeded); and Post-Notifications (i.e. notifications raised 'y' days after the date/time specified in the selected column). Post notifications can also be specified to be recurring i.e. raised EVERY 'y' days after the date/time specified in the selected column. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="TEXT-DECORATION: underline;font-size:12;" &gt;&lt;strong&gt;BlancoWorld Notification Framework Event Handler&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;What happens when a notification (a pre-notification, a notification, or a post-notification) is raised by the BlancoWorld Notification Framework? This totally depends on the assembly name and class name defined in the list settings above i.e. whatever you implement will happen! To define the functionality that is executed when a notification is raised, you need to develop a class that implements the BlancoWorld.NotificationFramework.INotificationFrameworkEventReceiver interface:&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;public interface INotificationFrameworkEventReceiver&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:7;"&gt;&lt;span style="font-family:Courier New;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;void ItemPreNotification(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NotificationEventProperties properties);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;void ItemNotification(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NotificationEventProperties properties);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;void ItemPostNotification(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NotificationEventProperties properties);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This interface defines three methods: ItemPreNotification; ItemNotification; and ItemPostNotification. Define a class that inherits from this interface (by adding a reference to the "BlancoWorld.NotificationFramework.dll" in your project, and adding a using directive for the BlancoWorld.NotiticationFramework namespace). In each method, define your desired functionality – note that a useful parameter called properties is passed into each method containing information such as the web URL, site ID, SPListItem, List Item ID etc.). An example implementation can be seen below:&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;using System;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;using System.Collections.Generic; &lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;br/&gt;using System.IO;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;using System.Text;&lt;br /&gt;u&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;sing BlancoWorld.NotificationFramework;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;using Microsoft.SharePoint;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;namespace BlancoWorld.TestNotificationFramework&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public class TestEventHandler :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;INotificationFramworkEventReceiver&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;private const String TEST_OUTPUT_FILE =&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@"C:\Temp\TEST_NOTIFICATION_FRAMEWORK.txt";&lt;br/&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void ItemPreNotification(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NotificationEventProperties properties)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WriteToTestFile(String.Format(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"ItemPreNotification - {0}",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GeneratePropertyString(properties)));&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void ItemNotification(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NotificationEventProperties properties)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WriteToTestFile(String.Format(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"ItemNotification - {0}",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GeneratePropertyString(properties)));&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void ItemPostNotification(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NotificationEventProperties properties)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WriteToTestFile(String.Format(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"ItemPostNotification - {0}",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GeneratePropertyString(properties)));&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;private String GeneratePropertyString(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NotificationEventProperties properties)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return String.Format(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"WebUrl={0}, ListName={1}, ListItem={2}",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;properties.WebUrl,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;properties.ListTitle,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;properties.ListItem.Title);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;private void WriteToTestFile(string message)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (message.Length &amp;gt; 0)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;StreamWriter sw = null;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sw = File.AppendText&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(TEST_OUTPUT_FILE);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string traceLine = &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String.Format("{0}{1}",&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DateTime.Now.ToString(&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"dd/MM/yyyy HH:mm:ss.ffff").PadRight(30),&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;message);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sw.WriteLine(traceLine);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sw.Flush();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch (Exception)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;finally&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (sw != null)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sw.Close();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;}&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;The sample class defined above simply outputs information to a debugging file (C:\Temp\TEST_NOTIFICATION_FRAMEWORK.txt) whenever a notification is raised. &lt;/p&gt;&lt;p&gt;Build your class and then add your assembly to the GAC. When specifying the list settings (as detailed above) detail the full assembly name and class name e.g. &lt;/p&gt;&lt;p&gt;Class Name: BlancoWorld.TestNotificationFramework.TestEventHandler&lt;/p&gt;&lt;p&gt;Assembly Name: BlancoWorld.TestNotificationFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=58a25bc3a52786ea&lt;br /&gt;&lt;span style="TEXT-DECORATION: underline;font-size:12;" &gt;&lt;br/&gt;&lt;strong&gt;Conclusion&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;The BlancoWorld Notification Framework is a framework allowing you, the SharePoint developer, to worry about what happens regarding dates defined on list items in SharePoint lists without having to worry about implementing custom SPJobDefinitions. Simply follow the steps define below: &lt;/p&gt;&lt;ol&gt;&lt;li&gt;Install the BlancoWorld Notification Framework.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Configure the BlancoWorld Notification Framework via Central Administration for the desired Web Application and Site Collection.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Define a class that implements the BlancoWorld.NotificationFramework.INotificationFrameworkEventReceiver interface and define the custom functionality YOU want to execute 'x' days before a date, when that date expires, or 'y' days after a date by implementing the ItemPreNotification; ItemNotification; and ItemPostNotification methods.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Build your assembly, and add your assembly to the GAC.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Configure the BlancoWorld Notification Framework for the desired list by configuring the list settings for that list and specifying the column, full assembly name, full class name, and the desired notification settings.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Sit back and let the BlancoWorld Notification Framework do the rest. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I've tested this add-on to some extent, but would welcome the opportunity to open this up to the wider SharePoint audience. Eventually I'll add this to my CodePlex project (where the &lt;a href="http://www.codeplex.com/elblanco/Release/ProjectReleases.aspx?ReleaseId=6856"&gt;Event Receiver Manager&lt;/a&gt; lives) but for the time being I'd like a few beta-testers to try this out and let me have their feedback. If you're interested in beta testing, email me at chris at blancoworld dot co dot uk and I'll email you the SharePoint Solution for you to try out . . . I'll create another blog posting when this is released via CodePlex. &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/30976103-6314159868963597040?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/6314159868963597040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=6314159868963597040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/6314159868963597040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/6314159868963597040'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2008/06/my-fist-developer-feature-blancoworld.html' title='My Fist Developer Feature: The BlancoWorld Notification Framework'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_Yj6YHomwaTk/SGQEDwxNYDI/AAAAAAAAAm8/HLeYJ6AofFo/s72-c/1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-2569818259257526966</id><published>2008-05-07T11:47:00.011+01:00</published><updated>2008-05-07T12:06:36.086+01:00</updated><title type='text'>Checking if a Workflow is Running on an Item / SPWorkflowState</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;I needed to write some code that checked whether or not a workflow was running on a &lt;span style="font-family:Courier New;font-size:10;"&gt;SPListItem&lt;/span&gt;. At first I came up with the following:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;SPListItem item = ...;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;foreach (SPWorkflow wf in item.Workflows)&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;{&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (wf.InternalState == SPWorkflowState.Running)&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// do whatever you want . . . &lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:10;"&gt;&lt;span style="font-family:Courier New;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;The problem with this is that a workflow instance can have many states represented as a bitwise AND of all current states. The &lt;span style="font-family:Courier New;font-size:10;"&gt;SPWorkflowState&lt;/span&gt; enumeration has the following values:&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;table style="BORDER-COLLAPSE: collapse" border="0"&gt;&lt;colgroup&gt;&lt;col style="WIDTH: 111px"&gt;&lt;col style="WIDTH: 57px"&gt;&lt;col style="WIDTH: 123px"&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: black 0.5pt solid; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;None&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: black 0.5pt solid; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;0&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: black 0.5pt solid; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000000000000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Locked&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;1&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000000000001&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Running&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;2&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000000000010&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Completed&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;4&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000000000100&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Cancelled&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;8&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000000001000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Expiring&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;16&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000000010000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Expired&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;32&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000000100000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Faulting&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;64&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000001000000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Terminated&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;128&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000010000000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Suspended&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;256&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;000100000000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;Orphaned&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;512&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;001000000000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;HasNewEvents&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;1024&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;010000000000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;NotStarted&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;2048&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;100000000000&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;All&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;4095&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="BORDER-RIGHT: black 0.5pt solid; PADDING-RIGHT: 7px; BORDER-TOP: medium none; PADDING-LEFT: 7px; BORDER-LEFT: medium none; BORDER-BOTTOM: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;111111111111&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;e.g. if a workflow instance was Running and Locked (not sure if this is an actual possible combination, but it serves as an example !) then the workflow's internal state would have a value of 3 representing the values of the Running AND Locked states.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To see if a workflow instance is running or not you need to perform a bitwise AND of the workflow instance's internal state with the &lt;span style="font-family:Courier New;font-size:10;"&gt;SPWorkflowState&lt;/span&gt; you're interested in. To assist with this, I used the helper method shown below:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;bool WorkflowStatePresent(int wfState, int stateToCheckFor)&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;{&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bool statePresent = false;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ((wfState &amp;amp; stateToCheckFor) == stateToCheckFor)&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;statePresent = true;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return statePresent;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I then invoke this as follows:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;foreach (SPWorkflow wf in item.Workflows)&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;{&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (WorkflowStatePresent((int)wf.InternalState,&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;(int)SPWorkflowState.Running)&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// do whatever you want . . .&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;&lt;/span&gt;&lt;span style="font-size:10;"&gt;&lt;span style="font-family:Courier New;"&gt;}&lt;/span&gt; &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/30976103-2569818259257526966?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/2569818259257526966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=2569818259257526966' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/2569818259257526966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/2569818259257526966'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2008/05/checking-if-workflow-is-running-on-item.html' title='Checking if a Workflow is Running on an Item / SPWorkflowState'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-4155926431329344005</id><published>2008-04-15T14:28:00.002+01:00</published><updated>2008-04-15T14:29:13.910+01:00</updated><title type='text'>SharePoint Search Crawl Rules</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;When performing a search in SharePoint you often find you get noisy results where not only will it return the document you searched for, but it will also return the view and edit properties pages, the AllItems.aspx view form etc.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To prevent these from being returned you need to update the crawl rules. To do this follow the steps below:&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Open the Crawl Rules section of the Search Settings in the SSP admin site.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Add crawl rules to exclude the following paths:&lt;br /&gt;&lt;/div&gt;&lt;p&gt;*://*webfldr.aspx*&lt;br /&gt;&lt;/p&gt;&lt;p&gt;*://*my-sub.aspx*&lt;br /&gt;&lt;/p&gt;&lt;p&gt;*://*mod-view.aspx*&lt;br /&gt;&lt;/p&gt;&lt;p&gt;*://*allitems.aspx*&lt;br /&gt;&lt;/p&gt;&lt;p&gt;*://*all forms.aspx*&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Anyone got any more that should be added to this list to bring back a better set of search results ?!&lt;br /&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/30976103-4155926431329344005?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/4155926431329344005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=4155926431329344005' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4155926431329344005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4155926431329344005'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2008/04/sharepoint-search-crawl-rules.html' title='SharePoint Search Crawl Rules'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-184891334345734161</id><published>2008-03-17T09:10:00.003Z</published><updated>2008-03-17T09:12:30.463Z</updated><title type='text'>You Can’t Remove an Item from the SPPropertyBag</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;Hopefully as most of us know by now, the SPWeb class has a property called "Properties" which returns an object of type SPPropertyBag. This is effectively a class sub-classed from the StringDictionary class, and the collection is persisted in the SharePoint content database making it an ideal location to store any custom web-based properties you need to persist.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To store something in the property bag for a web is very easy indeed:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SPWeb web = . . . .&lt;br /&gt;web.Properties.Add("some key", "some value");&lt;br /&gt;web.Properties.Update(); &lt;/p&gt;&lt;p&gt;This will store a new key-and-value pair in the StringDictionary and then persist the StringDictionary to the SharePoint content database. &lt;/p&gt;&lt;p&gt;You can retrieve the stored value as follows: &lt;/p&gt;&lt;p&gt;String storedValue = web.Properties["some key"]; &lt;/p&gt;&lt;p&gt;The problem I've encountered is that it is not possible to remove this key-and-value pair from the StringDictionary. One would expect the following code to perform this action, but it doesn't work. &lt;/p&gt;&lt;p&gt;web.Properties.Remove("some key");&lt;br /&gt;web.Properties.Update(); &lt;/p&gt;&lt;p&gt;If you debug this code and interrogate the StringDictionary after the call to the Remove() method, then you will see that the key-and-value pair has indeed been removed, however for some reason it looks as if the call to the Update() method does not handle the removal correctly as this change is not persisted to the content database. &lt;/p&gt;&lt;p&gt;Anyone found a solution for this ??! &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/30976103-184891334345734161?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/184891334345734161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=184891334345734161' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/184891334345734161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/184891334345734161'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2008/03/you-cant-remove-item-from-sppropertybag.html' title='You Can’t Remove an Item from the SPPropertyBag'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-8525599063119454177</id><published>2008-03-11T15:01:00.002Z</published><updated>2008-03-11T15:03:15.968Z</updated><title type='text'>TFS Source Control Comparisons and Whitespace</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;Not a usual post about SharePoint or Office, but something that I hope may help some people who find the same issue I did with TFS. I found a problem today with Team Foundation Server (TFS) when trying to compare some changes I had made against the latest version held within source control – by default it appears as if TFS uses diffmerge.exe and passes the /ignorespace option which means that changes that consist solely of whitespace are ignored and the files are deemed to be identical.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Consider the following example where you have a source file in TFS containing the following line of code:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;String example = "this is an example string";&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;You then check out the file and edited the file to add extra whitespace at the start of the string as shown below:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;String example = " this is an example string";&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Within TFS, if you do a comparison of the file, TFS tells you that the file is identical to the latest version that is checked in on the TFS server. Clearly this is not the case, and it due to the fact that by default TFS passes the /ignorespace option to the diffmerge.exe tool it uses to compare files.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To solve this issue follow the steps below to specify a custom tool to use for comparing files (note, we're still going to use the standard diffmerge.exe tool, but we're not going to specify the /ignorespace option):&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Within VS.NET 2005 select the "Tools -&amp;gt; Options" menu item.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Expand the "Source Control" node and select "Visual Studio Team Foundation Server".&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Click the "Configure User Tools…" button then click the "Add" button to add a new tool.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Configure the settings for the tool to be the following:&lt;br /&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Extension: set this to be ".*" i.e. dot star.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Operation: ensure this is set to "Compare".&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Command: set this to be "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\diffmerge.exe" which is the default path to the diffmerge.exe tool.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Arguments: leave this as standard i.e. leave this as "%1 %2".&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;Click OK all the way back up the dialog hierarchy to save the settings.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;If you now compare the file that we previously modified and added the whitespace to, TFS will correctly show that the files differ on the modified line of code.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&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/30976103-8525599063119454177?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/8525599063119454177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=8525599063119454177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8525599063119454177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8525599063119454177'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2008/03/tfs-source-control-comparisons-and.html' title='TFS Source Control Comparisons and Whitespace'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-7862020439507007731</id><published>2008-03-11T10:51:00.003Z</published><updated>2008-03-11T10:53:10.200Z</updated><title type='text'>Another Bug with a CustomAction in the Actions Menu</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:10;"&gt;I have found another bug with a CustomAction element which adds an item to the Actions menu on a document library:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10;"&gt;&lt;span style="font-family:Courier New;"&gt;&amp;lt;CustomAction Id="SomeCustomAction"&lt;br /&gt;RegistrationType="List"&lt;br /&gt;RegistrationId="101"&lt;br /&gt;GroupId="ActionsMenu"&lt;br /&gt;Location="Microsoft.SharePoint.StandardMenu"&lt;br /&gt;Sequence="1000"&lt;br /&gt;Title="Some Custom Action"&lt;br /&gt;Description="Does something interesting."&amp;gt;&lt;br /&gt;&amp;lt;UrlAction Url=""/&amp;gt;&lt;br /&gt;&amp;lt;/CustomAction&amp;gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:10;"&gt;The new menu item defined above appears in the Actions menu for document libraries, and it appears as the last item in the menu, right at the very bottom.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:10;"&gt;My issue is that I can't seem to get the menu item to be present anywhere but at the bottom i.e. what if I wanted the menu item to appear as the first item in the Actions menu? I've set the Sequence attribute to various different values, but this appears to have no effect - so far I've not managed to change the positioning of the new menu item and it always appears at the bottom of the Actions menu.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:10;"&gt;Has anyone else created a CustomAction for the Actions menu and managed to get it to be positioned elsewhere in the menu? If so, please get in touch !!&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/30976103-7862020439507007731?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/7862020439507007731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=7862020439507007731' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7862020439507007731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7862020439507007731'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2008/03/another-bug-with-customaction-in.html' title='Another Bug with a CustomAction in the Actions Menu'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-9076368513326856474</id><published>2007-12-10T17:05:00.002Z</published><updated>2008-05-06T08:18:55.311+01:00</updated><title type='text'>A Bug with CustomAction in the Actions Menu</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;UPDATE 06-05-08: &lt;span style="color:#000000;"&gt;Check out a &lt;a href="http://blog.thekid.me.uk/archive/2008/04/29/sharepoint-custom-actions-in-a-list-view-webpart.aspx"&gt;posting by The Kid&lt;/a&gt; who describes how to get around this issue using a web control instead of the UrlAction element. &lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#ff0000;"&gt;UPDATE 12-12-07:&lt;/span&gt; I downloaded&lt;/span&gt; and installed &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=AD59175C-AD6A-4027-8C2F-DB25322F791B&amp;amp;displaylang=en"&gt;SP1&lt;/a&gt; for MOSS today, and this problem is still occurring, so it looks as if this wasn't fixed as part of SP1 - I'm still hoping someone will chime in with a brilliant workaround, but I'm not holding my breath :)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I've just found a very irritating bug when using CustomAction elements to extend the UI in MOSS, specifically when extending the Actions menu of a list although I haven't yet tried this with other menus such as the upload menu or settings menu . . .&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I've got a custom action with the following definition:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CustomAction&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;Id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;BlancoWorld.ActionsMenuAddOn&lt;/span&gt;"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;RegistrationType&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;List&lt;/span&gt;"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;RegistrationId&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;101&lt;/span&gt;"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;GroupId&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;ActionsMenu&lt;/span&gt;"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;Location&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;Microsoft.SharePoint.StandardMenu&lt;/span&gt;"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;Sequence&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;0&lt;/span&gt;"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;Title&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;Do something new&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;UrlAction&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:red;"&gt;Url&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;~site/_layouts/BlancoWorld.ActionsMenuAddOn/&lt;br /&gt;DoSomethingNew.aspx?List={ListId}&lt;/span&gt;"&lt;span style="color:blue;"&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;CustomAction&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now, as one would expect, an item is added to the Actions menu on document libraries (and only document libraries, because I've set the RegistrationType and RegistrationId attributes !). If I now navigate to this list, click on the Actions menu, and select my new item it works as expected – brilliant. Behind the scenes SharePoint is doing a little bit if clever trickery and replacing "{ListId}" with the actual GUID of the list in question – great. So the actual URL is something along the lines of:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;http://yoursite/_layouts/BlancoWorld.ActionsMenuAddOn/&lt;br /&gt;DoSomethingNew.aspx?List={d6c73378-906b-4c55-a078-33c1246d657c}&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Now, drop a web part representing the same document library onto your site in SharePoint and configure it to have a toolbar type of "Full Toolbar" so that you get all the nice menus on there too such as the Actions menu where we've added our new menu item. Now click on the new menu item from this menu – disaster !! Unfortunately, for some reason that I can only think is a bug in the product, when you select this new Actions menu item from the web part on your site, SharePoint doesn't replace "{ListId}" with the list's GUID – it just simply leaves it as "{ListId}" which is of no use to anyone !! So your actual URL would be:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;http://yoursite/_layouts/BlancoWorld.ActionsMenuAddOn/&lt;br /&gt;DoSomethingNew.aspx?List={ListId}&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Has anyone come up with away around this or know anything about whether this will be fixed in SP1 or not – because this is causing me a headache !!! &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/30976103-9076368513326856474?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/9076368513326856474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=9076368513326856474' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/9076368513326856474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/9076368513326856474'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/12/bug-with-customaction-in-actions-menu.html' title='A Bug with CustomAction in the Actions Menu'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-1490158108723633728</id><published>2007-11-28T10:08:00.001Z</published><updated>2007-11-28T10:25:50.461Z</updated><title type='text'>WCM Sites, Master Pages, and the Search Icon</title><content type='html'>&lt;span xmlns=""&gt;If you have a publishing site then there are a few site master pages available to you out of the box:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span xmlns=""&gt;&lt;/span&gt;&lt;span xmlns=""&gt;&lt;/span&gt;&lt;span xmlns=""&gt;&lt;ul&gt;&lt;li&gt;default.master &lt;/li&gt;&lt;li&gt;BlueBand.master &lt;/li&gt;&lt;li&gt;BlackBand.master &lt;/li&gt;&lt;li&gt;BlueGlassBand.master &lt;/li&gt;&lt;li&gt;BlueVertical.master &lt;/li&gt;&lt;li&gt;BlackVertical.master &lt;/li&gt;&lt;li&gt;BlueTabs.master &lt;/li&gt;&lt;li&gt;OrangeSingleLevel.master &lt;/li&gt;&lt;li&gt;BlackSingleLevel.master &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;These all offer a slightly different look and feel, giving us developers a starting point from which to style our sites. How these master pages handle the search icon is interesting. The following icon: &lt;img id="BLOGGER_PHOTO_ID_5137831943374420130" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_Yj6YHomwaTk/R00-7lx8uKI/AAAAAAAAAU8/GcMLX6rOnAU/s400/gosearch.gif" border="0" /&gt;&lt;/p&gt;&lt;p&gt;Is used by the three master pages listed below as the icon you click on to perform your search: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;default.master &lt;/li&gt;&lt;li&gt;OrangeSingleLevel.master &lt;/li&gt;&lt;li&gt;BlackSingleLevel.master &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The other master pages use a different icon, shown below:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5137832673518860482" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_Yj6YHomwaTk/R00_mFx8uMI/AAAAAAAAAVM/TKVxkrIJjMI/s400/Search_Arrow.jpg" border="0" /&gt;&lt;br /&gt;This icon is stored in the Style Library in the root site of the site collection. The full URL of this file is &lt;span style="font-family:Courier New;font-size:10;"&gt;http://sharepointsite/Style Library/Images/Search_Arrow.jpg&lt;/span&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;However, if you hover over the search icon in sites based on the master pages that use &lt;span style="font-family:Courier New;font-size:10;"&gt;Search_Arrow.jpg&lt;/span&gt; for the search icon, the image of the search icon changes to the magnifying glass shown above, and this causes some of the page layout to re-jig causing a flicker. How do you solve this and cause &lt;span style="font-family:Courier New;font-size:10;"&gt;Search_Arrow.jpg&lt;/span&gt; to be the image when you hover over the search icon ? If you're like me, you'll spend a fair amount of time looking in the SharePoint CSS files to try and locate where this is configured – but your time would be wasted. The cause of this problem is the definition of the search control in the master page.&lt;br /&gt;&lt;br /&gt;If you look at a master page using SharePoint Designer you'll fine the search control defined as follows:&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;SPSWC&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;SearchBoxEx&lt;/span&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;="SearchBox" &lt;/span&gt;&lt;span style="color:red;"&gt;RegisterStyles&lt;/span&gt;&lt;span style="color:blue;"&gt;="false"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;TextBeforeDropDown&lt;/span&gt;&lt;span style="color:blue;"&gt;=""&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;TextBeforeTextBox&lt;/span&gt;&lt;span style="color:blue;"&gt;="&lt;/span&gt;&lt;span style="color:yellow;"&gt;&amp;lt;%&lt;/span&gt;$Resources:cms,masterpages_searchbox_label&lt;span style="color:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;TextBoxWidth&lt;/span&gt;&lt;span style="color:blue;"&gt;="100"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;GoImageUrl&lt;/span&gt;&lt;span style="color:blue;"&gt;="&lt;/span&gt;&lt;span style="color:yellow;"&gt;&amp;lt;%&lt;/span&gt; $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg &lt;span style="color:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;"&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;GoImageUrlRTL&lt;/span&gt;&lt;span style="color:blue;"&gt;="&lt;/span&gt;&lt;span style="color:yellow;"&gt;&amp;lt;%&lt;/span&gt; $SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg &lt;span style="color:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;UseSiteDefaults&lt;/span&gt;&lt;span style="color:blue;"&gt;="true"&lt;/span&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;DropDownMode&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&lt;span style="color:blue;"&gt;"HideScopeDD"&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;SuppressWebPartChrome&lt;/span&gt;&lt;span style="color:blue;"&gt;="true"&lt;/span&gt; &lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;="server" &lt;/span&gt;&lt;span style="color:red;"&gt;WebPart&lt;/span&gt;&lt;span style="color:blue;"&gt;="true"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;__WebPartId&lt;/span&gt;&lt;span style="color:blue;"&gt;="{FE689059-C9E4-4EFF-8338-4D73E4BB84DD}"&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You need to add an additional two attributes to this element to fix, what I consider to be, the bug in the shipping master pages. Replace the above element with the following element:&lt;br /&gt;&lt;/p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;SPSWC&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;SearchBoxEx&lt;/span&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;="SearchBox" &lt;/span&gt;&lt;span style="color:red;"&gt;RegisterStyles&lt;/span&gt;&lt;span style="color:blue;"&gt;="false"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;TextBeforeDropDown&lt;/span&gt;&lt;span style="color:blue;"&gt;=""&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;TextBeforeTextBox&lt;/span&gt;&lt;span style="color:blue;"&gt;="&lt;/span&gt;&lt;span style="color:yellow;"&gt;&amp;lt;%&lt;/span&gt;$Resources:cms,masterpages_searchbox_label&lt;span style="color:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;TextBoxWidth&lt;/span&gt;&lt;span style="color:blue;"&gt;="100"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;GoImageUrl&lt;/span&gt;&lt;span style="color:blue;"&gt;="&lt;/span&gt;&lt;span style="color:yellow;"&gt;&amp;lt;%&lt;/span&gt; $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg &lt;span style="color:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;GoImageUrlRTL&lt;/span&gt;&lt;span style="color:blue;"&gt;="&lt;/span&gt;&lt;span style="color:yellow;"&gt;&amp;lt;%&lt;/span&gt; $SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg &lt;span style="color:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;GoImageActiveUrl&lt;/span&gt;&lt;span style="color:blue;"&gt;="&lt;/span&gt;&lt;span style="color:yellow;"&gt;&amp;lt;%&lt;/span&gt; $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg &lt;span style="color:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;GoImageActiveUrlRTL&lt;/span&gt;&lt;span style="color:blue;"&gt;="&lt;/span&gt;&lt;span style="color:yellow;"&gt;&amp;lt;%&lt;/span&gt; $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg &lt;span style="color:yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;UseSiteDefaults&lt;/span&gt;&lt;span style="color:blue;"&gt;="true"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;DropDownMode&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&lt;span style="color:blue;"&gt;"HideScopeDD" &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;SuppressWebPartChrome&lt;/span&gt;&lt;span style="color:blue;"&gt;="true"&lt;/span&gt; &lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;="server" &lt;/span&gt;&lt;span style="color:red;"&gt;WebPart&lt;/span&gt;&lt;span style="color:blue;"&gt;="true"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:red;"&gt;__WebPartId&lt;/span&gt;&lt;span style="color:blue;"&gt;="{FE689059-C9E4-4EFF-8338-4D73E4BB84DD}"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;color:blue;"&gt;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;color:blue;"&gt;&lt;/span&gt;&lt;p&gt;The additional two attributes you need to add are &lt;span style="font-family:Courier New;font-size:10;color:red;"&gt;GoImageActiveUrl&lt;/span&gt; and &lt;span style="font-family:Courier New;font-size:10;color:red;"&gt;GoImageActiveUrlRTL&lt;/span&gt; – set both of these to point to the same image in the Style Library, and you're good to go. &lt;/p&gt;&lt;p&gt;Hope this saves some other people some time trawling through the CSS files !!&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/30976103-1490158108723633728?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/1490158108723633728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=1490158108723633728' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/1490158108723633728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/1490158108723633728'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/11/wcm-sites-master-pages-and-search-icon.html' title='WCM Sites, Master Pages, and the Search Icon'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_Yj6YHomwaTk/R00-7lx8uKI/AAAAAAAAAU8/GcMLX6rOnAU/s72-c/gosearch.gif' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-6126567131934890891</id><published>2007-11-21T08:59:00.001Z</published><updated>2007-11-21T09:01:52.105Z</updated><title type='text'>A Little Teaser and a Colour Calendar</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;Sorry for not posting for a while, but been mega busy with work and other stuff. However, I am working on something a little special which has been bugging me for a fair while, so stay tuned for an update (hopefully in the near future !).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Don't know if anyone has seen this or not, but this is something most people want / ask for when deploying SharePoint (at least in my experience) – a colour calendar i.e. a calendar where it is possible to colour code entries based on certain categories. Well, my good friend &lt;a href="http://planetwilson.blogspot.com/"&gt;Mark Wilson&lt;/a&gt; has come up with an excellent add-on that gives you this functionality – check out the latest version &lt;a href="http://planetwilson.blogspot.com/2007/11/updated-colour-color-calendar-for.html"&gt;here&lt;/a&gt;. This latest version makes deployment of his add-on a whole lot easier, by dropping a web part onto a page rather than having to cut and paste Javascript as was the case with an earlier version.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Check it out, you won't be disappointed !!&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/30976103-6126567131934890891?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/6126567131934890891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=6126567131934890891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/6126567131934890891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/6126567131934890891'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/11/little-teaser-and-colour-calendar.html' title='A Little Teaser and a Colour Calendar'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-5056527601863758060</id><published>2007-09-13T17:35:00.001+01:00</published><updated>2007-09-13T17:42:31.663+01:00</updated><title type='text'>An Issue with SPLongOperation</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;Two posts in one day ?! Not like me normally, but this one has been BUGGING me for absolutely ages and I've just solved it, so thought I'd share the solution here and now in case this had been bugging anyone else the same way it's been bugging me . . .&lt;br /&gt;&lt;/p&gt;&lt;p&gt;As most of you know, if you have some functionality on an application page that takes a while to execute you can wrap the functionality inside an &lt;span style="font-family:Courier New;font-size:10;"&gt;SPLongOperation&lt;/span&gt; as shown below:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;protected&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; btnCreate_Click(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, &lt;span style="color:#2b91af;"&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;using&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;SPLongOperation&lt;/span&gt; op = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SPLongOperation&lt;/span&gt;(&lt;span style="color:blue;"&gt;this&lt;/span&gt;.Page);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;op.LeadingHTML = &lt;span style="color:#a31515;"&gt;"Please wait while XXX completes."&lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;op.Begin();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;color:green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// do something that takes a fair old while . . .&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;op.End(&lt;span style="color:#a31515;"&gt;"http://somewhere"&lt;/span&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Basically what happens is you get the nice SharePoint spinny thing (wonder if there's a proper name for this ?!) displayed with your "Please wait while XXX completes" message while the operation is in progress i.e. between the calls to &lt;span style="font-family:Courier New;font-size:10;"&gt;op.Begin()&lt;/span&gt; and &lt;span style="font-family:Courier New;font-size:10;"&gt;op.End()&lt;/span&gt;. Upon the call to &lt;span style="font-family:Courier New;font-size:10;"&gt;op.End()&lt;/span&gt; the browser is then redirected to the URL you pass into the call.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This was working fine for two of my custom application pages (or so I thought) but on a third application page I was having major issues. When I clicked the button on my application page it was taking a good while before the post back occurred and the SharePoint spinny thing appeared. On my other two application pages it was working fine and was redirecting to the SharePoint spinny thing page almost immediately and displaying my waiting message.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I'd never had time to look into why this was, and it was bugging me bug time, but I found some time today. Basically, in the page directive of the application page causing me issues I had the "&lt;span style="font-family:Courier New;font-size:10;"&gt;SmartNavigation&lt;/span&gt;" property set to "&lt;span style="font-family:Courier New;font-size:10;"&gt;true&lt;/span&gt;". In the other two application pages I didn't. Simple as that (although it took a fair old while to narrow this down, I can assure you !!). I removed the &lt;span style="font-family:Courier New;font-size:10;"&gt;SmartNavigation&lt;/span&gt; property from my page directive and it now works as expected.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I'm not sure why the two don't co-exist nicely (perhaps someone can post a comment and tell me) but I'm just pleased to have solved something that has bugged me for so long. Hopefully if you're experiencing delays in waiting for your SharePoint spinny thing in your application page this will help you out !&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/30976103-5056527601863758060?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/5056527601863758060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=5056527601863758060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5056527601863758060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5056527601863758060'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/09/issue-with-splongoperation.html' title='An Issue with SPLongOperation'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-467196666420235325</id><published>2007-09-13T09:07:00.001+01:00</published><updated>2007-09-13T09:21:22.979+01:00</updated><title type='text'>Programmatically Activating an InfoPath Form Template</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;A colleague today asked me whether it was possible to programatically activate an InfoPath form template from the form templates store in Central Administration to a site collection. After much digging around in the MOSS SDK I couldn't really find anything until I stumbled across the forms services SDK online. Using a combination of the two I came up with the following which shows how to do this:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Firstly you'll need to add a reference to the &lt;span style="font-family:Courier New;font-size:10;"&gt;Microsoft.Office.InfoPath.Server.dll&lt;/span&gt; assembly, which can be found at the following location:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;C:\Program Files\Microsoft Office Servers\12.0\Bin&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;After adding a reference to this assembly you can use the following code fragment to achieve the requirement: &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;using &lt;span style="color:#000000;"&gt;Microsoft.SharePoint&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; Microsoft.SharePoint.Administration;&lt;/span&gt;&lt;span style="font-size:85%;color:blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; Microsoft.Office.InfoPath.Server.Administration; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#2b91af;"&gt;SPSite &lt;/span&gt;siteCollection = ...&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#2b91af;"&gt;SPServiceCollection&lt;/span&gt; services = &lt;span style="color:#2b91af;"&gt;SPFarm&lt;/span&gt;.Local.Services; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;SPService&lt;/span&gt; svc &lt;span style="color:blue;"&gt;in&lt;/span&gt; services)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FormsService&lt;/span&gt; fs = svc &lt;span style="color:blue;"&gt;as&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;FormsService&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/span&gt; (fs != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;FormTemplate&lt;/span&gt; ft &lt;span style="color:blue;"&gt;in&lt;/span&gt; fs.FormTemplates)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/span&gt; (ft.Name == &lt;span style="color:blue;"&gt;"&amp;lt;the name you want&amp;gt;"&lt;/span&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ft.Activate(siteCollection)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Courier New;"&gt;}&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;Hope this helps !&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/30976103-467196666420235325?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/467196666420235325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=467196666420235325' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/467196666420235325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/467196666420235325'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/09/programatically-activating-and-infopath.html' title='Programmatically Activating an InfoPath Form Template'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-3052190981983077889</id><published>2007-09-04T09:32:00.001+01:00</published><updated>2007-09-04T09:33:20.565+01:00</updated><title type='text'>New Release of the Event Receivers Manager</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;Thanks to everyone who has sent me comments. Today I've uploaded v1.1 of the Event Receivers Manager to my CodePlex site (&lt;a href="http://www.codeplex.com/elblanco"&gt;http://www.codeplex.com/elblanco&lt;/a&gt;) which fixes the issues related to the breadcrumb controls on the application pages. I'd like to thank &lt;a href="http://www.u2u.info/Blogs/karine/default.aspx"&gt;Karine Bosch&lt;/a&gt; of &lt;a href="http://www.u2u.info/"&gt;U2U&lt;/a&gt; for helping me out with this by sending me sample code and pointing me to a useful &lt;a href="http://www.mikhaildikov.com/2007/05/creating-dynamic-breadcrumbs-in.html"&gt;article&lt;/a&gt; by &lt;a href="http://www.mikhaildikov.com/"&gt;Mikhail Dikov&lt;/a&gt; – thanks Karine!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Once you've downloaded the new release you can install it as previously described, or if you already have the solution installed simply upgrade it with the following command:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;stsadm –o upgradesolution –name BlancoWorld.EventReceiversManager.wsp –filename BlancoWorld.EventReceiversManager.wsp –immediate -allowGacDeployment&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;People have also reported issues with the solution not working on WSS 3.0. I tested the solution on a vanilla WSS 3.0 install and everything appears to be working fine, and there's no reason why it shouldn't as there's nothing in the solution that is MOSS-specific. People are reporting that the "Event Receivers" link is not displaying in the list settings page in WSS. The only thing I can think of is that you haven't activated the Site Collection feature as this is what puts the link in place. Running the two stsadm commands on the command line only adds and deploys the solution, which installs the feature – it doesn't activate the feature. Hope this solves some people's issues, if not then please get in touch again with more details and I'll try and resolve any problems.&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/30976103-3052190981983077889?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/3052190981983077889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=3052190981983077889' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/3052190981983077889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/3052190981983077889'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/09/new-release-of-event-receivers-manager.html' title='New Release of the Event Receivers Manager'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-8417750918997040155</id><published>2007-08-31T16:24:00.003+01:00</published><updated>2007-08-31T16:37:56.242+01:00</updated><title type='text'>Event Receiver Management</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;span xmlns=""&gt;&lt;p&gt;One of the things from SPS 2003 that didn't make it into MOSS 2007 was a way, via the UI, to specify an event receiver for a document library. This seems bizarre considering the facts that you can now have multiple event receivers for a single document library, and you can now have event receivers on lists as well as document libraries.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To get around this I've developed the "Event Receivers Manager" solution, which I've uploaded to CodePlex (&lt;a href="http://www.codeplex.com/elblanco"&gt;http://www.codeplex.com/elblanco&lt;/a&gt;). This is the first of the free add-ons I intend to release for things that really bug me about SharePoint – watch this space for more useful things in the future.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Once you've downloaded the solution you can install it as normal for SharePoint:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;stsadm –o addsolution –filename C:\BlancoWorld.EventReceiversManager.wsp&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Then when added to the solution store you can either deploy via the Central Administration site or via the command line:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;stsadm –o deploysolution –name BlancoWorld.EventReceiversManager.wsp –immediate –allowGacDeployment&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This will install the "BlancoWorld SharePoint Event Receivers Manager" feature as a site collection feature – activate this feature and you'll now be good to go . . .&lt;br /&gt;&lt;/p&gt;&lt;p&gt;From a list's settings page within SharePoint will now be a new link called "Event Receivers": &lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5104887743078401122" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_Yj6YHomwaTk/Rtg0WwBvBGI/AAAAAAAAAAk/2WWrangFXM4/s400/New+Link.PNG" border="0" /&gt; Clicking on this link shows all the event receivers for the list: &lt;img id="BLOGGER_PHOTO_ID_5104888069495915634" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_Yj6YHomwaTk/Rtg0pwBvBHI/AAAAAAAAAAs/IDWdxPkJ8SQ/s400/List+of+Event+Receivers.PNG" border="0" /&gt; Using the drop-down menu you can delete existing event receivers:&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5104888524762449026" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_Yj6YHomwaTk/Rtg1EQBvBII/AAAAAAAAAA0/56VjmIlUorA/s400/Deleting+an+Event+Receiver.PNG" border="0" /&gt; Or edit existing event receivers:&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5104888636431598738" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_Yj6YHomwaTk/Rtg1KwBvBJI/AAAAAAAAAA8/MlA1u1vDRZE/s400/Editing+an+Event+Receiver.PNG" border="0" /&gt; You can also click the "New" toolbar button to add a new event receiver – you must specify the type, assembly name, and class name:&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5104888748100748450" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_Yj6YHomwaTk/Rtg1RQBvBKI/AAAAAAAAABE/33ZuVlY2F2s/s400/Adding+an+Event+Receiver.PNG" border="0" /&gt; &lt;p&gt;I hope others find this add-on useful, please leave me comments regarding any issues or improvements you'd like to see. Planned improvements at this stage are: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;The site map provider functionality that provides the breadcrumb is not 100% there yet – I need to spend more time on it. &lt;/li&gt;&lt;li&gt;I'd like to enable column sorting on the page that lists the event handlers to allow the user to click on the column headings to sort the event handlers. &lt;/li&gt;&lt;li&gt;The "Edit" functionality from the drop down menu only actually lets you view the details. I intend to amend this to allow you to edit the properties. &lt;/li&gt;&lt;li&gt;The "Delete" functionality from the drop down menu takes you to a separate page to confirm deletion – I'd like to make this a client-side confirmation.&lt;/li&gt;&lt;li&gt;When adding a new event handler I intend to add functionality allowing you to also specify the Sequence. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I've released it as-is since I thought it might be useful for others – if you have any opinions on which of my planned improvements you'd like to see first, then let me know. Also if you have any other improvements you'd like to see, again, let me know.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Enjoy ! &lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-8417750918997040155?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/8417750918997040155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=8417750918997040155' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8417750918997040155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8417750918997040155'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/08/event-receiver-management.html' title='Event Receiver Management'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_Yj6YHomwaTk/Rtg0WwBvBGI/AAAAAAAAAAk/2WWrangFXM4/s72-c/New+Link.PNG' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-7805391164812409944</id><published>2007-08-31T16:24:00.001+01:00</published><updated>2007-08-31T16:28:12.004+01:00</updated><title type='text'>Adding a Picker to the “Send to -&gt; Other Location” Menu Option</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;A colleague of mine and right-on SharePoint dude, Mark Wilson, has posted an entry on how to add a picker to the page that is displayed when you select the "Send To -&amp;gt; Other Location" option from the ECB menu.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Personally I think this is great as it's a big PITA to have to type the URL to the destination library manually.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Check it out &lt;a href="http://planetwilson.blogspot.com/2007/08/how-to-add-picker-to-send-to-other.html"&gt;here&lt;/a&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/30976103-7805391164812409944?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/7805391164812409944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=7805391164812409944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7805391164812409944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7805391164812409944'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/08/adding-picker-to-send-to-other-location.html' title='Adding a Picker to the “Send to -&amp;gt; Other Location” Menu Option'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-4564676395834161466</id><published>2007-08-24T10:22:00.001+01:00</published><updated>2007-08-24T10:32:43.297+01:00</updated><title type='text'>Adding the 12 hive to VS.NET File Dialogs</title><content type='html'>&lt;span xmlns=""&gt;&lt;div&gt;This is something that has bugged me for ages but I've never got around to finding the time to look at it - wouldn't it be nice to have a shortcut to the 12 hive in the left-hand shortcuts panel in the Open, Save, Add New Item etc. dialogs in VS.NET – I know I'd like it !! Kudos to my new colleague Stephen Kaye for taking the time to find out how to do it.&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Open Word and click on File -&amp;gt; Open to display the Open File dialog.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Navigate to the 12 hive.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Right-click in the left-hand shortcuts panel and select "Add 12" from the pop-up menu:&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5102195644692366386" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_Yj6YHomwaTk/Rs6j6ABvBDI/AAAAAAAAAAM/seOLfmJgJAI/s320/add+12+hive.PNG" border="0" /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;This will have added a shortcut to the 12 hive to your dialogs within Word.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now open regedit and navigate to &lt;span style="font-family:Courier New;font-size:10;"&gt;HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\Open Find\Places\UserDefinedPlaces&lt;/span&gt;. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Assuming that you only have one custom location defined (i.e. the 12 hive you've just added) then there'll be a key called "Place0" – right click on this and export it somewhere, say to your desktop and call it "&lt;span style="font-family:Courier New;font-size:10;"&gt;word.reg&lt;/span&gt;".&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Edit the &lt;span style="font-family:Courier New;font-size:10;"&gt;word.reg&lt;/span&gt; file in Notepad or your favourite text editor (mine being &lt;a href="http://notepad-plus.sourceforge.net/uk/about.php"&gt;Notepad++&lt;/a&gt;) and replace the key string at the top of the file with the following instead:&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Open Find\Places\UserDefinedPlaces\Place0] &lt;/span&gt;&lt;/p&gt;&lt;p&gt;Your file should now look like this:&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5102196490800923714" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_Yj6YHomwaTk/Rs6krQBvBEI/AAAAAAAAAAU/lzZlkKoinbg/s320/vs.net+reg.PNG" border="0" /&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Save this file and close the editor, and then double-click on the &lt;span style="font-family:Courier New;font-size:10;"&gt;word.reg&lt;/span&gt; file on your desktop to enter the new information into the registry.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Voila – you'll now have the 12 hive as a shortcut in your dialogs within VS.NET.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;You can also do a similar thing with document libraries etc to open / save files directly to web locations. &lt;/p&gt;&lt;p&gt;Hope this is useful. &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/30976103-4564676395834161466?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/4564676395834161466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=4564676395834161466' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4564676395834161466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4564676395834161466'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/08/adding-12-hive-to-vsnet-file-dialogs.html' title='Adding the 12 hive to VS.NET File Dialogs'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_Yj6YHomwaTk/Rs6j6ABvBDI/AAAAAAAAAAM/seOLfmJgJAI/s72-c/add+12+hive.PNG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-3177616497778470457</id><published>2007-08-08T13:17:00.001+01:00</published><updated>2007-08-09T14:15:41.652+01:00</updated><title type='text'>Cancelling a Running Workflow Programatically</title><content type='html'>&lt;span xmlns=""&gt;&lt;br /&gt;&lt;p&gt;I got asked recently how to cancel a running workflow, so I thought I'd post the solution here for everyone . . .&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The first step is to get an instance of the SPWorkflow object that represents the workflow that is running on the SPListItem in question. This can be performed as follows:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;SPWorkflow&lt;/span&gt; wf &lt;span style="color:blue;"&gt;in&lt;/span&gt; listItem.Workflows)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/span&gt; (wf.ParentAssociation.BaseId == &amp;lt;Guid from workflow.xml&amp;gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/span&gt; (wf.InternalState == &lt;span style="color:#2b91af;"&gt;SPWorkflowState&lt;/span&gt;.Running)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:green;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Need to cancel wf here . . .&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;}&lt;/span&gt; &lt;/p&gt;&lt;p&gt;Once you've got the running SPWorkflow instance as indicated above, you now need to cancel it. This is performed by calling the CancelWorkflow method of the SPWorkflowManager class passing in the SPWorkflow instance: &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:#2b91af;"&gt;SPWorkflowManager&lt;/span&gt;.CancelWorkflow(wf);&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/30976103-3177616497778470457?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/3177616497778470457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=3177616497778470457' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/3177616497778470457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/3177616497778470457'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/08/cancelling-running-workflow.html' title='Cancelling a Running Workflow Programatically'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-4032415785681154278</id><published>2007-07-16T12:03:00.001+01:00</published><updated>2007-07-16T12:03:44.949+01:00</updated><title type='text'>SharePoint Calculated Columns with Dates</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;I recently had a request to create a view on a list and group the view by the year and quarter of a particular date. i.e. the list in question has a date column, say "Start Date", and the view should be grouped by the year of the date e.g. 2007, and then by the quarter i.e. 1, 2, 3, or 4 depending on the month.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I did this by creating two new calculated columns on the list. The first column is called "Year", is of type "Single line of text", and has the formula shown below:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;=TEXT(YEAR([Start Date]),"000")&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I created this column as a single line of text instead of a numeric column because a numeric column would show the year "2007" as "2,007" with a comma in it which I didn't want.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The second column is called "Quarter", is of type "Number", and has the formula shown below:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;=ROUNDDOWN(((INT(MONTH([Start Date]))-1)/3),0)+1&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Hopefully someone will find these useful as there isn't a whole lot of information out there on the format and syntax of the calculated columns. However, some good examples can be found &lt;a href="http://www.gothamweb.com/support/manual/wsshelp/html/EgForm.htm"&gt;here&lt;/a&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/30976103-4032415785681154278?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/4032415785681154278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=4032415785681154278' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4032415785681154278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4032415785681154278'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/07/sharepoint-calculated-columns-with.html' title='SharePoint Calculated Columns with Dates'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-3073193092931842410</id><published>2007-07-13T16:27:00.001+01:00</published><updated>2007-07-13T17:02:31.628+01:00</updated><title type='text'>Determining Whether a User is a Member of a SharePoint Group or Not . . .</title><content type='html'>&lt;span xmlns=""&gt;&lt;br /&gt;&lt;p&gt;By using the SPUser.Groups property you can easily enumerate the groups that a user has been assigned to. However one problem with this approach is that if the user is a member of a domain group that has been allocated to a SharePoint group, then this group does not appear in SPUser.Groups. e.g. say that a user account is assigned to SharePoint groups SP1, SP2 and SP3 and that the user is a member of an AD group, ADGroup1, which in turn is assigned to SharePoint group SP4. When enumerating SPUser.Groups only SP1, SP2, and SP3 will be listed even though the user is a member of SP4 indirectly via his membership of the ADGroup1 group.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So, how can we ascertain whether a particular user is a member of the SharePoint group or not, taking into account AD group membership ? The short answer is use the SPGroup.ContainsCurrentUser property as shown below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; siteUrl = &lt;span style="color:#a31515;"&gt;"http://localhost"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; userName = &lt;span style="color:#a31515;"&gt;"DOMAIN\\username"&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; groupName = &lt;span style="color:#a31515;"&gt;"SharePoint Test Group"&lt;/span&gt;; &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:#2b91af;"&gt;SPSite&lt;/span&gt; siteCollection = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SPSite&lt;/span&gt;(siteUrl);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:#2b91af;"&gt;SPWeb&lt;/span&gt; site = siteCollection.OpenWeb();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:#2b91af;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:#2b91af;"&gt;SPGroup&lt;/span&gt; testGroup = site.Groups[groupName];&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt; (testGroup != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:#2b91af;"&gt;String&lt;/span&gt;.Format(&lt;span style="color:#a31515;"&gt;"Is current user in group={0}"&lt;/span&gt;,&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;testGroup.ContainsCurrentUser.ToString()));&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;} &lt;/span&gt;&lt;/p&gt;&lt;p&gt;Obviously this only tells you whether the user account running the current context is a member of the group or not. In order to ascertain whether a different user is in the group you'll need to create an SPSite object using the appropriate SPUserToken to give you the appropriate context to use. An example can be seen below: &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; siteUrl = &lt;span style="color:#a31515;"&gt;" http://localhost "&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; userName = &lt;span style="color:#a31515;"&gt;"DOMAIN\\anotheruser"&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; groupName = &lt;span style="color:#a31515;"&gt;"SharePoint Test Group"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:#2b91af;"&gt;SPSite&lt;/span&gt; siteCollection = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;SPSite&lt;/span&gt;(siteUrl); &lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:#2b91af;"&gt;&lt;br /&gt;SPWeb&lt;/span&gt; site = siteCollection.OpenWeb();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:#2b91af;"&gt;SPUserToken&lt;/span&gt; userToken = site.AllUsers[userName].UserToken;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;color:green;"&gt;// Use an SPSite and SPWeb that have the context of the appropriate user&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;SPSite &lt;/span&gt;contextSiteColl = &lt;span style="color:blue;"&gt;new&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#2b91af;"&gt;SPSite&lt;/span&gt;(siteUrl, userToken))&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;SPWeb&lt;/span&gt; contextSite = contextSiteColl.OpenWeb())&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:#2b91af;"&gt;SPGroup&lt;/span&gt; testGroup = contextSite.Groups[groupName];&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#2b91af;"&gt;String&lt;/span&gt;.Format(&lt;span style="color:#a31515;"&gt;"Username = {0}, got group {1}."&lt;/span&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;userName, groupName));&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt; (testGroup != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#2b91af;"&gt;String&lt;/span&gt;.Format(&lt;span style="color:#a31515;"&gt;"Is current user in group={0}"&lt;/span&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;testGroup.ContainsCurrentUser.ToString()));&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;}&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/30976103-3073193092931842410?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/3073193092931842410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=3073193092931842410' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/3073193092931842410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/3073193092931842410'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/07/determining-whether-user-is-member-of.html' title='Determining Whether a User is a Member of a SharePoint Group or Not . . .'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-8977007297383177629</id><published>2007-07-12T13:44:00.000+01:00</published><updated>2007-07-12T13:49:27.481+01:00</updated><title type='text'>Office 2003 an 2007 Client Co-existence Problems</title><content type='html'>I came accross a problem a while ago where IE crashed when trying to select "Edit in Microsoft Office Word" from a document's context menu in a document library. It turned out that this was related to the fact that I had Office 2007 Professional installed, but also had Project 2003 installed i.e. a co-existence problem with the 2003 and 2007 versions of the Office client apps.&lt;br /&gt;&lt;br /&gt;I managed to get around this problem by renaming the owssupp.dll located in C:\Program Files\Microsoft Office\Office 12 to something else e.g. owssupp.dllx which stopped IE crashing but gave me the problem that I got a pop-up telling me I needed IE 5.x or greater.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://planetwilson.blogspot.com/"&gt;Mark Wilson&lt;/a&gt; kindly pointed me to an &lt;a href="http://jopx.blogspot.com/2007/07/solving-internet-explorer-crash-when.html"&gt;article by JPOX&lt;/a&gt; which provides the perfect workaround and now everything is working as it should.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-8977007297383177629?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/8977007297383177629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=8977007297383177629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8977007297383177629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8977007297383177629'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/07/office-2003-2007-client-co-existence.html' title='Office 2003 an 2007 Client Co-existence Problems'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-3356154357659290036</id><published>2007-07-03T16:44:00.001+01:00</published><updated>2007-07-03T16:49:07.121+01:00</updated><title type='text'>Intelligent Document Templates</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;I had an email from a colleague asking me how to go about creating a document template where the content of the template contains metadata from the content type's metadata. I thought this was valuable to others as I haven't seen anything posted about this, so I thought I'd write this post to explain how to achieve this. &lt;/p&gt;&lt;p&gt;Upon completion, you will have a two-way template where data entered into a document based on the template will populate the document's metadata. Also, metadata entered into a document's properties panel will auto-populate the document's content.&lt;/p&gt;&lt;p&gt;Imagine we have a content type called "Contract" assigned to a document library and that the content type has the following metadata:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Contract Number: Number (0 D.P.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Contract Date: Date &amp; time (date only)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Customer Name: Single Line of text&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Contract Duration: Choice (1 year, 3 years, 5 years)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;To create an intelligent document template:&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Click the "New" button on the document library to create a new document based on the Contract content type – this will fire up Word 2007 and open a blank document of content type Contract.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Save the document locally instead of back into SharePoint, say to the desktop.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Open the "Insert" tab within Word 2007.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Drop down the "Quick Parts" menu, and open the "Document Properties" sub-menu.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Here you will see a list of all the properties of the document, including our custom metadata defined above.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Select the property you are interested in from the menu and a quick part is inserted into the document at the location of the cursor.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Continue this approach to add additional quick parts, then save the document locally again.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Open the settings for the Contract content type (Home Site -&amp;gt; Site Actions -&amp;gt; Site Settings -&amp;gt; Modify All Site Settings -&amp;gt; Site content types, then select the "Contract" content type).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Click on the "Advanced Settings" link for the Contract content type.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Select the "Upload a new document template" radio button and browse to the file we saved locally.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Leave the other settings at their default values and select "OK".&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now go back to the document library where the Contract content type is being used and click the "New" button to create a new document. This new document will be based on the new template and will contain the quick parts that we added previously.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Completing the metadata in the document properties panel will complete the content in the quick parts in the document's content. Likewise completing the quick parts will populate the document's metadata properties.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Hope this all makes sense . . . &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/30976103-3356154357659290036?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/3356154357659290036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=3356154357659290036' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/3356154357659290036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/3356154357659290036'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/07/intelligent-document-templates.html' title='Intelligent Document Templates'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-4279854278588094620</id><published>2007-06-26T10:56:00.000+01:00</published><updated>2007-06-26T11:12:17.894+01:00</updated><title type='text'>Debug Workflow Logging using a Custom LogToHistoryListActivity</title><content type='html'>&lt;span style="font-family:arial;"&gt;I don't know about anyone else, but a very valuable resource to me when debugging a MOSS workflow is to put &lt;span style="font-family:courier new;"&gt;LogToHistoryListActivity&lt;/span&gt; instances throughout my workflow so that I can easily see what is going on. I use this technique a lot when developing MOSS workflows, especially long-running workflows where it's really not feasible to sit there with the debugger attached for long periods of time.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;With all of these &lt;span style="font-family:courier new;"&gt;LogToHistoryListActivity&lt;/span&gt; instances in my workflow, I find it a pain to either go through and remove them (and any associated member variables and Invoking methods) or to set all of their &lt;span style="font-family:courier new;"&gt;Enabled&lt;/span&gt; properties to &lt;span style="font-family:courier new;"&gt;false&lt;/span&gt; (which I prefer as it means you can get the debug information back by simply setting the &lt;span style="font-family:courier new;"&gt;Enabled&lt;/span&gt; property back to &lt;span style="font-family:courier new;"&gt;true&lt;/span&gt; again, rather than having to re-implement your debugging code !)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;To help me with debugging, I've developed a simple custom activity called &lt;span style="font-family:courier new;"&gt;DebugLogToHistoryListActivity&lt;/span&gt; which only logs to the history list if the workflow is built in a Debug configuration. If the workflow is built using a Release configuration the workflow executes as if the &lt;span style="font-family:courier new;"&gt;DebugLogToHistoryListActivity&lt;/span&gt; instances weren't present. Now, instead of adding &lt;span style="font-family:courier new;"&gt;LogToHistoryListActivity&lt;/span&gt; instances in my workflow for debugging purposes I add &lt;span style="font-family:courier new;"&gt;DebugLogToHistoryListActivity&lt;/span&gt; instances instead.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;OK, so how do we develop this simple custom activity (and it really is simple as you'll see in a minute) ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;1. Add a new Activity to your workflow project called &lt;span style="font-family:courier new;"&gt;DebugLogToHistoryListActivity.cs&lt;/span&gt;. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;2. Right-click on the new file in Solution Explorer and select "View Code" to show the code that has been generated for this activity by default. The code should look like that shown below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;public partial class DebugLogToHistoryListActivity: SequenceActivity&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;public DebugLogToHistoryListActivity() &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;&amp;nbsp;InitializeComponent(); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. As you can see, when you create a custom activity by default it inherits from the &lt;span style="font-family:courier new;"&gt;SequenceActivity&lt;/span&gt; class. Modify this so that it inherits from &lt;span style="font-family:courier new;"&gt;Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity&lt;/span&gt; instead by ensuring that the project has a reference to the &lt;span style="font-family:courier new;"&gt;Microsoft.SharePoint.WorkflowActions&lt;/span&gt; DLL and adding a "&lt;span style="font-family:courier new;"&gt;using Microsoft.SharePoint.WorkflowActions;&lt;/span&gt;" declaration in your code file.&lt;br /&gt;&lt;br /&gt;4. Override the &lt;span style="font-family:courier new;"&gt;Execute&lt;/span&gt; method of the base class, and enter the following code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;protected override ActivityExecutionStatus Execute(ActivityExecutionContext context)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;#if DEBUG &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;return base.Execute(context);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;#else &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;nbsp;return ActivityExecutionStatus.Closed;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;#endif&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Basically, the above code performs the base class implementation if the build is a Debug build, otherwise it simply indicates that the processing of the activity has completed by returning &lt;span style="font-family:courier new;"&gt;ActivityExecutionStatus.Closed&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;5. Once this has been built you can add instances of this activity to your workflow and use them in exactly the same was as you would use an instance of a &lt;span style="font-family:courier new;"&gt;LogToHistoryListActivity&lt;/span&gt;. The only difference is that these will only execure in a Debug build. When you build your workflow in Release configuration it will execute as if these activities weren't present.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;The complete code listing can be seen below. I hope this is of use to some of you.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.ComponentModel;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.ComponentModel.Design;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Collections;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Drawing;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Workflow.ComponentModel;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Workflow.ComponentModel.Design;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Workflow.ComponentModel.Compiler;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Workflow.ComponentModel.Serialization;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Workflow.Runtime;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Workflow.Activities;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using System.Workflow.Activities.Rules;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;using Microsoft.SharePoint.WorkflowActions;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;namespace &lt;your namespace here&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;public partial class DebugLogToHistoryListActivity: LogToHistoryListActivity &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;public DebugLogToHistoryListActivity() &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;InitializeComponent(); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;protected override ActivityExecutionStatus Execute(ActivityExecutionContext context)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#if DEBUG &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return base.Execute(context);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#else &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return ActivityExecutionStatus.Closed;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#endif &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;} &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&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/30976103-4279854278588094620?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/4279854278588094620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=4279854278588094620' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4279854278588094620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4279854278588094620'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/06/i-dont-know-about-anyone-else-but-very.html' title='Debug Workflow Logging using a Custom LogToHistoryListActivity'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-7594711839124674913</id><published>2007-06-01T16:12:00.000+01:00</published><updated>2007-06-01T16:28:14.021+01:00</updated><title type='text'>Issues with the Delay Activity in MOSS Workflows</title><content type='html'>&lt;span style="font-family:arial;"&gt;If you are developing workflows in MOSS and have experienced issues using the Delay activity then this may help you . . .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;I was experiencing weird behaviour when I used the Delay activity. I asked the delay activity to delay for 3 minutes - the first time it delayed for 5 minutes, then 15 minutes, then 30 minutes and so on . . .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;If you are experiencing this also, make sure you have Windows 2003 Server SP2 installed and then obtain a copy of the hotifx for &lt;a href="http://support.microsoft.com/kb/932816"&gt;KB932816&lt;/a&gt;. Once this has been installed on the server - everything works as expected.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;Another point to note is that the delay will actually expire based on the interval of Windows SharePoint Services Timer service (owstimer.exe). What happens when you use the delay activity is that the workflow is dehydrated to SQL in effect making it go to sleep. The next time that the Windows SharePoint Services Timer service runs it checks to see whether the delay has expired or not. If it has, then the processing of the workflow continues at this point. If it hasn't then this will be checked again when the Timer service runs again.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;You can determine how regulary the timer service runs using the stsadm command line tool as follows:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;stsadm -o getproperty -propertyname "job-workflow" -url &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;http://localhost&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;To set this interval use the following stsadm command:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;stsadm -o setproperty -propertyname "job-workflow" -propertyvalue "every 5 minutes between 0 and 59" -url &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;http://localhost&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Hope this helps explain the mystery !&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-7594711839124674913?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/7594711839124674913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=7594711839124674913' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7594711839124674913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7594711839124674913'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/06/issues-with-delay-activity-in-moss.html' title='Issues with the Delay Activity in MOSS Workflows'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-8057457817487615324</id><published>2007-05-01T10:13:00.001+01:00</published><updated>2007-05-01T10:14:05.700+01:00</updated><title type='text'>Monday’s Useful Links</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;Sorry it's a day late, but here it is:    &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.u2u.info/Blogs/Kevin/default.aspx"&gt;Kevin DeRudder&lt;/a&gt; points out that Audiences aren't just for WebParts, but for QuickLaunch links too – check it out &lt;a href="http://www.u2u.info/Blogs/Kevin/Lists/Posts/Post.aspx?List=6f246d9a%2De4e7%2D4846%2Db776%2Df9a62112ffb7&amp;amp;ID=12"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Willie Rust has posted a good &lt;a href="http://www.willierust.com/Lists/Posts/Post.aspx?ID=5"&gt;article&lt;/a&gt; on using a SharePoint list as an authentication provider.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;An interesting article from Tony Bierman of &lt;a href="http://sharepointsolutions.com/"&gt;SharePoint Solutions&lt;/a&gt; on team development for SharePoint can be found &lt;a href="http://sharepointsolutions.blogspot.com/2007/04/msdn-team-based-development-in.html"&gt;here&lt;/a&gt;. This article also points to an &lt;a href="http://msdn2.microsoft.com/en-us/library/bb428899.aspx"&gt;MSDN article&lt;/a&gt; on the same subject.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://markharrison.co.uk/blog/"&gt;Mark Harrison&lt;/a&gt; point us to an extremely useful tool from &lt;a href="http://www.sharepointblogs.com/keutmann/default.aspx"&gt;Carsten Keutmann&lt;/a&gt; - the &lt;a href="http://www.sharepointblogs.com/keutmann/archive/2007/01/27/18652.aspx"&gt;SharePoint Manager&lt;/a&gt;. The amount of times I've written a little console app to change a property on one object - this should ease the pain significantly.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.sharepoint-tips.com/"&gt;Ishai Sagi&lt;/a&gt; pointed me to a blog posting by &lt;a href="http://blogs.microsoft.co.il/blogs/meronf/"&gt;Meron Fridman&lt;/a&gt; who has extended the CQWP in a cool way - check it out &lt;a href="http://blogs.microsoft.co.il/blogs/meronf/archive/2007/04/28/-Content-Query-Web-Part-_2B00_-Roller_2800_extended-Content-Query-Web-Part-with-marquee_2900_-.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Interesting post from &lt;a href="http://blogs.msdn.com/joelo/default.aspx"&gt;Joel Oleson&lt;/a&gt; on why he doesn't recommend an in place upgrade can be found &lt;a href="http://blogs.msdn.com/joelo/archive/2007/04/30/5-reasons-not-to-use-in-place-upgrade.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I've just seen &lt;a href="http://blog.krichie.com/2007/04/05/beware-of-cascading-deletes-in-wssmoss/"&gt;this&lt;/a&gt; - a must read about a bug in MOSS. Apparently MS are working on a fix.&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/30976103-8057457817487615324?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/8057457817487615324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=8057457817487615324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8057457817487615324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8057457817487615324'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/05/mondays-useful-links.html' title='Monday’s Useful Links'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-578889532538765690</id><published>2007-04-23T09:38:00.000+01:00</published><updated>2007-04-23T09:46:37.234+01:00</updated><title type='text'>Monday Useful Bits and Pieces</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Quite often (and on a Monday in particular after a weekend's postings) I find a list of useful things from my RSS feeds which I think are really useful. Then, in the future, when I try and find them again I can never find that one link I want. So on a Monday I'm gonna start posting a list of my favourites from the past week - sort of a "recommended reading" list for others and a one-stop shop of my useful links for me ! Since I've just decided to do this this weeks list will be a little short, but here it is:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;1. Thanks to &lt;a href="http://andrewconnell.com/blog/"&gt;Andrew Connell&lt;/a&gt; for pointing me to a useful &lt;a href="http://www.johnholliday.net/archive/2007/04/22/Write-Your-CAML-Queries-in-C-using-CAML.NET.aspx"&gt;article&lt;/a&gt; by &lt;a href="http://www.johnholliday.net/"&gt;John Holliday&lt;/a&gt; on CAML.NET - really cool.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;2. A useful web part for redirecting users to different URLs can be found &lt;a href="http://www.sharepointsecurity.com/blog/sharepoint/sharepoint-2007-development/frantic-redirection-sharepoint-webpart/"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;3. LINQ to SharePoint - excellent article &lt;a href="http://community.bartdesmet.net/blogs/bart/archive/2007/04/13/coming-soon-the-return-of-iqueryable-t-linq-to-sharepoint.aspx"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Told you it would be a short list this week - the list next week will be longer !&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-578889532538765690?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/578889532538765690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=578889532538765690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/578889532538765690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/578889532538765690'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/monday-useful-bits-and-pieces.html' title='Monday Useful Bits and Pieces'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-8394025384948586537</id><published>2007-04-19T16:48:00.000+01:00</published><updated>2007-04-25T09:18:27.764+01:00</updated><title type='text'>Site Collection created from the Team Site template and Wondering where the Master Page settings are ?</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;I had a colleague today who had created a Site Collection within a web application based on the Team Site template. However, when he came to set an alternate CSS for the site collection through the Master page settings he found that the "Master page" link under the "Look and Feel" section of the site settings wasn't present.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;To solve this problem we had to enable the "Office SharePoint Server Publishing Infrastructure" feature at the site collection level. Once this had been done the "Master page" link appears and you can set the alternate CSS as you wish.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;I'm reliably informed that the reason it isn’t there is that it wouldn’t normally be available on a WSS only infrastructure (we were running MOSS, not WSS) so the team site template has no dependency on it. So if you need this functionality within MOSS and you've created the site collection from the team site template, make sure to enable the "Office SharePoint Server Publishing Infrastructure" feature at the site collection level.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;UPDATE 25-04-07: Turns out that the "Navigation" link under the "Look and Feel" section of the site settings page is also affected by the presence of this feature too - I wonder what else it affects ?!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-8394025384948586537?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/8394025384948586537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=8394025384948586537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8394025384948586537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8394025384948586537'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/site-collection-created-from-team-site.html' title='Site Collection created from the Team Site template and Wondering where the Master Page settings are ?'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-277231423637597926</id><published>2007-04-19T09:23:00.000+01:00</published><updated>2007-04-19T09:25:51.478+01:00</updated><title type='text'>All you need to know about Alternate Access Mappings (AAM)</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Troy Starr of the WSS Test Team has written an excellent 3-part article detailing AAM.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;The details can be found below:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2007/03/06/what-every-sharepoint-administrator-needs-to-know-about-alternate-access-mappings-part-1.aspx"&gt;Part 1&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2007/03/19/what-every-sharepoint-administrator-needs-to-know-about-alternate-access-mappings-part-2-of-3.aspx"&gt;Part 2&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2007/04/18/what-every-sharepoint-administrator-needs-to-know-about-alternate-access-mappings-part-3-of-3.aspx"&gt;Part 3&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Definitely worth a read . . .&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-277231423637597926?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/277231423637597926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=277231423637597926' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/277231423637597926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/277231423637597926'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/all-you-need-to-know-about-alternate.html' title='All you need to know about Alternate Access Mappings (AAM)'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-4227804166444103029</id><published>2007-04-19T09:11:00.000+01:00</published><updated>2007-04-19T09:14:17.402+01:00</updated><title type='text'>Office Client and MOSS Integration - Fair, Good, Better, Best</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Thanks to my colleague &lt;a href="http://planetwilson.blogspot.com/index.html"&gt;Mark Wilson&lt;/a&gt; for pointing this out - a version of the beloved document from SPS 2003 has been released for MOSS detailing the differences in Office client versions when interacting with MOSS. You can find the document &lt;/span&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E0D05A69-F67B-4D37-961E-2DB3C4065CB9&amp;amp;displaylang=en#QuickInfoContainer"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-4227804166444103029?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/4227804166444103029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=4227804166444103029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4227804166444103029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4227804166444103029'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/office-client-and-moss-integration-fair.html' title='Office Client and MOSS Integration - Fair, Good, Better, Best'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-6633226017051205993</id><published>2007-04-19T09:02:00.000+01:00</published><updated>2007-04-19T09:09:10.262+01:00</updated><title type='text'>Workflow Debugging - Attaching to W3WP.EXE Crashes VS.NET</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Ever come across the problem where you want to debug your workflow so you attach VS.NET to the w3wp process and VS.NET crashes ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;a href="http://blogs.infosupport.com/marcelv/default.aspx"&gt;Marcel de Vries &lt;/a&gt;has a solution - in the attach dialog, only attach to Workflow instead of allowing VS.NET to automatically determine the type of code to debug. For details of Marcel's solution, click &lt;a href="http://blogs.infosupport.com/marcelv/archive/2007/01/29/How-to-solve-Visual-studio-crash-on-attach-process-for-debugging-a-sharepoint-workflow.aspx"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;I used to hit this problem time and time again, but since finding this solution and selecting only workflow when I want to debug a workflow I have yet to hit the problem - so looks like the solution works !!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-6633226017051205993?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/6633226017051205993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=6633226017051205993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/6633226017051205993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/6633226017051205993'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/workflow-debugging-attaching-to-w3wpexe.html' title='Workflow Debugging - Attaching to W3WP.EXE Crashes VS.NET'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-8905128249968203198</id><published>2007-04-18T10:14:00.000+01:00</published><updated>2007-04-18T10:17:36.382+01:00</updated><title type='text'>Slow Page Loading Times for WCM Site ?</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;If you're developing a WCM site (i.e. internet facing) then you may notice that pages within the site are slow to load.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;An excellent post by the &lt;a href="http://blogs.msdn.com/ecm/default.aspx"&gt;Microsoft ECM team&lt;/a&gt; can be found &lt;a href="http://blogs.msdn.com/ecm/archive/2007/02/21/building-a-new-page-layout-which-does-not-reference-core-js-but-downloads-it-while-the-page-is-being-viewed-thereby-optimizing-response-time.aspx"&gt;here&lt;/a&gt; which details a workaround - it turns out that a large portion of the page load time is due to the download of the core.js file. The article described a workaround to allow the core.js to load in the background once the page content has loaded.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-8905128249968203198?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/8905128249968203198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=8905128249968203198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8905128249968203198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8905128249968203198'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/slow-page-loading-times-for-wcm-site.html' title='Slow Page Loading Times for WCM Site ?'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-4936163806704136168</id><published>2007-04-18T09:00:00.000+01:00</published><updated>2007-04-18T09:01:19.869+01:00</updated><title type='text'>VS.NET Extenstions for WSS 3.0</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;For those that don't know by now, the Visual Studio Extensions for WSS 3.0 have RTM'd ! You can find them &lt;/span&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=19f21e5e-b715-4f0c-b959-8c6dcbdc1057&amp;amp;displaylang=en"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-4936163806704136168?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/4936163806704136168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=4936163806704136168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4936163806704136168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/4936163806704136168'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/vsnet-extenstions-for-wss-30.html' title='VS.NET Extenstions for WSS 3.0'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-8840899012762706651</id><published>2007-04-17T14:37:00.000+01:00</published><updated>2007-04-17T15:46:15.361+01:00</updated><title type='text'>Make Your MOSS Workflow Forms Look Like Microsoft's</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;When creating InfoPath forms for your custom developed MOSS workflows you typically fire up InfoPath and start dropping on controls etc. I've done this in the past until recently I wanted to develop a workflow that looked more like the out-of-the-box workflows that ship with MOSS. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;So, how can you style your forms to look like the out of the box forms that ship with MOSS ? Easy . . . &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;The workflows that ship with MOSS are simply features installed in the same manner as any custom feature you would develop yourself. So go to the 12 hive in Windows Explorer, then navigate into the TEMPLATES directory. Right-click on the "FEATURES" folder and select "Search" to search for files in this folder. Enter a search term of "*.xsn" in the "All or part of the file name" text box and this will return all of the InfoPath forms that ship with MOSS. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Personally I've copied all of these into another separate folder, so I don't run the risk of messing up the forms in the features folders. You can then open these in design mode in InfoPath and interrogate font styles, sizes and colours, paragraph spacing, button rules etc. to your hearts content !! &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;It's easy to make your forms look more like the out of the box forms by just spending a little time. e.g. when loading InfoPath by default you are using Verdana font size 10. Most of the out-of-the-box forms appear to use Tahoma size 8.5 !! &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;My favourite form to base look &amp;amp; feel on is called "ReviewRouting_Review_1033.xsn" and can be located in the following location "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\ReviewWorkflows\Forms" - it has multiple views so you can get a good grip of the various look and feel aspects of the form. As I said, make sure you take a copy of the file before opening it incase you accidentally save any edits !!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-8840899012762706651?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/8840899012762706651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=8840899012762706651' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8840899012762706651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/8840899012762706651'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/make-your-moss-workflow-forms-look-like.html' title='Make Your MOSS Workflow Forms Look Like Microsoft&apos;s'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-5333236285850627140</id><published>2007-04-16T13:29:00.000+01:00</published><updated>2007-04-16T13:31:45.719+01:00</updated><title type='text'>WSS Master Page Samples</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Microsoft have recently announced the release of some sample master pages for WSS 3.0.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Check them out &lt;/span&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=7c05ca44-869a-463b-84d7-57b053711a96&amp;displaylang=en&amp;amp;tm"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-5333236285850627140?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/5333236285850627140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=5333236285850627140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5333236285850627140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5333236285850627140'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/wss-master-page-samples.html' title='WSS Master Page Samples'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-5451114023097773051</id><published>2007-04-16T13:16:00.000+01:00</published><updated>2007-04-16T13:23:59.080+01:00</updated><title type='text'>Recycle App Pools Easily</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;When developing for MOSS you quite often have to recycle the application pools. This is a much quicker way than resetting IIS (via an iisreset command) each time.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Recently I came accross a really useful utlity that allows you to recycle app pools either individually, all at once, or perform an iisreset. The utility is really handy and lives in the system tray.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Check it out &lt;a href="http://www.harbar.net/articles/APM.aspx"&gt;here&lt;/a&gt;. I'm running version 1.0.2.0 and it works great, although it sounds like there may even be more updates on the way e.g. hotkey shortcuts etc. which would be great.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-5451114023097773051?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/5451114023097773051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=5451114023097773051' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5451114023097773051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/5451114023097773051'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/04/recycle-app-pools-easily.html' title='Recycle App Pools Easily'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-7338516669547523525</id><published>2007-03-30T10:17:00.000+01:00</published><updated>2007-03-30T10:20:58.096+01:00</updated><title type='text'>MOSS and Email in a VPC without Exchange</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;A colleague of mine has detailed an excellent method of setting up email within a single VPC environment without requiring exchange (as we all know exchange takes over the SMTP service, and hence MOSS can't co-exist with exchange - there are email related problems since MOSS likes the local SMTP service itself !).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Check &lt;a href="http://planetwilson.blogspot.com/2007/03/often-when-building-moss-vpc-you-would.html"&gt;this&lt;/a&gt; link out for further details.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-7338516669547523525?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/7338516669547523525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=7338516669547523525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7338516669547523525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/7338516669547523525'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/03/moss-and-email-in-vpc-without-exchange.html' title='MOSS and Email in a VPC without Exchange'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-1109385875872414424</id><published>2007-03-14T12:27:00.000Z</published><updated>2007-03-14T12:28:28.345Z</updated><title type='text'>Validating SharePoint Filenames</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;I've developed various solutions to this in various SharePoint projects, but I found a nice neat solution from Mad's thoughts. Find it here: &lt;a href="http://weblogs.asp.net/mnissen/archive/2005/11/17/430785.aspx"&gt;http://weblogs.asp.net/mnissen/archive/2005/11/17/430785.aspx&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-1109385875872414424?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/1109385875872414424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=1109385875872414424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/1109385875872414424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/1109385875872414424'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/03/validating-sharepoint-filenames.html' title='Validating SharePoint Filenames'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-116912123049898076</id><published>2007-01-18T11:52:00.000Z</published><updated>2007-01-18T11:53:52.016Z</updated><title type='text'>RTM Bug with Version History</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;I've found a bug in MOSS 2007 RTM code that I thought I'd inform everyone about.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;If you view the version history of a document, then there are two toolbar buttons available: "Delete All Versions" and "Delete Minor Versions". The "Delete All Versions" button works fine, however there is a bug with the "Delete Minor Versions" functionality.&lt;br /&gt;&lt;br /&gt;"Delete Minor Versions" works fine if the recycle bin is enabled on the web application in question. However if you disable the recycle bin on the web application settings via central administration, then attempt to delete minor versions the minor versions aren't deleted.&lt;br /&gt;&lt;br /&gt;Thought people would like to know !&lt;br /&gt;&lt;/span&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/30976103-116912123049898076?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/116912123049898076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=116912123049898076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/116912123049898076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/116912123049898076'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2007/01/rtm-bug-with-version-history.html' title='RTM Bug with Version History'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-116075419911326732</id><published>2006-10-13T16:39:00.000+01:00</published><updated>2006-10-13T16:43:19.553+01:00</updated><title type='text'>"sgen.exe" exited with code 1</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Not a MOSS 2007 blog post as such, but an irritating bug I found whilst developing a MOSS application using VS.NET 2005. Building in debug has worked fine for many weeks now, eventually I've got around to building a release build.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Two of the projects in my solution contain web references to a web service and both of these projects were failing with the error: "&lt;span style="font-family:courier new;"&gt;sgen.exe exited with code 1&lt;/span&gt;".&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;It turns out that even though &lt;span style="font-family:courier new;"&gt;sgen.exe&lt;/span&gt; is passed the&lt;span style="font-family:courier new;"&gt; /assembly&lt;/span&gt; parameter it can ignore this and look at a previous version of the assembly stored in the GAC - hence, if you see this problem, remove the assembly in question from the GAC and it appears to get around the problem and build OK.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-116075419911326732?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/116075419911326732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=116075419911326732' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/116075419911326732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/116075419911326732'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/10/sgenexe-exited-with-code-1.html' title='&quot;sgen.exe&quot; exited with code 1'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-115764495697396967</id><published>2006-09-07T17:02:00.000+01:00</published><updated>2007-03-14T12:16:44.014Z</updated><title type='text'>Weird Exception when Creating a Web Programatically</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Sorry I haven't posted for a long time, but I've been mega-busy working on various SharePoint goodies and haven't found the time . . .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;My latest problem I'm seeing revolves around programatically creating a web i.e. creating a sub-site. I need to create a custom web service, and one of the methods on that web service must create a site - easy you'd think. I used the following code:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;analysisSite = new SPSite(DealSiteHelper.AnalysisWebURL);&lt;br /&gt;analysisWeb = analysisSite.OpenWeb();&lt;br /&gt;analysisWeb.AllowUnsafeUpdates = true;&lt;br /&gt;SPWeb newWeb = analysisWeb.Webs.Add(webUrl, title, title, 1033, "STS", true, false);&lt;br /&gt;analysisWeb.AllowUnsafeUpdates = false;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However when the code hit the line where we are adding the new web to the Webs collection I get a Null Reference Exception with the following stack trace:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.SPSite.get_Features()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.SPElementProvider.QueryForWorkflowDefinitions(SPWeb web)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.Workflow.SPWorkflowManager. RegisterFeatureTemplates(SPWorkflowTemplateCollection wftemplates, SPWeb web)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.SPWeb.get_WorkflowTemplates()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.Workflow.SPWorkflowAssociation. get_BaseTemplate()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.Workflow.SPWorkflowAssociation. get_BaseTemplateInternal()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.Workflow.SPWorkflowAssociation.SetTaskList(SPList list)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.Workflow.SPWorkflowAssociationCollection. SetUtilityLists(SPWorkflowAssociation wa, Boolean forceUtilityListCreation)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.Workflow.SPWorkflowAssociationCollection. AddCore(SPWorkflowAssociation wa, Guid id, SPList list, Boolean forceUtilityListCreation)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.Workflow. SPContentTypeWorkflowAssociationCollection. AddCoreCT(SPWorkflowAssociation associationTemplate)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.Workflow. SPContentTypeWorkflowAssociationCollection. UpdateOrAdd(SPWorkflowAssociation associationTemplate)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.SPContentType.CopyWorkflowAssociationsTo(SPContentType ctDst)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.SPWeb.SyncNewLists()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.SPWeb.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.SPWeb.SPWebCollectionProvider.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;at Company.SharePoint.AnalysisExecution.DealSiteWebService.CreateDealSite(String title) in D:\\My Documents\\Visual Studio 2005 Projects\\DealSiteWebService\\DealSiteWebService.asmx.cs:line 40&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If I extract the above code and place it in a normal Windows Console Application, then everything works OK - this exception only occurs when I call this code in a web service method.&lt;br /&gt;&lt;br /&gt;I've come accross the same problem mentioned on &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2006/06/13/8111.aspx"&gt;Todd Baginski's blog&lt;/a&gt;, but I don't think he's found a solution yet either.&lt;br /&gt;&lt;br /&gt;If I ever manage to work out what this problem is I shall post again, but in the mean time lets hope that it's fixed in TR :)&lt;/span&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/30976103-115764495697396967?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/115764495697396967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=115764495697396967' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115764495697396967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115764495697396967'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/09/weird-exception-when-creating-web.html' title='Weird Exception when Creating a Web Programatically'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-115391837694075218</id><published>2006-07-26T13:51:00.000+01:00</published><updated>2006-07-26T13:52:56.950+01:00</updated><title type='text'>InfoPath 2007 Features</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;There is an excellent article on MSDN located &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/08/InfoPath2007/default.aspx"&gt;here&lt;/a&gt; that describes the new features of InfoPath 2007 - well worth a read for those looking at getting started with the new InfoPath client.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-115391837694075218?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/115391837694075218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=115391837694075218' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115391837694075218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115391837694075218'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/07/infopath-2007-features.html' title='InfoPath 2007 Features'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-115314783187610754</id><published>2006-07-17T15:48:00.000+01:00</published><updated>2006-07-17T15:50:31.886+01:00</updated><title type='text'>Business Data Catalog Made Easy</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Kudos to Todd Baginski for creating a useful tool to help create the awful XML file that's necessary in defining BDC applications.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Information on the tool, and a link to the download, can be found &lt;a href="http://www.sharepointblogs.com/tbaginski/archive/2006/07/16/9259.aspx"&gt;here&lt;/a&gt; so keep an eye open for updates.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-115314783187610754?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/115314783187610754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=115314783187610754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115314783187610754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115314783187610754'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/07/business-data-catalog-made-easy.html' title='Business Data Catalog Made Easy'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-115289371793636712</id><published>2006-07-14T17:13:00.000+01:00</published><updated>2006-07-14T17:15:17.946+01:00</updated><title type='text'>Contact Selector ActiveX Control in Workflow Forms</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;If like me you were a little confused when you opened the sample InfoPath workflow forms from the ECM starter kit which include the Contact Selector ActiveX control, and you couldn't do anything with the control then don't worry . . .&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;You need to add the control to your toolbox before you can use it. To do this:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;ul&gt;&lt;li&gt;Open the form in question in InfoPath 2007 and in the Design Tasks pane, click "Controls"&lt;/li&gt;&lt;li&gt;On the Controls pane, click the "Add or Remove Custom Controls ..." link (near the bottom)&lt;/li&gt;&lt;li&gt;In the Add or Remove Custom Controls dialog box, click the Add button&lt;/li&gt;&lt;li&gt;In the "Select a Control Type" page, select "ActiveX Control" and click Nex&lt;/li&gt;&lt;li&gt;tFrom the large list of ActiveX controls, select "Contact Selector" and click Next&lt;/li&gt;&lt;li&gt;Select "Don't include in a .cab file" and click Next&lt;/li&gt;&lt;li&gt;For the "Binding property" select "value" and click Next&lt;/li&gt;&lt;li&gt;For Field or group type select "Field or group (any data type)" and click Finish&lt;/li&gt;&lt;li&gt;Click Close and then click OK.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The Contact Selector control will now be listed in the Custom section of the Controls pane and you should be able to access the properties of the control in the form.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-115289371793636712?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/115289371793636712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=115289371793636712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115289371793636712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115289371793636712'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/07/contact-selector-activex-control-in.html' title='Contact Selector ActiveX Control in Workflow Forms'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-115281802222764365</id><published>2006-07-13T20:05:00.000+01:00</published><updated>2006-07-13T20:20:29.420+01:00</updated><title type='text'>MOSS and RMS Woes</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;As a nice change from Workflow I thought I'd post about the recent experiences I've had trying to integrate MOSS with Windows Rights Management Server.&lt;/span&gt; &lt;span style="font-family:arial;font-size:85%;"&gt;I'm a big fan of RMS - protecting documents and emails provides fantastic security for organisations, so when I read about integrating RMS technology with MOSS I was quite excited. However the excitement didn't last long when I tried to get it working :)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Within my organisation we already have RMS up and running, so following the documentation from the &lt;/span&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=38ca6b32-44be-4489-8526-f09c57cd13a5&amp;DisplayLang=en"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;ECM starter kit &lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;I figured it would be pretty straightforward to get a MOSS installation to work alongside - this wasn't the case ! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Installing Windows RMS client SP2 onto the MOSS server was straightforward and got around the error seen in Central Administration when the client is not present. I then typed the URL to the RMS server in Central Administration and clicked OK and saw the error detailed in the setup guide - "&lt;em&gt;The required windows rights management client is present but the server refused access. IRM will not work until the server grants permission&lt;/em&gt;". As detailed in the install guide, to get around this problem I modified the access control list on the following file on the RMS server: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;c:\Inetpub\wwwroot\_wmcs\Certification\ServerCertification.asmx&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;but this didn't get around the &lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;issue, even when I added "&amp;lt;Domain Name&amp;gt;\Domain Computers" to the ACL (I even tried adding "Everyone" with full control, but no luck !!). &lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;I've tried following the setup guide again and again on various environments:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;A VPC&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;Our corporate RMS and MOSS installations.&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;A fresh, standalone installation in a fresh domain with just 2 servers in the environment (1 DC and RMS, 1 MOSS server)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;VMWare server environments similar to the above &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;but I've not succeeded with any of these as yet, altough I have seen the following errors in the application event log:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;--------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Event Type: ErrorEvent &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Source: Windows SharePoint Services 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Event Category: IRM &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Event ID: 5132&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Date: 6/30/2006&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Time: 4:21:42 PM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;User: N/A&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Computer: RMSDC02&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Description:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Information Rights Management (IRM): There was a problem while trying to obtain and activate a machine certificate.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;In order to execute RMS transactions on a machine, that machine will need a unique certificate. This certificate is stored locally in the RMS lockbox.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Additional Data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Error value: 8004cf40&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;For more information, see Help and Support Center at &lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/events.asp"&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;http://go.microsoft.com/fwlink/events.asp&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;--------------------------------------&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;--------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Event Type: ErrorEvent &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Source: Windows SharePoint Services 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Event Category: IRM &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Event ID: 5053&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Date: 6/30/2006&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Time: 4:21:41 PM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;User: N/A&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Computer: RMSDC02&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Description:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Information Rights Management (IRM): There was a problem while trying to acquire a machine certificate from the local Rights Management Services (RMS) lockbox.The specific problem could not be determined.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;In order to execute RMS transactions on a machine, that machine will need a unique certificate. This certificate is stored locally in the RMS lockbox.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Additional DataError value: 8004cf40&lt;br /&gt;For more information, see Help and Support Center at &lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/events.asp"&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;http://go.microsoft.com/fwlink/events.asp&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;--------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;I'll keep banging my head against the wall and post again if I get anywhere with it (I'd be interested to hear from anyone who has managed to get this working as I'm having my doubts about it :) !!).&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-115281802222764365?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/115281802222764365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=115281802222764365' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115281802222764365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115281802222764365'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/07/moss-and-rms-woes.html' title='MOSS and RMS Woes'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-115278762663830215</id><published>2006-07-13T11:44:00.000+01:00</published><updated>2006-07-13T11:47:06.646+01:00</updated><title type='text'>Introduction to Workflow Technologies</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;I know I keep raving on about Workflows in MOSS, but it's my main focus at the minute and I promise I'll move onto other Office-related goodies at some point :) Until then, for those that would like a gentle introduction to Workflows in SharePoint, checkout the post on &lt;a href="http://markharrison.co.uk/blog/2006/07/understanding-wf-in-wss-and-office.htm"&gt;Mark Harrison's blog &lt;/a&gt;giving a link to a document titled "Understanding Workflows in Windows SharePoint Services and the 2007 Microsoft Office Sytem" - it's a decent read !&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-115278762663830215?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/115278762663830215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=115278762663830215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115278762663830215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115278762663830215'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/07/introduction-to-workflow-technologies.html' title='Introduction to Workflow Technologies'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-115273110175332360</id><published>2006-07-12T19:59:00.000+01:00</published><updated>2006-07-12T20:06:47.746+01:00</updated><title type='text'>Migrating a WorkFlow from beta1 TR to beta2</title><content type='html'>&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Just another quickie for today. I recently ported an existing SharePoint workflow written using VS.NET in beta1 TR timescales to the new beta2 products and thought I'd post a few of the nasties that I found along the way regarding changes between the two - some people said beta1TR workflows wouldn't work in beta2, but with a little tweaking you CAN save yourself the hassle of having to re-write them !&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;To programatically associate a workflow with a list you use the &lt;span style="font-family:courier new;"&gt;SPWorkflowAssociation &lt;/span&gt;class. This used to have a constructor that you used to associate a workflow with a list, but now you need to call the static method &lt;span style="font-family:courier new;"&gt;SPWorkflowAssociation.CreateListAssociation&lt;/span&gt; instead.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;The &lt;span style="font-family:courier new;"&gt;SPLongOperation &lt;/span&gt;class moved from the &lt;span style="font-family:courier new;"&gt;Microsoft.SharePoint.ApplicationPages&lt;/span&gt; namespace to the &lt;span style="font-family:courier new;"&gt;Microsoft.SharePoint &lt;/span&gt;namespace (we used this a lot to oversee long running operations). I couldn't find any reference in the documentation to this class and had to use &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector &lt;/a&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;to find it.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Any &lt;span style="font-family:courier new;"&gt;internal &lt;/span&gt;and &lt;span style="font-family:courier new;"&gt;private&lt;/span&gt; members you had written in the &lt;span style="font-family:courier new;"&gt;workflow.cs &lt;/span&gt;file that are referenced in the activity properties in the workflow designer all have to be made &lt;span style="font-family:courier new;"&gt;public &lt;/span&gt;as they can't be referenced otherwise ! These were giving errors in the workflow designer (i.e. the red exclamation points) but making them &lt;span style="font-family:courier new;"&gt;public&lt;/span&gt;, and double clicking on the blue icon next to the properties in the designer to rebind them solved this.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;When defining the &lt;span style="font-family:courier new;"&gt;workflow.xml &lt;/span&gt;file you need to have the line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;TaskListContentTypeId=&lt;br /&gt;"0x01080100C9C9515DE4E24001905074F980F93160"&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;in the &lt;span style="font-family:courier new;"&gt;&amp;lt;workflow&amp;gt;&lt;/span&gt; tag. If not, when you click on a task that the workflow has created, you get the out-of-the-box task properties edit form instead of any custom InfoPath forms you've specified. This GUID refers to a content type defined in an out-of-the-box feature which the out-of-the-box workflows appear to reference in their &lt;span style="font-family:courier new;"&gt;workflow.xml &lt;/span&gt;files too. I'm not sure why it's needed, but it won't work without it - this one took me an age to find :)&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;That's about it - if anyone has any more problems they've encountered upgrading beta1 TR workflows to beta2 I'd be interested to hear from you . . .&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-115273110175332360?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/115273110175332360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=115273110175332360' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115273110175332360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115273110175332360'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/07/migrating-workflow-from-beta1-tr-to.html' title='Migrating a WorkFlow from beta1 TR to beta2'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-115272886459922818</id><published>2006-07-12T19:12:00.000+01:00</published><updated>2007-08-21T09:10:13.443+01:00</updated><title type='text'>A WorkFlow that Uploads a Document via a Task using an InfoPath Form</title><content type='html'>&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;OK, yesterday I posted how you could use the File Attachment control in InfoPath 2007 and programatically get at the uploaded file. This was a means to an end, and the main aim of the experiment was to incorporate just this sort of InfoPath form into a Microsoft Office SharePoint Server 2007 workflow, so that was my main task today. The objective was simple (or so it sounded) - develop a document-based review workflow that:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Displays an InfoPath initiation form where the workflow initiator can choose a user to review the document, and enter some comments.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Assign a task to the reviewer informing him/her that they have a job to do.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Displays an InfoPath task form so that when the reviewer clicks on the task they have been assigned an InfoPath form is displayed asking them to upload a review comments document.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Extracts the uploaded review comments document and uploads it to a SharePoint document library.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Completes the task, and sends an email informing the workflow initiator that the review is complete.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;As easy as this sounds (I thought I'd done the hard bit working out the File Attachment control yesterday !) I did come accross some problems:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. Creating a Task&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;I managed to get the &lt;span style="font-family:courier new;"&gt;OnWorkflowActivated&lt;/span&gt; activity working OK, so I then proceeded to add a &lt;span style="font-family:courier new;"&gt;CreateTask&lt;/span&gt; activity to the workflow - it turns out that the &lt;span style="font-family:courier new;"&gt;CreateTask&lt;/span&gt; activity needs it's own correlation token, even though the only one displayed in the design surface in VS.NET is the workflow's correlation token. To get around this I had to go into the &lt;span style="font-family:courier new;"&gt;Workflow1.designer.cs &lt;/span&gt;file and add my own additional &lt;span style="font-family:courier new;"&gt;System.Workflow.Runtime.CorrelationToken&lt;/span&gt; object that I could use for the task activities (&lt;span style="font-family:courier new;"&gt;CreateTask, OnTaskChanged, &lt;span style="font-family:arial;"&gt;and &lt;/span&gt;CompleteTask&lt;/span&gt;).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;2. Installing the Workflow&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;When I came to deploy the workflow feature to the server it turns out there's a couple of things you need to be aware of when developing your InfoPath forms. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;a) I ran the &lt;span style="font-family:courier new;"&gt;stsadm -o installfeature&lt;/span&gt; to install the workflow and I received a "The XSN can not be used on server" error for one of my InfoPath forms (the one used when the reviewer clicks on the task).This turned out to be a security setting in the form in question. In InfoPath if you go to "Tools -&gt; Form Options -&gt; Security and Trust" you can set the security level of the form. There's a check box in there called "Automatically determine security level (recommended)" which was checked in my initiation form and this form worked fine (I initially copeid this form from the HelloWorldSequential workflow sampe and modified it for my needs). &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Even though this was checkbox was ticked, you could see in the greyed-out options that the Initiation form had "Domain" level trust. The form I created from scratch form my task also had this checkbox ticked but the greyed-out options showed "Restricted" level. I un-ticked this checkbox and set the level to "Domain", re-published the task form and re-deployed the feature and this solved that problem.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;b) The InfoPaths forms had submit buttons on them. In order to get these to function correctly you need to add a rule to the button with 2 actions:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;submits the form to a data connection that is configured to submit to the hosting environment (note, you will have to add this data connection to the InfoPath form).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;closes the form with no prompt.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;When this was done the forms post back correctly as expected.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;3. Running the Workflow&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;The workflow (eventually, after much debugging) ran OK and assigned the task to the reviewer. When the reviewer selected the task, the appropriate InfoPath form was dispayed asking the reviewer to upload the review document. Clicking on the File Attachment control in the InfoPath form, the reviewer could navigate to the review comments document on the local machine and click upload, but an error stating "The selected file was not found. Select another file" is displayed in a message box.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;I haven't really found a suitable solution / explanation for this, but there is a workaround. You can edit the file "&lt;span style="font-family:courier new;"&gt;c:\program files\common files\microsoft shared\web server extensions\12\template\layouts\WrkTaskIP.aspx&lt;/span&gt;" and place the following javascript code into the file:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;aspnetForm.encoding = "multipart/form-data";&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;This must be placed inside the final &lt;span style="font-family:courier new;"&gt;&amp;lt;asp:content&amp;gt;&lt;/span&gt; control (the one called "&lt;span style="font-family:courier new;"&gt;PlaceHolderMain&lt;/span&gt;") as shown below:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;script type="text\javascript"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;aspnetForm.encoding = "multipart/form-data";&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&amp;lt;SharePoint:FormComponent TemplateName="WorkflowEditFormToolBar" ControlMode="Edit" runat="server"/&amp;gt;&lt;br /&gt;&amp;lt;InfoPath:XmlFormView id="XmlFormControl" runat="server" style="width:100%; height:100%;"/&amp;gt;&lt;br /&gt;&amp;lt;SharePoint:FormDigest runat=server/&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;This isn't really an ideal solution, as it involves modifying a standard MOSS page, but for now this is the only way I can find to get around this issue.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;After all of this I now have the workflow up and running and it works as expected. I have yet implement the functionality to email the workflow initiator informing him / her that the review comments document has been uploaded, so I'll post again if I hit any problems with this but fingers crossed it should be OK !&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;If you're interested, the following is the code I used in a &lt;span style="font-family:courier new;"&gt;CodeActivity&lt;/span&gt; in the workflow to extract the document from the InfoPath form and upload it into SharePoint (you should notice a large similarity to the code I posted yesterday to extract the file from Infopath !):&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;private void uploadReviewCommnentsToSharePoint(object sender, EventArgs e)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{&lt;br /&gt;byte[] attachmentBytes = Convert.FromBase64String(afterProps.ExtendedProperties["ReviewDoc"].ToString());&lt;br /&gt;&lt;br /&gt;// Position 20 contains a DWORD indicating the length of the&lt;br /&gt;// filename buffer. The filename is stored as Unicode so the&lt;br /&gt;// length is multiplied by 2.&lt;br /&gt;int fnLength = attachmentBytes[20] * 2;&lt;br /&gt;byte[] fnBytes = new byte[fnLength];&lt;br /&gt;&lt;br /&gt;// The actual filename starts at position 24 . . .&lt;br /&gt;for (int i = 0; i &amp;lt; fnLength; ++i)&lt;br /&gt;{&lt;br /&gt;fnBytes[i] = attachmentBytes[24 + i];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Convert the filename bytes to a string. The string&lt;br /&gt;// terminates with \0 so the actual filename is the&lt;br /&gt;// original filename minus the last character !&lt;br /&gt;char[] charFileName = UnicodeEncoding.Unicode.GetChars(fnBytes);&lt;br /&gt;string fileName = new string(charFileName);&lt;br /&gt;fileName = fileName.Substring(0, fileName.Length - 1);&lt;br /&gt;&lt;br /&gt;// The file is located after the header, which is 24 bytes long&lt;br /&gt;// &lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;plus the length of the filename.&lt;br /&gt;byte[] fileContents = new byte[attachmentBytes.Length - (24 + fnLength)];&lt;br /&gt;for (int i = 0; i &amp;lt; fileContents.Length; ++i)&lt;br /&gt;{&lt;br /&gt;fileContents[i] = attachmentBytes[24 + fnLength + i];&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;// Upload the file to the SharePoint document library where the&lt;br /&gt;// workflow was initiated from . . .&lt;br /&gt;SPFolder originalFolder = workflowProperties.List.RootFolder;&lt;br /&gt;SPFile newFile = originalFolder.Files.Add(fileName, fileContents, true);&lt;br /&gt;newFile.Item.Update();&lt;br /&gt;if (newFile.CheckedOutBy != null)&lt;br /&gt;{&lt;br /&gt;newFile.CheckIn(String.Format("Review comments document for {0}", workflowProperties.Item.Name));&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;} // end of method&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-115272886459922818?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/115272886459922818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=115272886459922818' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115272886459922818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115272886459922818'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/07/workflow-that-uploads-document-via.html' title='A WorkFlow that Uploads a Document via a Task using an InfoPath Form'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30976103.post-115263166478656093</id><published>2006-07-11T16:27:00.000+01:00</published><updated>2006-07-11T17:18:02.356+01:00</updated><title type='text'>InfoPath 2007 File Attachment Control and Browser-Enabled Forms</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;span style="color:#000000;"&gt;The InfoPath 2007 File Attachment control can be used to upload documents into an InfoPath form, and works with both InfoPath client and browser-based forms. Dragging a File Attachment control onto the design surface adds a new field into the data source of type "Picture or File Attachment (base64)".&lt;br /&gt;&lt;br /&gt;This &lt;/span&gt;&lt;a href="http://blogs.msdn.com/infopath/archive/2004/03/18/92221.aspx"&gt;&lt;span style="color:#000099;"&gt;link&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; describes the technical details on how this field is formatted.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:85%;"&gt;Basically, there is a header which is of length 24 bytes + length of the filename. Following this head is the file contents. These are base64 encoded.&lt;br /&gt;&lt;br /&gt;To work with the uploaded file in .NET code in the InfoPath form you can use code similar to the following (which shows a button handler that copies the uploaded file to a local directory):&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;color:#000000;"&gt;public void Button_Clicked(object sender, ClickedEventArgs e)&lt;br /&gt;{&lt;br /&gt;XPathNavigator docXN = this.CreateNavigator();&lt;br /&gt;XPathNavigator opnXN = docXN.SelectSingleNode&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;color:#000000;"&gt;("/my:myFields/my:FileAttachment", &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;color:#000000;"&gt;this.NamespaceManager);&lt;br /&gt;byte[] attachmentNodeBytes = Convert.FromBase64String&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;(opnXN.ToString());&lt;br /&gt;&lt;br /&gt;// Position 20 contains a DWORD indicating the length of the&lt;br /&gt;// filename buffer. The filename is stored as Unicode so the&lt;br /&gt;// length is multiplied by 2.&lt;br /&gt;int fnLength = attachmentNodeBytes[20] * 2;&lt;br /&gt;byte[] fnBytes = new byte[fnLength];&lt;br /&gt;&lt;br /&gt;// The actual filename starts at position 24 . . . &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;for (int i = 0; i &lt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;{ &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;fnBytes[i] = attachmentNodeBytes[24 + i]; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;}&lt;br /&gt;&lt;br /&gt;// Convert the filename bytes to a string. The string &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;// terminates &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;with \0 so the actual filename is the &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;// original filename minus &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;the last character ! &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;char[] charFileName = UnicodeEncoding.Unicode.GetChars(fnBytes); &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;string fileName = new string(charFileName); &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;fileName = fileName.Substring(0, fileName.Length - 1);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;// The file is located after the header, which is 24 bytes long&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;// plus the length of the filename. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#000000;"&gt;byte[] fileContents = new byte[attachmentNodeBytes.Length - (24 + fnLength)];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;for (int i = 0; i &amp;lt; fileContents.Length; ++i)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;fileContents[i] = attachmentNodeBytes[24 + fnLength + i];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// We now have an array of bytes (fileContents) which we can &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// do what we like with. I'll write them to a temporary file &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;FileStream fs = new FileStream(@"C:\Temp\InfoPath Test\" + fileName, FileMode.Create); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;fs.Write(fileContents, 0, fileContents.Length); fs.Close();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Note that since this code is part of the InfoPath 2007 form the InfoPath form will need to have full trust (Tools -&gt; Form Options -&gt; Security and Trusts tab) and hence will need to be Admin deployed to the Microsoft Office SharePoint Server 2007 via Central Administration (don't forget to publish the form to a network location first !). &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;I'm going to try to incorporate this technique into an InfoPath form used in a custom developed workflow developed using the Sequential SharePoint Workflow template from the Enterprise Content Management Starter Kit, which can be downloaded &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=38ca6b32-44be-4489-8526-f09c57cd13a5&amp;amp;DisplayLang=en"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/30976103-115263166478656093?l=chrissyblanco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chrissyblanco.blogspot.com/feeds/115263166478656093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=30976103&amp;postID=115263166478656093' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115263166478656093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30976103/posts/default/115263166478656093'/><link rel='alternate' type='text/html' href='http://chrissyblanco.blogspot.com/2006/07/infopath-2007-file-attachment-control.html' title='InfoPath 2007 File Attachment Control and Browser-Enabled Forms'/><author><name>Chris White</name><uri>http://www.blogger.com/profile/02057133201984774091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry></feed>
