<?xml version="1.0" encoding="utf-8"?>
				<rss version="2.0" 
						xmlns:wfw="http://wellformedweb.org/CommentAPI/" 
						xmlns:slash="http://purl.org/rss/1.0/modules/slash/" 
						xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
						xmlns:dc="http://purl.org/dc/elements/1.1/" 
						xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
					<channel>
						<title>blog.ekegren</title> 
						<link>http://www.ekegren.dk/blog</link> 
						<description>thoughts and findings within consulting, information worker solutions and architecture</description> 
						<language>en</language> 
						<pubDate>Wed, 10 Mar 2010 19:45:24 GMT</pubDate><item>
							<title><![CDATA[Hmmm...]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18042</link> 
							<description>
								<![CDATA[<p> <table style="width: 481pt; border-collapse: collapse" cellspacing="0" cellpadding="0" width="640" border="0"> <tbody> <tr style="height: 45pt" height="60"> <td class="xl69" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 1pt solid; width: 62pt; border-bottom: windowtext 0.5pt solid; height: 45pt; background-color: transparent" width="82" height="60"> <p><font face="Calibri">Office SharePoint Server</font></p></td> <td class="xl67" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="Calibri">N/A</font></td> <td class="xl68" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="Calibri">N/A</font></td> <td class="xl70" style="border-right: windowtext 1pt solid; border-top: windowtext; border-left: windowtext; width: 350pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="467"><font face="Calibri">With SP1, any usage data that is older than 365 days is now deleted.<span>&nbsp; </span>Previously, usage data was deleted after 366 days. This caused performance issues.</font></td></tr></tbody></table></p> <p>I found this in an article about what was fixed in SP1 for MOSS. Wonder what this one day have of importance..</p>]]>
							</description>
							<category>SharePoint</category>
							<pubDate>Sun, 06 Jan 2008 13:20:59 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18042</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=18042</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=18042</trackback:ping>
					   </item><item>
							<title><![CDATA[Great posts about FBA authenticated sites]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18041</link> 
							<description>
								<![CDATA[<p><a href="http://devcow.com/blogs/jdattis/archive/2007/03/01/Office-SharePoint-Server-2007-Forms-Based-Authentication-FBA-w-MySites-Walkthrough-Part-2.aspx">http://devcow.com/blogs/jdattis/archive/2007/03/01/Office-SharePoint-Server-2007-Forms-Based-Authentication-FBA-w-MySites-Walkthrough-Part-2.aspx</a></p> <p><a href="http://devcow.com/blogs/jdattis/archive/2007/02/23/Office-SharePoint-Server-2007-Forms-Based-Authentication-FBA-Walkthrough-Part-1.aspx">http://devcow.com/blogs/jdattis/archive/2007/02/23/Office-SharePoint-Server-2007-Forms-Based-Authentication-FBA-Walkthrough-Part-1.aspx</a></p> <p>&nbsp;</p> <p>And how to use My Site and personal features for ASPNET membership users. It's a must use guide for how to enable "my links" for e.g. membership users.</p>]]>
							</description>
							<category>SharePoint</category>
							<pubDate>Wed, 02 Jan 2008 15:36:44 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18041</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=18041</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=18041</trackback:ping>
					   </item><item>
							<title><![CDATA[Great posts about FBA authenticated sites]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18030</link> 
							<description>
								<![CDATA[<p><a href="http://devcow.com/blogs/jdattis/archive/2007/02/23...">http://devcow.com/blogs/jdattis/archive/2007/02/23...</a></p> <p><a href="http://devcow.com/blogs/jdattis/archive/2007/03/01...">http://devcow.com/blogs/jdattis/archive/2007/03/01...</a></p> <p>&nbsp;</p> <p>And how to use My Site and personal features for ASPNET membership users. It's a must use guide for how to enable "my links" for e.g. membership users.</p>]]>
							</description>
							<category>SharePoint</category>
							<pubDate>Mon, 22 Oct 2007 21:40:18 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18030</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=18030</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=18030</trackback:ping>
					   </item><item>
							<title><![CDATA[Customizing "My sites"]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18028</link> 
							<description>
								<![CDATA[<P>Seems like a valuable blog post:</P>
<P><A href="http://blogs.msdn.com/sharepoint/archive/2007/03/22/customizing-moss-2007-my-sites-within-the-enterprise.aspx">http://blogs.msdn.com/sharepoint/archive/2007/03/22/customizing-moss-2007-my-sites-within-the-enterprise.aspx</A></P>
<P>&nbsp;</P>]]>
							</description>
							<category>Tip</category>
							<pubDate>Thu, 04 Oct 2007 13:47:14 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18028</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=18028</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=18028</trackback:ping>
					   </item><item>
							<title><![CDATA[Developers wanted for positions in Warsaw, Poland]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18025</link> 
							<description>
								<![CDATA[<p>If you my dear reader are situated close to Warsaw, Poland and have the desire to work with leading edge SharePoint technologies, don't hestiate - write me an email or write to "<a href="mailto:ncs@netcompany.com?subject=I kick ass - hire me!">mailto:<a href="mailto:ncs@netcompany.com">ncs@netcompany.com</a>?subject=I kick ass - hire me!</a>"&nbsp;and join our team. </p> <p>We're developing a state of the art case/document management system on top of MOSS2007 and have extended MOSS with all the stuff that MS didn't do... This is an execellent opportunity for you to develop your ASPNET2.0-3.0 skills and a chance to deep dive into MOSS-land.</p> <p>Applications wanted! <a href="http://www.netcompany.com/english_career_solutions.asp">http://www.netcompany.com/english_career_solutions...</a></p>]]>
							</description>
							<category>General</category>
							<pubDate>Mon, 10 Sep 2007 18:08:55 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18025</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=18025</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=18025</trackback:ping>
					   </item><item>
							<title><![CDATA[Problems by adding existing content database]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18022</link> 
							<description>
								<![CDATA[<p>Today I had a huge problem related to moving databases. On a test server the disk was out of space and by a short analysis the horrifying reason revealed itself: the default data store of the SQL server was on the C-drive (and not the intended D-drive for data). Hence - all content&nbsp;databases created ended up on the C-drive.</p> <p>So the quest began to move the content databases to the right partion and reconnect them to SharePoint. The procedure was:</p> <ol> <li>Remove the content database via the central administration site</li> <li>Detach the content database using SQL Management Studio</li> <li>Move the files to the D-drive</li> <li>Attached the content database&nbsp;to the database again using SQL Management Studio</li> <li>Add the content database using the central administration site</li></ol> <p>Simple - but then again, there was huge problems with one of the content databases.</p> <p>Every time I tried to reconnect it to SharePoint via the central administration site I got this error:</p> <p>"A SharePoint database named WSS_Content_e566fe03fb8d4a4988905e23aad8d817 already<br>&nbsp;exists.&nbsp; You must supply another name for the new database."</p> <p>(Name of the content db to reconnect: 'WSS_Content_e566fe03fb8d4a4988905e23aad8d817')</p> <p>I tried all kinds of tricks on the SQL server, including renaming the database - in the list of content databases the database came back but with zero sites in it, so non-usefull solution.</p> <p>It seemed like SharePoint&nbsp;kept a reference to this content database in&nbsp;some records since, iisreset, server reboot etc. did not help - it continued to ignore this database.</p> <p>The solution was *tada*:</p> <ol> <li>Open the&nbsp;config database (SharePoint_Config)</li> <li>Open the "dbo.Objects" table</li> <li>Execute this SQL statement:<br>Delete From Objects Where Name='WSS_Content_e566fe03fb8d4a4988905e23aad8d817'</li> <li>Run "iisreset"</li></ol> <p>Then retry to reconnect the existing content database again.</p> <p>It worked in my case, so no guarantees on this one.</p>]]>
							</description>
							<category>Howto</category>
							<pubDate>Mon, 06 Aug 2007 16:58:13 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18022</comments>
							<slash:comments>3</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=18022</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=18022</trackback:ping>
					   </item><item>
							<title><![CDATA[SharePoint Theme Song (?)]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18019</link> 
							<description>
								<![CDATA[<p>For those of us who have done SharePoint since 2001 or just within&nbsp;latest years&nbsp;- I think this song really hits the spot. Start up your development environment, use the API - use the new eventhandlers, workflows and discover all the aspects in the platform ;-)</p> <p>Take that - Patience..</p> 
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/JFhkhRZhDas"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/JFhkhRZhDas" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object
<blockquote> <p>Patience</p> <p>Just have a little, patience </p> <p>I'm still hurting from a love I lost, <br>I'm feeling your frustration, <br>But any minute all the pain will stop, <br>Just hold me close inside your arms tonight, <br>Don't be too hard on my emotions<br><br>(Chorus)<br>Cause I, need time, <br>My heart is numb, has no feeling, <br>So while I'm still healing, <br>Just try and have a little patience, <br><br>I really wanna start over again, <br>I know you wanna be my salvation, <br>The one that I can always depend, <br><br>I'll try to be strong, believe me, <br>I'm trying to move on, <br>It's complicated but understand me, <br><br>Cause I, need time, <br>My heart is numb has no feeling, <br>So while I'm still healing, <br>Just try and have a little patience yeah, <br><br>Have a little patience, Yeah <br><br>Cause this scar runs so deep, <br>It's been hard, <br>But I have to believe, <br><br>Have a little patience, <br>Have a little patience, <br><br>wooh <br><br>Cause I, I just need time, <br>My heart is numb has no feeling, <br>So while I'm still healing, <br>Just try, and have a little patience, <br><br>Have a little patience, <br>My heart is numb has no feeling, <br>So while I'm still healing <br>Just try and have a little... Patience</p></blockquote>]]>
							</description>
							<category>General</category>
							<pubDate>Tue, 31 Jul 2007 10:08:21 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18019</comments>
							<slash:comments>4</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=18019</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=18019</trackback:ping>
					   </item><item>
							<title><![CDATA[Creating distribution groups with SharePoint]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18015</link> 
							<description>
								<![CDATA[<p></p> <p>You can enable SharePoint to create distribution groups in your domain. <p>SharePoint also provides the SharePointEmailWS-webservice (sharepointemailws.asmx) which you can use to create contacts and distributiongroups. <p>I've only managed to get this webservice to work in context of the central administration site (hence reference it to the http://portal:port/_vti_bin/sharepointemailws.asmx), in case you'll try to use the webservice to create these object types&nbsp;in AD. <p>Findings: <p>1. The RequestInfo object which is a parameter for the CreateDistributionGroup method should have the "RequestorEmail" set to string.empty. The RequestID should be a GUID. <p>2. The ContactCN parameter for the CreateDistributionGroup should also be string.empty <p>If you don't comply with these findings the DG will be created in the list of distribution groups to approve within the central admin site - but you cannot approve them. Trying so just result in an error. <p>Also remember to configure the distribution group OU in the central admin site (and&nbsp;grant the app pool user the&nbsp;rights to create and manage objects in the OU)&nbsp;in order to enable the creation of entities in AD&nbsp;and use of the webservice.</p>]]>
							</description>
							<category>Tip</category>
							<pubDate>Tue, 10 Jul 2007 16:39:30 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18015</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=18015</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=18015</trackback:ping>
					   </item><item>
							<title><![CDATA[Copy.asmx - not what you would expect]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18012</link> 
							<description>
								<![CDATA[<p>Well - depends on your prerequisites ofcourse. I was so naive that I thought I could use this to copy an item from one farm to another. First I thought there was a restriction in the webservice and method so it was designed to work for farms within the same domain, since there is no way to specify remote credentials. But specifying an URL not being part of the farm just throws errors for the "CopyIntoItems" method. So you can use the copy.asmx webservice when you work within the same farm. (I thought that this method was the equivalent of the "send to other location" method in the UI - if that's the case, they do something else in the UI..)</p>]]>
							</description>
							<category>Tip</category>
							<pubDate>Mon, 09 Jul 2007 22:52:51 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=18012</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=18012</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=18012</trackback:ping>
					   </item><item>
							<title><![CDATA[Hotfix for SharePoint available]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17994</link> 
							<description>
								<![CDATA[<p>Recently we had some problems with templates saved as STP files. We do a lot of these and when you setup pages with connected webparts and specific views - the pages based upon the STP templates crash.</p> <p>Example:</p> <p><a href="http://www.ekegren.dk/blog/pictures/blog/5a2d001c-68ba-4fd6-b1ee-562fbc947859.png" atomicselection="true"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="208" src="http://www.ekegren.dk/blog/pictures/blog/36d51e76-ca4a-4c72-9327-cd57725c724c.png" width="240" border="0"></a> </p> <p>The error is also described in this KB article: </p> <p><b>Changes that you make to the "List View" Web Part are not retained after you save the site as a template in Windows SharePoint Services 3.0</b></p> <p><a href="http://support.microsoft.com/kb/926284">http://support.microsoft.com/kb/926284</a> <p>There is a hotfix for SharePoint available here to solve this and other important&nbsp;issues:</p> <p><strong>934790&nbsp; Description of the Windows SharePoint Services 3.0 hotfix package: April 12, 2007</strong></p> <p><a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;934790">http://support.microsoft.com/default.aspx?scid=kb;EN-US;934790</a>]]>
							</description>
							<category>SharePoint</category>
							<pubDate>Tue, 01 May 2007 23:13:38 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17994</comments>
							<slash:comments>1</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17994</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17994</trackback:ping>
					   </item><item>
							<title><![CDATA[Some thoughts...]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17988</link> 
							<description>
								<![CDATA[<P>Well I've been a bit idle for the last couple of months. Been busy doing proposals for solutions based upon&nbsp;MOSS2007 and managing the migration of our standard components to the new platform. I see that the remaining blog community is exploding in new posts about the features of SharePoint and how to do various things. Great articles!</P>
<P>My hitlist of the new possibilities with MOSS definitely contains the concept of features and also the workflow capabilities in the top five. I can especially recommend the article about <A href="http://www.sharepointblogs.com/tbaginski/archive/2007/03/08/HOW-TO_3A00_-Create-a-custom-Windows-Workflow-Activity-and-make-it-available-in-SharePoint-Designer.aspx">HOW TO- Create a custom Windows Workflow Activity and make it available in SharePoint Designer</A>&nbsp;by Todd Baginski, a very good introduction to activities.</P>
<P>&nbsp;</P>
<P>Doing work on the new platform have required us to do some work using different development strategies dependent on the type of project at hand.</P>
<P>Lately one of our teams did the new corporate group site for Carlsberg on MOSS2007 at <A href="http://www.carlsberggroup.com">www.carlsberggroup.com</A>. They used SharePoint Designer (SPD) a lot in order to build up pages and studio for the component development, but the main part of the project was done via SPD.</P>
<P>The team currently migrating our standard products for the SharePoint platform work entirely with Visual Studio 2005 and on template level with site and list definitions in CAML.</P>
<P>So depending what you're doing with the platform, you would have to use different set of tools and techniques in order to achieve it in an efficient way.</P>
<OL>
<LI>If you build "standard" components/features and work on SharePoint object level you would primarily use Visual Studio 2005. 
<UL>
<LI>Use VS2005 for all components and compiled code 
<LI>Use VS2005 with the Windows SharePoint Services 3.0 Tools: Visual Studio Extensions <A href="http://www.microsoft.com/downloads/details.aspx?fa">http://www.microsoft.com/downloads/details.aspx?fa...</A>&nbsp;in order to build site definitions 
<LI>Seperate your tiers so components and features only have dependencies in the SharePoint scope in which they are intended to be used (do not include references to the Office server components if they are not needed - only reference the Windows SharePoint Services libraries) - this enables you to deploy the feature on a WSS2007 installation as well 
<LI>Site and list definitions can be made language specific by referencing .NET resource files (.resx) in the display names of the columns, so good news - you only have to do your file based templates once 
<LI>Do your own build and deployment scripts - the deployment method with the Extensions do not work stable in a MOSS setup - on pure WSS it works ok, but normally you need some additional things in there so do them anyway</LI></UL>
<LI>If you build&nbsp;"CMS like" websites - you would do the layout and template development in SPD 
<UL>
<LI>Traditional development like doing page types in test-environment&nbsp;and then deploy it to production-environment is compromised in this setup - actually some work could be done directly in the production environment like setting up&nbsp;pages&nbsp;and doing layouts 
<LI>Pages are to be interpreted as <EM>content</EM> and hence they are pages and elements in the SharePoint lists and libraries. Transfering content from production back to test will occur and done via SharePoint maintaince tools 
<LI>Components (see #1) used by SPD and as elements in the pages should travel the road of dev-&gt;test-&gt;production</LI></UL>
<LI>Connect the dots by building components/webparts and activities in VS2005 - and set it up with SPD 
<UL>
<LI>Notice: Setting up workflows with SPD is content - exactly like pages and traditional content, therefore complex workflows is actually build in production environment (or in test and then deployed as content migration to production)</LI></UL></LI></OL>
<P>&nbsp;</P>
<P>If anyone has any comments about migration and development strategies on the SharePoint platform, don't hesitate to comment!</P>]]>
							</description>
							<category>Development</category>
							<pubDate>Sun, 15 Apr 2007 00:45:29 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17988</comments>
							<slash:comments>1</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17988</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17988</trackback:ping>
					   </item><item>
							<title><![CDATA[I'm now officially a Microsoft Certified Technology Specialist in SharePoint&reg; Portal Server 2003]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17973</link> 
							<description>
								<![CDATA[<p>Yesterday I completed the MCP exam "74-132 Designing Portal Solutions with Microsoft SharePoint Products". Funny part was that there was *many* questions about Commerce Server, Biztalk&nbsp;and Content Management Server - so they could find a better name for the exam, as it might be a bit misleading...<font size="2"></p></font>]]>
							</description>
							<category>General</category>
							<pubDate>Thu, 15 Feb 2007 16:28:47 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17973</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17973</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17973</trackback:ping>
					   </item><item>
							<title><![CDATA[Enable debug and trace outputs to file for web applications]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17972</link> 
							<description>
								<![CDATA[<p>This is a short reminder - searched a <a href="http://msdn2.microsoft.com/en-us/library/b0ectfxd(vs.80).aspx" target="_blank">bit</a> for this one:</p> <p>&lt;system.diagnostics&gt;&nbsp;&nbsp;&nbsp; <br>&nbsp; &lt;trace autoflush="true"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;listeners&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="WebPageTraceListener" <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type="System.Web.WebPageTraceListener, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="TestTracer" <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type="System.Diagnostics.TextWriterTraceListener, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initializeData="&lt;app root directory&gt;\Asptesttrace.log" /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/listeners&gt;<br>&nbsp; &lt;/trace&gt;<br>&lt;/system.diagnostics&gt;</p>]]>
							</description>
							<category>Code snippet</category>
							<pubDate>Thu, 15 Feb 2007 16:23:26 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17972</comments>
							<slash:comments>2</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17972</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17972</trackback:ping>
					   </item><item>
							<title><![CDATA[Be carefull]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17967</link> 
							<description>
								<![CDATA[<p>Building WSS and MOSS2007 solutions really requires you to consider and understand all aspects of the platform.</p> <p>First of all you have to consider which features and functions&nbsp;you're going to utilise in your application. Things like the Business Data Catalogue requires your users&nbsp;to have a&nbsp;enterprise CAL license for the MOSS platform instead of the core CAL - there is *some* price difference between the two, so please consider carefully what you're going to benefit from the BDC, Excel services etc.</p> <p>When building pure WSS solutions it is important to notice a bunch of things. If you build site definitions and your site definition contains a list template which have event receivers associated with it - it will not work!</p> <p>Quote from the WSS SDK reference:</p> <blockquote> <p>"Lists</p> <p>Event receivers do not bind to a list when the list is provisioned through <a href="/html/b99d6657-d9ae-4135-a43c-c58cdfcdc6c1.htm">Onet.xml</a> and the list type has an associated Feature that binds a receiver to the list. You create a Feature that binds a receiver to a list type, create a list of that type through the site definition, but the receiver is not bound to the list when a site is provisioned. A workaround is to bind the receiver to a content type instead, and then bind the content type to the list."</p></blockquote> <p>Pretty important to notice! But the problems don't stop there. There is a glitch in the matrix - or at least in the documentation. I can't seem to find where it states that you can register a receiver for a content type? In the xml-definition files, it is only possible to associate receivers to lists...</p> <p>Anyone know the answer to this one?</p>]]>
							</description>
							<category>SharePoint</category>
							<pubDate>Sat, 10 Feb 2007 21:39:52 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17967</comments>
							<slash:comments>1</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17967</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17967</trackback:ping>
					   </item><item>
							<title><![CDATA[What do you do, if your global catalog disappers from your domain and you need to get your SharePoin]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17950</link> 
							<description>
								<![CDATA[<p></p> <p><b>Situation:</b>  <p>The&nbsp;domain (development.domain.com) has lost it’s global catalog and therefore all services and servers depending on the domain are not working. Service accounts cannot be verified and our SharePoint Portal Server 2003 installations are not working. All portals return the error message “Service unavailable”. Central administration is down - nothing within SharePoint works.  <p><b>Required and acceptable solution:</b>  <p>Existing SharePoint portals should still work with all data present. Existing permissions for sites are not mission critical to keep (the situation happend in development domain as you might imagine). We just need a quick fix and workaround&nbsp;because time is of the essense.&nbsp;  <p><b>Attempts to solve problem and current state:</b>  <p>Enroll/switch SharePoint portal server installation into new domain (development2.domain.com)</p> <ol> <ol> <li>Changed server membership to new domain (enrolled it into development2.domain.com)  <li>Replaced old domain account for SharePoint related services (development\sps_service) with new (development2\sps_service) for following services and locations  <ul> <li>i. Services  <ul> <li>1. Microsoft SharePointPS Search  <li>2. SharePoint Portal Administration  <li>3. SharePoint Portal Alert  <li>4. SharePoint Timer Service</li></ul> <li>ii. Group accounts (added ncstest\sps_service) to following local machine accounts  <ul> <li>1. SPS_Query  <li>2. SPS_WPG  <li>3. STS_WPG  <li>4. IIS_WPG  <li>5. OWS_2352768223_admin</li></ul> <li>iii. SQL databases and users (added ncstest\sps_service) to user collection for database with dbo role  <ul> <li>1. SPS_Config (SharePoint configuration database)  <li>2. SPS_PROF (SharePoint Profile database)  <li>3. SPS_SERV (SharePoint services database)  <li>4. SPS_SITE (SharePoint content database) <li>5. Grant "ncstest\sps_service" as "security administrator" and "database creator" roles</li></ul> <li>iv. Application pools (switched identity to ncstest\administrator for following app pools)  <ul> <li>1. CentralAdminAppPool  <li>2. MSSharePointAppPool  <li>3. MSSharePointPortalAppPoo</li></ul> <li>v. Did “iisreset”</li></ul> <li>SharePoint central administration now works:<br><a href="http://www.ekegren.dk/blog/pictures/blog/e21ca43a-d439-490f-9d86-ac74faa1e093.png" target="_new" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="347" src="http://www.ekegren.dk/blog/pictures/blog/c1405969-0496-44a4-a89e-d769595028ac.png" width="423" border="0"></a>&nbsp;<br> <li>To reapply account settings via supported interface the “Configure server farm account settings” was opened and account information reapplied. But every attempt fails due to:<br>&nbsp;(Error occurred while updating job accounts in the task scheduler. Ensure that the task scheduler service is running. See the w3wp log for details.)<br><a href="http://www.ekegren.dk/blog/pictures/blog/2869640c-33df-4dea-a007-4235327240bb.png" target="_new" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="351" src="http://www.ekegren.dk/blog/pictures/blog/1e1074fe-4454-46ac-9f50-77696c7795f0.png" width="428" border="0"></a>  <li>SharePoint portal site do not work and only displays "No mapping between account names and security IDs was done" (The same message appears within the diagnostics log)  <li>SharePoint services sites seems to work:<br><a href="http://www.ekegren.dk/blog/pictures/blog/ff6df993-5ee0-47b8-b65b-4705d7126c3e.png" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="196" src="http://www.ekegren.dk/blog/pictures/blog/736bcfa3-1eee-453b-9d2a-29c2f2589be4.png" width="240" border="0"></a>  <li>We then applied the SharePoint administrative group account (which was blank before):<br><a href="http://www.ekegren.dk/blog/pictures/blog/29f3df39-1c84-404c-84d1-26a9cc585260.png" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="196" src="http://www.ekegren.dk/blog/pictures/blog/936a5a59-1321-45a5-a554-3b036d2f5dfd.png" width="240" border="0"></a>  <li>And now the portal works:<br><a href="http://www.ekegren.dk/blog/pictures/blog/015d4b59-1554-4633-a233-dd5fc0c744c1.png" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="196" src="http://www.ekegren.dk/blog/pictures/blog/d9aa847f-dee6-4928-b36b-5f6b28b193f2.png" width="240" border="0"></a>  <li>In order to resolve point #4 you need to <strong>delete</strong> all SharePoint related&nbsp;scheduled tasks.  <li>Then reapply the server farm account settings  <li>Installation now works</li></ol></ol>]]>
							</description>
							<category>Tip</category>
							<pubDate>Tue, 12 Dec 2006 13:49:43 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17950</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17950</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17950</trackback:ping>
					   </item><item>
							<title><![CDATA[Speaking at Office Inspirationseminar in Bella Center]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17907</link> 
							<description>
								<![CDATA[<p>Tommorow (31-10-2006)&nbsp;I will be speaking at the Office inspirationseminar in Bella Center, Copenhagen, Denmark. </p> <p>I will present some key selling&nbsp;points about using SharePoint to facilitate knowledge sharing and structured way of working.</p> <p>Come and talk with me at the Netcompany booth where you'll find a demo of our SharePoint add-on system which accelerates SharePoint use and organization.</p>]]>
							</description>
							<category>General</category>
							<pubDate>Mon, 30 Oct 2006 19:31:53 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17907</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17907</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17907</trackback:ping>
					   </item><item>
							<title><![CDATA[Buttons with images in Office plug-ins]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17898</link> 
							<description>
								<![CDATA[<p>Lately I've been looking at doing some dedicated&nbsp;plug-ins&nbsp;for the Office programmes to enhance productivity and reuse content from SharePoint. It can be compared with the new slide library feature of MOSS2007 - but only supported&nbsp;WSS2003 and Office 2003.</p> <p>Using the standard webservices of WSS2003 you can really leverage content in WSS as template and resource&nbsp;repositories for your Office suite.</p> <p>Travelling this road gave me some problems within very simple things like applying a image for buttons within PowerPoint, where a lot of <a href="http://support.microsoft.com/kb/555417" target="_blank">different</a> <a href="http://www.shahine.com/omar/PermaLink,guid,6e66d8b4-4f94-4b78-bed8-9efdbf5a89b7.aspx" target="_blank">approaches</a> exists.</p> <p>VS2005 projects contains resources which is an exellent place to put your images:</p> <p><a href="http://www.ekegren.dk/blog/pictures/blog/0793bea2-70a5-4c24-af4a-bd5450b7335d.gif" atomicselection="true"><img height="480" src="http://www.ekegren.dk/blog/pictures/blog/d7699db0-2ce2-459c-9aa6-17234592c074.gif" width="474"></a> </p> <p>Now to use these files you need to convert them into a IPictureDisp object by using a small converter class:</p><font color="#0000ff" size="2"> <blockquote> <p>public</font><font size="2"> </font><font color="#0000ff" size="2">class</font><font size="2"> </font><font color="#008080" size="2">ConvertImage</font><font size="2"> : System.Windows.Forms.</font><font color="#008080" size="2">AxHost</p></font><font size="2"> <p>{</p> <p></font><font color="#0000ff" size="2">public</font><font size="2"> ConvertImage() : </font><font color="#0000ff" size="2">base</font><font size="2">(</font><font color="#0000ff" size="2">null</font><font size="2">){}</p> <p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#0000ff" size="2">static</font><font size="2"> stdole.</font><font color="#008080" size="2">IPictureDisp</font><font size="2"> Convert(System.Drawing.</font><font color="#008080" size="2">Image</font><font size="2"> image){</font></p> <p><font color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return</font><font size="2"> (stdole.</font><font color="#008080" size="2">IPictureDisp</font><font size="2">)System.Windows.Forms.</font><font color="#008080" size="2">AxHost</font><font size="2">.GetIPictureDispFromPicture(image);</font></p> <p><font size="2">}</p> <p>}</p></blockquote> <p>Now to use this for CommandBarButtons within the application simply use a reference to the embedded resource and the convert image class:</p><font size="2"> <blockquote> <p>Button.Picture = </font><font color="#008080" size="2">ConvertImage</font><font size="2">.Convert(Properties.</font><font color="#008080" size="2">Resources</font><font size="2">.SingleSlide);<br></font><font size="2">Button.Style = </font><font color="#008080" size="2">MsoButtonStyle</font><font size="2">.msoButtonIconAndCaption;</p></blockquote></font></font>]]>
							</description>
							<category>Development</category>
							<pubDate>Tue, 24 Oct 2006 12:09:06 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17898</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17898</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17898</trackback:ping>
					   </item><item>
							<title><![CDATA[Business data catalogue - nice walkthrough!]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17878</link> 
							<description>
								<![CDATA[<p>Ted Pattison have a very nice walkthrough of how to&nbsp;use the BDC in MOSS2007 to connect to backend databases.</p> <p><a href="http://channel9.msdn.com/Showpost.aspx?postid=221016">http://channel9.msdn.com/Showpost.aspx?postid=221016</a></p> <p>I'm only left with one big question:</p> <p>In the example he uses SSPI trust connection to the backend data - this means that it is the credentials of the user which is used towards the backend store - or is it a fixed account (SharePoint app pool or similiar), which would mean that&nbsp;the connection done via the BDC is an impersonated query towards the backend?&nbsp;</p> <p>What if it&nbsp;was webservices instead? </p> <p>What does this mean to AD and delegation issues - does any one have any insight into this they would like to share?</p> <p>I'll post answers if and when I'll find them ;-)</p>]]>
							</description>
							<category>Tip</category>
							<pubDate>Wed, 27 Sep 2006 10:29:17 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17878</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17878</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17878</trackback:ping>
					   </item><item>
							<title><![CDATA[Up and running with the MetablogAPI]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17859</link> 
							<description>
								<![CDATA[<p>Thanks to <a href="http://www.wictorwilen.se/" target="_blank">Wictor</a> I finally succeeded in my own implementation of the MetablogAPI for my blog. Now I can put categories for my posts (but my blog app only supports one category per post) as I got the getCategories method working with the Windows Live Writer. As Wictor <a href="http://www.wictorwilen.se/Post/116.aspx" target="_blank">also points</a> out as I discovered in my <a href="http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17836" target="_blank">post</a> the Windows Live Writer software do not implement the right XML-RPC according to the original specification. Wictor have a solution for the getCategories method which lead me in the "right" direction.</p> <p>Now, in order to set the right category with the post&nbsp;in the newPost method, Window Live Writer&nbsp;posts the description/title of the category, not category id which is actually returned in the getCategories method.</p>]]>
							</description>
							<category>Development</category>
							<pubDate>Wed, 06 Sep 2006 00:21:38 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17859</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17859</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17859</trackback:ping>
					   </item><item>
							<title><![CDATA[VSTO, actionpanes and why do Word not expose the default save location?]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17854</link> 
							<description>
								<![CDATA[<P>I have digged into the universe of VSTO and began this friday to build a document template which should be able to mailmerge with the contact list from a teamsite. I found Todd Barginski's <A href="http://www.sharepointblogs.com/tbaginski/archive/2006/06/07/8177.aspx" target=_blank>post about deployment</A> of such template&nbsp;very helpfull and also used a <A href="http://support.microsoft.com/kb/301659/">KB article</A> to help me on the way.</P>
<P>This is a somewhat&nbsp; simple use case scenario which would benefit our users a whole bunch. </P>
<P>Now this is actually possible today - you just have to bind the contact list with your Outlook via the "connect to outlook" button within the contacts list. However it is a heavy burden for many users and would also&nbsp;mean&nbsp;that you over time might have several hundred connections within Outlook, which is not what the user wants.</P>
<P>I fired up VS.2005 and began my quest. I started to build a "Word Document" solution and included the actionpane without any problems. I connected to the SharePoint lists-webservice (.../_vti_bin/lists.asmx) and populated listitems from the contacts list&nbsp;to a checklistbox, no problem. </P>
<P>When the user enters the range of a bookmark - the solution should display the actionpane, so it is just to add a bookmark, double click it, and add the "this.ActionPane.Visible=true" statement.</P>
<P>Cursor outside bookmark range:<BR><A href="http://www.ekegren.dk/blog/pictures/blog/b64445a7-30ab-4d2b-9749-6248da3c0926.png" atomicselection="true"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=234 src="http://www.ekegren.dk/blog/pictures/blog/d62c1d84-1d7a-4957-929d-93a1e41a9c9a.png" width=240 border=0></A></P>
<P>Cursor inside bookmark range (the actionpane loads and are set to visible):<BR><A href="http://www.ekegren.dk/blog/pictures/blog/61a592a7-7814-47e9-ae0c-bb15eea1a13b.png" atomicselection="true"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=234 src="http://www.ekegren.dk/blog/pictures/blog/2a4b9369-0498-41b2-a1e4-9029ddb6570f.png" width=240 border=0></A>&nbsp; </P>
<P>I set all controls in the action pane to disabled, as I don't know which webservice to connect to yet (see also bitching remark at the end in this post). The user has to save the document and then open it again (not that good 'eh?).</P>
<P>When the document&nbsp;is loaded from a SharePoint location the checklistbox&nbsp;is populated with elements from the contacts list (via webservices):</P>
<P><A href="http://www.ekegren.dk/blog/pictures/blog/a727dffc-bc55-4430-916b-47a344ff7724.png" atomicselection="true"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=240 src="http://www.ekegren.dk/blog/pictures/blog/148d0464-5cfd-4cee-928a-73939c4b582d.png" width=234 border=0></A> </P>
<P>Next step was to build the merge function and the KB article mentioned earlier was to much help - but it had some serious flaws which needs to correction. <BR>Take close attention to the FillRow method. In my case&nbsp;I couldn't generate a correct datatable to use for merging with the example out-of-the-box; data was all messed up at wrong locations in the table. Futhermore the value assigned for the&nbsp;oHeader object needs to be seperated with a semicolon, not comma (it might be dependent to your locale?).</P>
<P>All this went without the big problems - the real issue came when I was to use this within a SharePoint site. The deployment procedure as Todd mentions, did not work for me. The actionpane never got fired up. My solution also differed as I had selected a "Word Document" solution and not a "Word Template" which Todd did.</P>
<P>To make a long story short - I rebuild the solution using the "Word Template" project template, deployed it&nbsp;and it worked! So the deployment strategy following Todds example&nbsp;only works for "Word template" solutions, if anyone can prove me wrong here - please do so! I might give it a second shot upon request...</P>
<P>Now some bitching, which might disappear if I ever find a solution for it:</P>
<P>When I put this document template solution into SharePoint, as a template for a document library, it would be great to retrieve the default save location within the app. But sofar I haven't been able to - the document object contains a "Path" property, but it is only available after the document has been saved. Word have to know this, as it defaults to this location when clicking save, I need this location to bind to the right webservices upon load of the template, so it would be a big help if this property/state was exposed in some way. If anyone outthere can help me with this, please don't hesitate to post a comment!</P>]]>
							</description>
							<category>Development</category>
							<pubDate>Sun, 03 Sep 2006 17:18:08 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17854</comments>
							<slash:comments>3</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17854</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17854</trackback:ping>
					   </item><item>
							<title><![CDATA[Cool stuff!]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17836</link> 
							<description>
								<![CDATA[<P>Via <A href="http://blogs.tamtam.nl/mart/WindowsLiveWriter.aspx" target=_blank>Mart</A> I read about the Windows Live Writer&nbsp;Beta version. I downloaded it and soon discovered a somewhat new universe to me: the different blog API's&nbsp;to&nbsp;use for various editors. Now - some might use these specific programmes to post to their blogs, but I actually use my very own editor which I've implemented into my custom build blog-webapplication.&nbsp;</P>
<P>Managing images (screendumps)&nbsp;requires me to crop/covert them into GIFs or&nbsp;JPEG&nbsp;and upload them via my editor and then try to position them within my web based editor.</P>
<P>I started to play with the Window Live Writer and was thinking - hey, I want to build something that allows me to post to my own blog using this editor. Windows Live Writer supports the <A href="http://www.xmlrpc.com/metaWeblogApi" target=_blank>MetablogAPI</A> - which I then&nbsp;decided to implement in my app.</P>
<P>Now the cool stuff begun. Trying the editor and analyzing how it publishes stuff really got me exited. Writing a post - with inline images, the editor publish these images via the <EM>newMediaObject</EM> method of the MetablogAPI. It does this by submitting base64 data in XML packages. In my end - I grap this and stores this as an image on disk and returns the URL to the images. Then the editor adjust the references within the post with the URLs and&nbsp;submits it,&nbsp;using the <EM>newPost</EM>&nbsp;method.</P>
<P>I implemented&nbsp;these methods&nbsp;in&nbsp;a HttpHandler in order to enable my blog application to support the Windows Live Writer. The HttpHandler is actually not that&nbsp;well documented (.ashx files), but I succeeded in having it up and running.</P>
<P>The HttpHandler accepts a request - it actually process a HttpContext object and the Windows Live Writer post XML method calls to this.</P>
<P>I implemented the following methods of the MetablogAPI:</P>
<UL>
<LI>metaWeblog.getCategories 
<LI>blogger.deletePost 
<LI>metaWeblog.editPost 
<LI>metaWeblog.newPost 
<LI>metaWeblog.newMediaObject 
<LI>blogger.getUsersBlogs</LI></UL>
<P>But I can't get the Windows Live Writer to accept the getCategories method - it states that it is a invalid response:</P>
<P><A href="http://www.ekegren.dk/blog/pictures/blog/59c66c9a-706c-46e8-a926-764a4e7a6ed3.png" atomicselection="true"><IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=161 src="http://www.ekegren.dk/blog/pictures/blog/031fddfa-b126-423c-a471-ba8e4cc22b1d.png" width=240 border=0></A> </P>
<P>I believe to have implemented the right response XML package - actually the&nbsp;response is the same as the example on <A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msnspaces/MetaWeblogAPI_getCategories_Method.asp" target=_blank>MSDN</A>&nbsp;but there is a difference between this and the original RFC description.&nbsp;If anyone know how the XML response should look like, please post a comment! </P>
<P>So this post is actually done using the Windows Live Writer app and my very own implementation of the MetablogAPI using a HttpHandler&nbsp;- cool :-)</P>]]>
							</description>
							<category>Development</category>
							<pubDate>Sat, 26 Aug 2006 20:57:36 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17836</comments>
							<slash:comments>4</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17836</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17836</trackback:ping>
					   </item><item>
							<title><![CDATA[The flat world]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17819</link> 
							<description>
								<![CDATA[<P>As I promised earlier I would return with some blog posts about SharePoint and some about the book "The world is flat" by Thomas L. Friedman. This post is about the book and has no technical contents – so if you are only into my blog for the tech stuff then ignore this post.</P>
<P>Reading passages in "The world is flat" leaves you in a state of panic as a western world worker. The book is about the globalization and outsourcing industry from the US to India and China (amongst others). The book starts by listing the 10 "flatteners" spawning from the fall of the Berlin wall till the emergence of the steroids: Google etc. Basically Friedman lists a number of events which made the world smaller and made new supply chains emerge. A set of workflow tools (SharePoint perhaps?), high bandwidth and connectivity have emerged in the last 10 years which connected regions in the world and truly made it possible for companies to go virtual. Organisations span divisions which can work 24h round the clock starting in Asia and ending the day in the US. This is amazing from a CEO point of view and this is the angle as I mainly see Friedman dig into. </P>
<P>Western society is under attack – jobs move to low wage areas in Eastern Europe, India and Asia. The message in Friedman's book is that the below average or average western worker will be replaced by a set of well educated Indians or Chinese. It is not just the well established western countries – even a country like Mexico with many low wage jobs in manufacturing see their emerging and prospering society attacked and set back. Reading this, makes me just even more aware that the divergence in the western countries will be a lot bigger than it is today. Many low wage jobs are really in the danger of becoming extinct and the average jobs within the middle class will have to shape up in order to compete with foreign Ph.D.'s which will work for less or the same amount of money. This is a challenge which we all meet. </P>
<P>The spiral all this can lead to create a paradox: if unemployment rises in the western countries, the base in the economy disappears for the same western companies to sell their products &gt; so their products (in a new form) now have to be sold for a new middle class in the emerging markets. The western society becomes poorer – but the owners of the companies prosper even more. Of course it will not go like this – there are many parameters in the equation, but the overall message is: the world is going to change.</P>
<P>The book is very interesting and made me think about a lot of things happening right now. I'm directly involved in these changing supply chains, as I work with a supply chain starting in Copenhagen, Denmark – going to Warsaw, Poland and back to Denmark again. I define technical and functional specifications from Denmark which I ship to Warsaw for design and implementation. I'm very involved in this process – it requires a high degree of review and close supervision in order to ensure that the initial specification become what is intended to be. </P>
<P>Being in the middle of this – the scenarios as Friedman renders, are not that glamorous. There is major work in both ends of the supply chain to ensure that it performs and really is competitive. Question is – how big should you be as an organisation and how big should the project be before this really become feasible? We've made major knowledge investments into our Polish operation and are beginning to see the effect, but it is a slow process compared to what we are used to. It is not all about bits and bytes – working culture and attitude also have a high part of influence in what comes out in the other end, which also is what Friedman points at in the end of the book.</P>
<P>Innovation happens where knowledge, creativity and requirements exists. If you add more knowledge and requirements – you can hope to see creativity blossom.</P>
<P>Looking at the amount of components on the market for SharePoint I see some great products/add-ons coming from Ukraine and India. The kind of components is more focused to leverage specific areas within the SharePoint platform than e.g. more complete full blown packages where focus is to provide the customer an entire system, which is available from Netcompany (Denmark) and US companies. </P>
<P>In the spite of Friedman – suggestion would be that the component vendors should team up with the package vendors in order to build a new supply chain and provide more complex products. The component vendors are actually the ones which would profit the most of this – as they could still maintain their sale of components and would have systems putting up requirements helping their components evolve? But then – a system of connected components may have so many interfaces to make up a system that it can't be obtained by connecting individual unique components, and then the idea of this kind of supply chain fails. Do you have any knowledge about this happening on the SharePoint platform today?</P>
<P>I don't know where I was going with this post – I just had to get it out there for your comments...</P>]]>
							</description>
							<category>General</category>
							<pubDate>Sun, 20 Aug 2006 13:43:22 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17819</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17819</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17819</trackback:ping>
					   </item><item>
							<title><![CDATA[What a day...]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17381</link> 
							<description>
								<![CDATA[<P>What a day. Back from vacation/honeymoon and had a fine split between private and professional tasks.</P>
<P>For professional tasks a very nasty surprise revealed itself with the SharePoint API – another hydra popped out of the box, of course at a time where you just don’t need that kind of surprise. </P>
<P>Basically it was about the <STRONG>SPFile.MoveTo</STRONG> method which I was convinced only required "add" permission at the destination folder. Unfortunately this is not the case – you also need "edit" permission, which for our part makes that function completely useless for what we tried to achieve. The move operation seems to do an insert and update operation at the destination folder and a delete operation at the source folder. This sequence means that the user needs the "add" and "edit" item permissions for the destination library and delete permission in the source library. We tried to build a vault library and we wanted to respect standard permissions not using impersonation and then lock down the document libraries with the appropriate permission sets. I don't understand why MS did in this way – the update should not be necessary but our guess is that the update is for moving the version history, I would highly recommend MS to consider this carefully and make the move operation a more integrated method which wraps all actions in one… *grrr*</P>
<P>For my private tasks I spend some time trying to set up the FTP server in IIS. I wanted it to run in the "isolated user" mode which means each user will have a private folder to upload files into and is the directory to which he is redirected upon login. I found this guide (<A href="http://www.windowsnetworking.com/articles_tutorials/Creating-Configuring-FTP.html">http://www.windowsnetworking.com/articles_tutorials/Creating-Configuring-FTP.html</A>) – but it missed a very important detail which I finally found in a technet (<A href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/b63de8ef-e3c5-456d-a8ca-7af4198819d4.mspx?mfr=true">http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/b63de8ef-e3c5-456d-a8ca-7af4198819d4.mspx?mfr=true</A>) article. Mental note: remember that the library structure should be e.g. E:\FtpRoot\LocalUser\%UserName%.</P>
<P>Working on the big photo weeding album has brought me on a journey into image catalogue programs. I almost started to develop a small app which could list a set of images and generate thumbnails until I found Google’s <A href="http://picasa.google.com">Picasa</A>. I highly recommend this – it's brilliant, nice and simple way of ordering pictures in the right order (when merging several image sources) and then generates a website with thumbnails and pictures ready for upload. I'm now looking into programs/services which can provide me with a printed version of the pictures in a nice catalogue. Since I don't have an Apple with iPhoto which pretty much is what I want, so I'll have to manage with some alternatives. If the final result is good – I'll post a recommendation for others who also are looking into printed catalogues.</P>]]>
							</description>
							<category>General</category>
							<pubDate>Wed, 02 Aug 2006 00:01:08 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17381</comments>
							<slash:comments>1</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17381</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17381</trackback:ping>
					   </item><item>
							<title><![CDATA[MR. & MRS. EKEGREN]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17380</link> 
							<description>
								<![CDATA[<P>My blog have been idle for some time and I have a pretty good reason for why it has been left like this - I've got married in start of July! (Seems like this is something thats <A href="http://blogs.tamtam.nl/mart/PermaLink,guid,36c1c58d-e6ac-4503-92c7-69560deba6f8.aspx">been around</A> amongst SharePoint bloggers... Congratulations Mart!)</P>
<DIV class=imageleft id=image4><IMG src="http://www.ekegren.dk/blog/pictures/blog/d8f48dda-dd67-400a-b1f3-a8b53fdff418wedding2.JPG"><BR><EM>MR. &amp; MRS. EKEGREN</EM></DIV>
<P>Planning and preparing for the big day has been like delivering a big project&nbsp;within a tight deadline, over expactations, on budget&nbsp;and on time! We all know how hard this is :-)</P>
<P>I aim at being back in august for full steam with a few new posts. I have just returned from honeymoon vacation and spend some of the time with the head in books. I highly recommed my readers to pickup the "<A href="http://www.thomaslfriedman.com/worldisflat.htm">The world is flat</A>" book by Thomas L. Friedman - I'm finishing it these days and am dying to discuss it, so some posts in august will be about some of Thomas' observations and then a bit about some new SharePoint stuff.</P>]]>
							</description>
							<category>General</category>
							<pubDate>Tue, 25 Jul 2006 12:51:19 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17380</comments>
							<slash:comments>1</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17380</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17380</trackback:ping>
					   </item><item>
							<title><![CDATA[Customizing the layout of SharePoint sites with HttpModules]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17377</link> 
							<description>
								<![CDATA[<P>Hate search &amp; replace in all SharePoint aspx files? Well there is another approach which can be used which involves HttpModules and a special response stream object. If you do not have the need for postback events in your inserts and only have to do simple changes to the page layout and structure, then this is an easy task and is more manageable than doing search and replace for 1000+ files. Therefore this approach only solves some of the problems but could be implemented to wrap all SharePoint pages with a master layout, which luckily we’ll have build-in with SharePoint 2007.</P>
<P>This little example illustrates how one can implement a HttpModule and a response stream object to include an input box next to the "help" (called "hjælp" in Danish as the examples below contains)&nbsp;link within SharePoint – a location where we typically would place a control for doing specific phonebook related searches.</P>
<P>First we need to analyse the standard output of the SharePoint webpages. Do a "view source" of the page and find the right spot in the HTML for where to insert your control.&nbsp;</P>
<DIV class=imageleft id=image4><IMG src="http://www.ekegren.dk/blog/pictures/blog/c52b15ed-0e0d-42c3-b861-1a1f449d1af2helplinkandcode.gif"><BR><EM>Detecting sections in response output for later manipulation</EM></DIV>
<P>Next, start by implementing a small HttpModule and a response stream object which can manipulate the DOM. In this example I do simple string match and replace, advanced users can use regular expressions to match patterns within the DOM and replace it with HTML accordingly.</P>
<DIV class=CodeSection>
<P>public class HttpPhoneBookControlModule : IHttpModule<BR>&nbsp;{<BR>&nbsp;&nbsp;public HttpPhoneBookControlModule()<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;}</P>
<P>&nbsp;&nbsp;// ---------------------------------------------<BR>&nbsp;&nbsp;private void InstallResponseFilter(object sender, EventArgs e) <BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;HttpResponse response = HttpContext.Current.Response;</P>
<P>&nbsp;&nbsp;&nbsp;if(response.ContentType == "text/html")<BR>&nbsp;&nbsp;&nbsp;&nbsp;response.Filter = new PageFilter (response.Filter);<BR>&nbsp;&nbsp;}</P>
<P><BR>&nbsp;&nbsp;public void Init(HttpApplication httpApp)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;httpApp.ReleaseRequestState += new EventHandler(InstallResponseFilter);<BR>&nbsp;&nbsp;}</P>
<P>&nbsp;&nbsp;public void Dispose() {}<BR>&nbsp;}<BR></P></DIV>
<P><EM>Listing one: HttpModule for handling response</EM></P>
<P>Do a "page filter" which can manipulate the response. A complete listing of such can be found at this great article which explains the entire procedure in more details.</P>
<P>The important part in the article is to do a small change for the "dirty work region":</P>
<DIV class=CodeSection>#region Dirty work<BR>&nbsp;&nbsp;public override void Write(byte[] buffer, int offset, int count)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;string strBuffer = System.Text.UTF8Encoding.UTF8.GetString (buffer, offset, count);
<P>&nbsp;&nbsp;&nbsp;// ---------------------------------<BR>&nbsp;&nbsp;&nbsp;// Wait for the closing &lt;/html&gt; tag<BR>&nbsp;&nbsp;&nbsp;// ---------------------------------<BR>&nbsp;&nbsp;&nbsp;Regex eof = new Regex ("&lt;/html&gt;", RegexOptions.IgnoreCase);</P>
<P>&nbsp;&nbsp;&nbsp;if (!eof.IsMatch (strBuffer))<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;responseHtml.Append (strBuffer);<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;responseHtml.Append (strBuffer);<BR>&nbsp;&nbsp;&nbsp;&nbsp;string&nbsp; finalHtml = responseHtml.ToString ();</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;string standardTopBox = "&lt;a&nbsp; onclick=\"HelpWindow()\" href=\"#URL#\"&gt;Hjælp&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";<BR>&nbsp;&nbsp;&nbsp;&nbsp;string standardPhonebookBox = "&lt;a&nbsp; onclick=\"HelpWindow()\" href=\"#URL#\"&gt;Hjælp&lt;/a&gt;&lt;/td&gt;&lt;td nowrap=\"true\"&gt;" + SPSPhoneBookInputControlAsHtml.GetControlAsHtml() + "&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;finalHtml = finalHtml.Replace(standardTopBox,standardPhonebookBox);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;// Transform the response and write it back out</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;byte[] data = System.Text.UTF8Encoding.UTF8.GetBytes(finalHtml);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;responseStream.Write (data, 0, data.Length);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;#endregion<BR></P></DIV>
<P><EM>Listing two: The actual manipulation of the response</EM></P>
<P>The sections in bold is the lines which have been modified to achieve that a new html control have been inserted. All post events/functions initiated from this control relies on javascript which do the submission of data to a result page etc.</P>
<P>In order to have this working with SharePoint the HttpModule calling the page filter have to be installed for the SharePoint website. Go to web.config and plug-in the HttpModule:</P>
<DIV class=CodeSection>&lt;httpModules&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;clear /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="OutputCache" type="System.Web.Caching.OutputCacheModule" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="HttpIndexModule" type="MyNameSpace.Modules.HttpPhoneBookControlModule, MyNameSpace.Modules, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c45b3b012bedcf43"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--&nbsp;&lt;add name="Session" type="System.Web.SessionState.SessionStateModule"/&gt;--&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/httpModules&gt;</DIV>
<P>&nbsp;The result on a page in SharePoint portal:&nbsp;</P>
<DIV class=imageleft id=image3><IMG src="http://www.ekegren.dk/blog/pictures/blog/8da6a717-eebf-42b8-964f-4ecf15f2d393insertedinputbox.gif"><BR><EM>Inputbox added by using the HttpModule/page response procedure</EM></DIV>
<P>I have seen what tends to be a great implementation of this by <A href="http://weblogs.asp.net/soever/">Serge van den Oever [Macaw]</A>, I haven't used it myself but you can join his workspace at gotdotnet to learn more. I think this is a great possibility to style and manipulate the portal rather than doing the search and replace operations.</P>
<P>Sometimes you can't avoid the search and replace operations as you sometimes need to add ASP.NET controls to your page, so this solution is only for doing "text" based manipulation of the response. </P>
<P>Resources:<BR><A href="http://weblogs.asp.net/soever/archive/2006/01/12/435105.aspx">http://weblogs.asp.net/soever/archive/2006/01/12/435105.aspx</A><BR><A href="http://www.aspnetresources.com/articles/HttpFilters.aspx">http://www.aspnetresources.com/articles/HttpFilters.aspx</A></P>]]>
							</description>
							<category>Development</category>
							<pubDate>Fri, 19 May 2006 13:09:09 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17377</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17377</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17377</trackback:ping>
					   </item><item>
							<title><![CDATA[Tips for writing performance optimized code for SharePoint - part II]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17376</link> 
							<description>
								<![CDATA[To be more specific in details this listing is highly optimized for inserting listitems into a list in SharePoint. As previously <A href="http://www.ekegren.dk/blog/AddBlogComment.aspx?id=35">written</A> – do not use the OM by adding listitems to items collection as this actually is very very slow.
<p/>
<DIV class=CodeSection>void InsertListItem(SPWeb web, guid listID, NameValueCollection nvc) { <BR>//create the listitem using CAML and processbatchdata<BR>string strProcessBatchXml = @"&lt;?xml version=""1.0"" encoding=""UTF-8""?&gt;<BR>&nbsp;&lt;Batch OnError=""Return""&gt;&lt;Method ID=""1"" Cmd=""New""&gt;<BR>&nbsp;&lt;SetList Scope=""Request""&gt;{1}&lt;/SetList&gt;<BR>&nbsp;&lt;SetVar Name=""ID""&gt;New&lt;/SetVar&gt;<BR>&nbsp;&lt;SetVar Name=""Cmd""&gt;Save&lt;/SetVar&gt;<BR>&nbsp;&lt;Field Name=""Title""&gt;temp - {0}&lt;/Field&gt;<BR>&nbsp;&lt;/Method&gt;&lt;/Batch&gt;";<br/>
string cmd = String.Format(strProcessBatchXml, i, listID.ToString("B"));<BR>string returnPBValue = web.ProcessBatchData(cmd);<BR>XmlDocument response = new XmlDocument();<BR>response.LoadXml(returnPBValue);<BR>XmlNode idNode = response.SelectSingleNode("Results/Result/ID");<BR>int id = Int32.Parse(idNode.InnerText);<br/>
//update values on the item using the OM<BR>SPListItem item = web.Lists[listID].GetItemById(id);<BR>foreach(string key in nvc.keys) {<BR>item[key] = nvc[key];<BR>}<BR>item.Update();<BR></DIV>
<EM>Listing one: Using processbatchdata and OM</EM>
<p/>
Now to illustrate the effect of doing it just using the OM:
<DIV class=CodeSection>
SPList list = web.Lists[listID];<BR>SPListItem item = List.Items.Add();<BR>foreach(string key in nvc.keys) {<BR>item[key] = nvc[key];<BR>}<BR>item.Update();</DIV>
<p/>
<EM>Listing two: Using OM only</EM>
<p/>
Measurements for inserting 1000 list elements into a list:<br/>
<ul>
<li>Listing one: 20 seconds – stable, same 2 second interval pr. 100 items</li>
<li>Listing two: 5:39 minutes(!) – gets slower pr. 100 items</li>
</ul>
<P>That pretty much says it all...</P>]]>
							</description>
							<category>Development</category>
							<pubDate>Mon, 15 May 2006 14:40:28 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=17376</comments>
							<slash:comments>6</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=17376</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=17376</trackback:ping>
					   </item><item>
							<title><![CDATA[Impersonation and SharePoint]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=45</link> 
							<description>
								<![CDATA[<P>This is a topic of continuous debate and confusion amongst many developers. There have been written a lot about this and I have found many posts about this. What I have thought about reading all these posts are – are one actually doing the right thing? Impersonation is necessary in order to e.g. list the roles for which the current user is a part of; doing advanced SharePoint stuff you really need to fully understand how to navigate and use the SharePoint API. What I can't underline enough is: context is everything! (Looks like even Microsoft doesn't fully understand when this works or not by the famous post: <A href="http://support.microsoft.com/?kbid=892866">http://support.microsoft.com/?kbid=892866</A>, I hope this post can help someone to understand the scenario). Always take notice how you get hold of a SPWeb or SPSite object as the identity used in the construction of the objects carries the credentials and what is allowed.</P>
<P>I decided to do a structured investigation of this matter to be able to provide some conclusions into the problem sphere. Furthermore I have over some time had some suspicion that the various service packs for SharePoint actually change the rules for how to use impersonation with the API, therefore I decided to cover how the same piece of code response with clean SPS, SP1 and SP2. Furthermore impersonated use of webservices within webparts has also tricked me a bit so this post was also intended to try to solve this issue.</P>
<P>I developed a webpart NOT deployed in the GAC, but to the bin-directory in wwwroot. Used minimal trust settings for SharePoint, but enabled full trust to my webpart using a codegroup in a modified wss_minimaltrust.config file, for how to do this – look at the <A href="http://weblogs.asp.net/jan/archive/2005/06/23/414699.aspx">great article</A> by Jan Tielens. I developed the webpart on my local machine and set the output directory to the bin-directory on the SharePoint server (which was an all-in-one box installation containing AD, SQL and Exchange). So this is the prerequisites for my investigation (I had nothing else to use at the time of the investigation).</P>
<P>Context is everything. I usually impersonate using the application pool which I configure with domain user which I also grant the SharePoint administrator role. Therefore I switch to the application pool for doing impersonation. This strategy seems to work fine when just working with the OM. See comments #1-#7 in code block. This works for all service packs (tested up until SP2) and shoots down my theory that it behaves differently under the various service packs.</P>
<P>For webservice calls I wanted to use the impersonation branch to assign the credentials of this section of the code (DefaultCredentials) to the webservice credentials for doing impersonation. This however does not work, only way to "impersonate" the webservice is to apply a NetworkCredential object which contains the username, password and domain information:</P>
<DIV class=CodeSection>ws.Credentials = new System.Net.NetworkCredential(username,password,domain);</DIV>
<P>This collides with that I generally do not want to apply username etc. in configuration anywhere, so I decided to move into <A href="http://support.microsoft.com/?id=832769">enabling NTLM and Kerberos</A>, trusting the server and account for delegation as I thought this was a AD double hop issue. This did not work either – the System.Net.CredentialCache.DefaultCredentials in the impersonation branch, never had the desired effect (providing the credentials of the impersonated user). Instead I learned that if you DO enable this, you need to apply the right <EM>authtype</EM> string when constructing the CredentialCache to assign to the webservice credentials property:</P>
<DIV class=CodeSection>cc = new System.Net.CredentialCache();<BR>cc.Add(new Uri(ws.Url), <EM>authtype</EM>, (NetworkCredential)nc);<BR>ws.Credentials = cc;</DIV>
<P>The value of the <EM>authtype</EM> string depends on which NTAuthenticationProvider you enable for the website hosting SharePoint, for ALL other than the "Negotiate,NTLM" (Kerberos) the authtype should be blank, and you can just assign the NetworkCredential/DefaultCredentials - but for Kerberos you need to set authtype to "NTLM" (also look in code block comments in the end of this post).</P>
<P>Using COM+ to impersonate might be a way to go for impersonating webservices not using the NetworkCredential method, might be a topic which should be investigated :-) ... or even better - if anyone has the solution for how to impersonate the webservice calls in another way than illustrated here, please post a solution!</P>
<P>Resources:<BR><A href="http://weblogs.asp.net/jan/archive/2005/06/23/414699.aspx">http://weblogs.asp.net/jan/archive/2005/06/23/414699.aspx</A> (Common pitfalls for webpart developers)<BR><A href="http://blogs.microsoft.fr/rlondner/articles/7089.aspx">http://blogs.microsoft.fr/rlondner/articles/7089.aspx</A> (Doing impersonation using COM+)<BR><A href="http://blog.austinwheats.net/archive/2004/04/12/166.aspx">http://blog.austinwheats.net/archive/2004/04/12/166.aspx</A> (Frustrations about using methods which requires impersonation and how to check for it)<BR><A href="http://support.microsoft.com/?id=832769">http://support.microsoft.com/?id=832769</A> (How to enable Kerberos and NTLM)</P>
<P>Code block (webpart code):</P>
<DIV class=CodeSection>
<P>&nbsp;&nbsp;protected override void RenderWebPart(HtmlTextWriter output)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;string originalUser = this.Context.User.Identity.Name;<BR>&nbsp;&nbsp;&nbsp;string currentVersion = String.Empty;</P>
<P>&nbsp;&nbsp;&nbsp;<STRONG>// #1: thisWeb object have current user credentials</STRONG><BR>&nbsp;&nbsp;&nbsp;SPWeb thisWeb = SPControl.GetContextWeb(this.Context);<BR>&nbsp;&nbsp;&nbsp;SPWeb web;<BR>&nbsp;&nbsp;&nbsp;SiteData sd2;</P>
<P>&nbsp;&nbsp;&nbsp;ICredentials me = System.Net.CredentialCache.DefaultCredentials;<BR>&nbsp;&nbsp;&nbsp;output.Write("username:" + me.GetCredential(this.Context.Request.Url, "Negotiate").UserName);</P>
<P>&nbsp;&nbsp;&nbsp;#region impersonation branch<BR>&nbsp;&nbsp;&nbsp;<STRONG>// #2: relookup the web object as admin</STRONG><BR>&nbsp;&nbsp;&nbsp;using(RunAsAppPool admin = new RunAsAppPool(true))<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;<STRONG>// #3: this line have no effect as thisWeb is in context of current user<BR>&nbsp;&nbsp;&nbsp;&nbsp;// and current user do not have access to set this variable</STRONG><BR>&nbsp;&nbsp;&nbsp;&nbsp;thisWeb.Site.CatchAccessDeniedException = false;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<STRONG>// #4: web initialised as admin user..</STRONG><BR>&nbsp;&nbsp;&nbsp;&nbsp;web = new SPSite(thisWeb.Url).OpenWeb(thisWeb.ID);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;<STRONG>// #5: set CatchAccessDeniedException to false to avoid loginboxes to appear</STRONG><BR>&nbsp;&nbsp;&nbsp;&nbsp;web.Site.CatchAccessDeniedException = false;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;SPGlobalAdmin global = new SPGlobalAdmin();<BR>&nbsp;&nbsp;&nbsp;&nbsp;currentVersion = global.Version.ToString();</P>
<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;// #8: connecting to webservice inside impersonation branch have not the expected effect<BR>&nbsp;&nbsp;&nbsp;&nbsp;// assigning the app pool credentials to the credentials cache of the webservice<BR></STRONG>&nbsp;&nbsp;&nbsp;&nbsp;sd2 = new SiteData();<BR>&nbsp;&nbsp;&nbsp;&nbsp;sd2.Url = thisWeb.Url + "/_vti_bin/SiteData.asmx";</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;switch(currentVersion) <BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "6.0.2.5530" :<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output.Write(" (" + currentVersion + " Unservice packed)");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "6.0.2.6361" :<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output.Write(" (" + currentVersion + " WSS SP1)");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "6.0.2.6568" :<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output.Write(" (" + currentVersion + " WSS SP2)");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;System.Net.CredentialCache cc;<BR>&nbsp;&nbsp;&nbsp;&nbsp;ICredentials nc;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;if(UseDefaultCredentials) <BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// #9: eventhough we inside an impersonation loop - default credentials is the current <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// httpcontext and not the impersonated user<BR></STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nc = System.Net.CredentialCache.DefaultCredentials;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;else <BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// only works with a clean meta-base for IIS (NTLM and Kerberos not enabled)<BR></STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nc = new System.Net.NetworkCredential("administrator","netcompany","demo");<BR>&nbsp;&nbsp;&nbsp;&nbsp;}</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;if(UseNTML &amp;&amp; UseKerberos) <BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc = new System.Net.CredentialCache();<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// #10: I actually thought that this line worked - but it didn't, only NTLM as authtype<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// string works<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// cc.Add(new Uri(sd2.Url), "Negotiate", (NetworkCredential)nc);<BR></STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cc.Add(new Uri(sd2.Url), "NTLM", (NetworkCredential)nc);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sd2.Credentials = cc;<BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;else if (UseNTML &amp;&amp; !UseKerberos) <BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// #11: if Kerberos is not enabled and only NTLM is enabled there is no need to set<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// the authtype to anything - just use the clean Credential object<BR></STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sd2.Credentials = nc;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;else if (!UseNTML &amp;&amp; !UseKerberos)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sd2.Credentials = nc;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;#endregion</P>
<P>&nbsp;&nbsp;&nbsp;try <BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;// no impersonation<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;p/&gt;&lt;b&gt;No impersonation&lt;/b&gt;&lt;ul&gt;");<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;li&gt;User:" + originalUser);</P>
<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;// #6: this will cause login boxes to appear if not the web at #5 was done<BR>&nbsp;&nbsp;&nbsp;&nbsp;// instead UnauthorizedAccessException is thrown<BR></STRONG>&nbsp;&nbsp;&nbsp;&nbsp;string noImpRoles = Utility.GetRoles(originalUser, thisWeb);<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;li&gt;Roles: " + noImpRoles);<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;/ul&gt;");<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;catch(UnauthorizedAccessException e) <BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;/li&gt;&lt;li&gt;No impersonation failed: " + e.ToString() + "&lt;/ul&gt;");<BR>&nbsp;&nbsp;&nbsp;}</P>
<P>&nbsp;&nbsp;&nbsp;try {<BR>&nbsp;&nbsp;&nbsp;&nbsp;// impersonated web object<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;/ul&gt;&lt;b&gt;Impersonated fetch of SPWeb object&lt;/b&gt;&lt;ul&gt;");</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;li&gt;User:" + originalUser);<BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;// #7: using the impersonated web object - it is possible to enumerate roles for the user<BR></STRONG>&nbsp;&nbsp;&nbsp;&nbsp;string impRoles = Utility.GetRoles(originalUser, web);<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;li&gt;Roles: " + impRoles);<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;/ul&gt;");<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;catch(Exception e) <BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;/li&gt;&lt;li&gt;Impersonated SPWeb object failed: " + e.ToString() + "&lt;/ul&gt;");<BR>&nbsp;&nbsp;&nbsp;}</P>
<P>&nbsp;&nbsp;&nbsp;try <BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;// use of webservices<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;b&gt;Use of webservice&lt;/b&gt;&lt;ul&gt;");</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;SiteData sd = new SiteData();<BR>&nbsp;&nbsp;&nbsp;&nbsp;sd.Credentials = System.Net.CredentialCache.DefaultCredentials;<BR>&nbsp;&nbsp;&nbsp;&nbsp;sd.Url = thisWeb.Url + "/_vti_bin/SiteData.asmx";</P>
<P><BR>&nbsp;&nbsp;&nbsp;&nbsp;_sList[] lists;<BR>&nbsp;&nbsp;&nbsp;&nbsp;sd.GetListCollection(out lists);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;foreach(_sList list in lists)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;li&gt;" + list.Title);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;/ul&gt;");<BR>&nbsp;&nbsp;&nbsp;&nbsp;sd.Dispose();<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;catch(Exception e) <BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;/li&gt;&lt;li&gt;Use of webservice failed: " + e.ToString() + "&lt;/ul&gt;");<BR>&nbsp;&nbsp;&nbsp;}</P>
<P>&nbsp;&nbsp;&nbsp;try <BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;// use of webservices<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;b&gt;Use of impersonated webservice&lt;/b&gt;");</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;_sList[] lists2;<BR>&nbsp;&nbsp;&nbsp;&nbsp;sd2.GetListCollection(out lists2);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;ul&gt;");<BR>&nbsp;&nbsp;&nbsp;&nbsp;foreach(_sList list in lists2)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;li&gt;" + list.Title);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;/ul&gt;");<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;catch(Exception e) <BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;output.Write("&lt;/li&gt;&lt;li&gt;Use of webservice failed: " + e.ToString() + "&lt;/ul&gt;");<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}<BR>&nbsp;}</P></DIV>
<P>&nbsp;</P>
<P>&nbsp;</P>]]>
							</description>
							<category>Development</category>
							<pubDate>Mon, 17 Apr 2006 22:22:04 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=45</comments>
							<slash:comments>6</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=45</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=45</trackback:ping>
					   </item><item>
							<title><![CDATA[Haha - april fools in the blogs!]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=44</link> 
							<description>
								<![CDATA[<P>Well a fun tradition have found its way into the blog world. I was pretty amazed reading about <A href="http://www.sharepointblogs.com/dustin/archive/2006/04/01/5765.aspx">Oracle basing its BI tool on SharePoint</A> in Dustin Millers blog - good one Dustin! Wonders if Microsoft play the same by annoncing that SharePoint will be open source as referenced by Bil Simser: Windows SharePoint Services To Be Open Source With 2007 Microsoft Office Release</P>]]>
							</description>
							<category>General</category>
							<pubDate>Sat, 01 Apr 2006 22:19:04 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=44</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=44</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=44</trackback:ping>
					   </item><item>
							<title><![CDATA[Well – kickin’ wasn’t the right expression!]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=43</link> 
							<description>
								<![CDATA[<P>I had a not so good trip to the states and the DEVCON06. Second day of the conference and I got sick with the flu and could just wait in my hotel room until the plane took me on a 10 hour flight back to DK. Not so funny with a temperature on 39c. This unfortunate situation resulted in I missed the SharePoint blogger lunch – I had really sat my hope up to meet Mart Mueller and the remaining SharePoint bloggers.</P>
<P>My impression of the conference was that it was somewhat interesting. I found the <A href="http://openxmldeveloper.org">OpenXML</A> format really interesting and see huge possibility in this. I think the breakthrough of the format will come with Office 2007 since it will be the default file format for the entire Office suite. I look forward to try this in practice since I'm getting real tired of manipulating Word documents on servers with the Office package installed. Questions is how easy it is to manipulate the entire document structure and merging documents together, it should be pretty straightforward but let's see when you start digging into the WordML schema and have to figure out where to merge your new document info.</P>
<P>One thing that annoyed me a bit with the new Office was the location of the property bar for document meta-data. Yes it's nice it's an InfoPath form and you can build custom controls to inline in it, BUT – the usability of the only valid location of the bar being in the top of the document just below the new ribbon isn't that cleaver. I mean, imagine you have 20 fields or so as part of your document meta-data, a vertical layout of these fields is not that user friendly, only if all fields have close relationship each other it's a good idea to nest them on the same row speaking from a UI side only. I think the proper location is inside the task bar or within a popup window upon save. A question from the audience at this session I think thought the same – and the MS guy had this answer: you can just build a task pane that can host the InfoPath form to have it displayed over there. But really – shouldn't this just be standard behaviour? Another thing necessary in this case is that you should have a possibility to always hide it no matter what – and I'm wondering if one can do that?</P>
<P>New SharePoint stuff was interesting – nice to see you have events on everything and maybe the most important part: you can cancel events!</P>
<P>The SharePoint speakers didn't quite answer the question: how do you upgrade? The closes answer one of the speakers came to answering this was in the WS304 session: that you should be able to do some upgrade definitions to your existing ones. Upgrading the sites should work without any problems – but to enable the new things like features (nice framework for adding extra menuitems and functionality to your sharepoint sites) you need to apply an upgrade definition. Love to see some more stuff about this.</P>
<P>I see Jeremy have posted a question in the performance tips post about what to do if you have many documents/data and how it will scale. I'm planning a part II of the series within long which will answer this.<BR></P>]]>
							</description>
							<category>General</category>
							<pubDate>Thu, 30 Mar 2006 16:52:57 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=43</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=43</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=43</trackback:ping>
					   </item><item>
							<title><![CDATA[Alive and kickin' in Seattle]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=42</link> 
							<description>
								<![CDATA[<P>Yes - I'm still alive.</P>
<P>This last couple of weeks have exploded in work limiting my chances to blog about some exiting SharePoint stuff. I'm in Seattle for the Office Developer Conference 2006 looking forward to hear a bunch about the new Office system.</P>
<P>Recently we had some problems with a customer trying to get SharePoint to work in a trust domain setup - it works ok, but the people picker dialogue can't lookup users in the other domain. Seems like this is solved in the new SharePoint solution according to the SharePoint team blog: "<A href="http://blogs.msdn.com/sharepoint/archive/2006/03/15/552331.aspx">Support for cross-forest deployments</A>".</P>
<P>Another thing related to SharePoint and user information. I was recently asked about&nbsp;the use of userinformation lookup fields, and why all people in the portal didn't appear in the lookup field. The answer is simply that the user has to visit an portal area before he appears in this lookup field, it do not use the general userprofile list. For teamsites it's a bit different - if you add the user using the member webpart, then he appears in the user information lookup field, but not if you just add him using the administration interface (as far as I remember).</P>
<P>Well I hope to blog a bit about the new SharePoint stuff during this week (as far we're allowed too). I'm staying at the Westin hotel in Bellevue with my collegue kickass SharePoint guru Olov Linqvist&nbsp;if any other gurus like to meet ;-)</P>]]>
							</description>
							<category>General</category>
							<pubDate>Mon, 20 Mar 2006 05:20:03 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=42</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=42</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=42</trackback:ping>
					   </item><item>
							<title><![CDATA[CAPTCHA]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=41</link> 
							<description>
								<![CDATA[<P>Well – it hit me… Readers of my blog might have discovered a sudden spam of comments flooding my blog for various v*agra products etc.</P>
<P>As I have build my own blog site from scratch(!) then I didn't include the CAPTCHA (<A href="http://www.captcha.net/">http://www.captcha.net/</A>) stuff, but soon realised that spam is not only going on in mailboxes – also as blog comments. How sad. I've deleted all these spam comments and&nbsp;I hope I didn't remove some intelligent comment from any of you my dear readers.</P>
<P>Well - I just included a sample CAPTCHA stuff found on codeproject (<A href="http://www.codeproject.com/aspnet/CaptchaImage.asp">http://www.codeproject.com/aspnet/CaptchaImage.asp</A>) in my blog site, so this spamming should be avoided for the future.</P>
<P>I know there are other blog open source projects out there, but I just wanted to code my own – just for the fun of it, therefore my blog is not as fancy as sites build with e.g. DasBlog (<A href="http://sourceforge.net/projects/dasblogce">http://sourceforge.net/projects/dasblogce</A>), but still I've tried to support trackback and ping. However sometimes when I post references it does not always seems like other blogs accepts my trackback calls(?).</P>]]>
							</description>
							<category>General</category>
							<pubDate>Mon, 13 Feb 2006 15:41:03 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=41</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=41</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=41</trackback:ping>
					   </item><item>
							<title><![CDATA[Howto rollout of research pane services?]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=40</link> 
							<description>
								<![CDATA[<P>I had a discussion about this today - and it seems to be no problem. Microsoft have a guide here: <A href="http://www.microsoft.com/technet/prodtechnol/office/office2003/operate/o3rsrch.mspx#EGAA">http://www.microsoft.com/technet/prodtechnol/office/office2003/operate/o3rsrch.mspx#EGAA</A>&nbsp;which explains that you can rollout the registration of a research service using registry keys. Great article.</P>]]>
							</description>
							<category>Tip</category>
							<pubDate>Mon, 30 Jan 2006 16:33:01 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=40</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=40</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=40</trackback:ping>
					   </item><item>
							<title><![CDATA[Office 2003 research panes]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=39</link> 
							<description>
								<![CDATA[<P>Wow! One overseen feature of Office 2003 is the research panes. I haven´t seen any good examples of using it (expect the IBuySpy example from the research pane SDK <A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=D3FC8129-63F7-43B5-8D99-DE4058ADE0EC&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=D3FC8129-63F7-43B5-8D99-DE4058ADE0EC&amp;displaylang=en</A>). This saturday I started playing with it and now&nbsp;- you, my dear reader&nbsp;- can search blog.ekegren from within your Office programmes. Write some text – press down the ALT key and click a word, and a live search will be executed towards blog.ekegren!</P>
<P>Developing this research service was a quick thing – I did it in a couple of hours starting from scratch. The problems I had was that I would like to provide cut´n´pasteable content from the action buttons (insert entry/copy entry) and encoding problems, due to the fact that all my content on blog.ekegren is in HTML and that doesn´t play with normal text in e.g. Word. My example is in beta – I might start to develop it further but no promises ;-)</P>
<P>To set it up – follow this guide:</P>
<P>1. Open word and turn on the task pane, then swith to the research pane</P>
<DIV class=imageleft id=image4><IMG src="http://www.ekegren.dk/blog/pictures/blog/0cccb20c-b14d-4d7a-a843-6ed37db93e17researchpane1.gif"></DIV>
<P>2. Click the "research options" link<BR>3. Click the "add services" button, enter the URL: http://www.ekegren.dk/blog/researchservice/registration.asmx<BR>4. Click "add"</P>
<DIV class=imageleft id=image3><IMG src="http://www.ekegren.dk/blog/pictures/blog/e05eee9e-e23a-4d6f-af10-bac03da79758researchpane2.gif"></DIV>
<P>5. The research service confirms the installation<BR>6. Accept the confirmation</P>
<DIV class=imageleft id=image2><IMG src="http://www.ekegren.dk/blog/pictures/blog/5c0302b7-2956-43ad-a346-896d26be0802researchpane3.gif"><BR><EM>Confirmation upon successfull subscription</EM></DIV>
<P>7. Now start searching and copy blog entries into your Office documents (ok, the format of the content could be more nice, I haven´t done anything to format it in a nice Office way). Write a document, press down the ALT key and click the word - a search result is displayed in the research service.</P>
<DIV class=imageleft id=image1><IMG src="http://www.ekegren.dk/blog/pictures/blog/8ca97ef2-ba9c-4c3b-bc1b-0b3d9e79887fresearchpane6.gif"><BR><EM>Research service displayes results matching the search for SharePoint...</EM></DIV>]]>
							</description>
							<category>Tip</category>
							<pubDate>Sat, 28 Jan 2006 19:15:17 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=39</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=39</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=39</trackback:ping>
					   </item><item>
							<title><![CDATA[Using standard XML webpart to read rss-feeds]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=38</link> 
							<description>
								<![CDATA[<P>Want to use information from RSS feeds in your portal? Simple! Just use the standard XML webpart and connect it to a RSS feed URL:</P>
<DIV class=imageleft align=center><IMG src="http://www.ekegren.dk/blog/pictures/blog/e318cb2e-d26c-401e-90d7-691616a3c476xmlwebpart.gif"><BR><EM>Using the XML webpart to read RSS feeds...</EM></DIV>
<P>Then apply a stylesheet:</P>
<DIV class=CodeSection>
<P>&lt;xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'&gt;<BR>&lt;xsl:output method="html" indent="no"/&gt;</P>
<P>&lt;xsl:template match='/'&gt;<BR>&lt;table class="" width="100%"&gt;<BR>&lt;tr&gt;<BR>&lt;td colspan="2"&gt;<BR>&nbsp;&lt;xsl:apply-templates select='//item'/&gt;<BR>&lt;/td&gt;<BR>&lt;/tr&gt;<BR>&lt;/table&gt;<BR>&lt;/xsl:template&gt;</P>
<P>&lt;xsl:template match='item'&gt;<BR>&lt;table class="" width="100%"&gt;<BR>&nbsp;&lt;a&gt;&lt;xsl:attribute name="href"&gt;&lt;xsl:value-of select='link' /&gt;&lt;/xsl:attribute&gt;&lt;xsl:value-of select='title' /&gt;&lt;/a&gt;<BR>&lt;/table&gt;<BR>&lt;/xsl:template&gt;</P>
<P>&lt;/xsl:stylesheet&gt;</P></DIV>
<P>If you want more advanced support for RSS feeds then there are other RSS feed webparts outthere or it's pretty simple to develop your self.</P>
<P>References:<BR><A href="http://weblogs.asp.net/jan/archive/2004/02/23/78231.aspx">http://weblogs.asp.net/jan/archive/2004/02/23/78231.aspx</A>&nbsp;(RSS feed webpart by Jan Tieglens)<A href="http://www.microsoft.com/technet/security/bulletin/secrssinfo.mspx">http://www.microsoft.com/technet/security/bulletin/secrssinfo.mspx</A>&nbsp;(TechNet article: Nice RSS article and links to XSLT for webparts)<BR></P>]]>
							</description>
							<category>Tip</category>
							<pubDate>Thu, 26 Jan 2006 10:28:38 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=38</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=38</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=38</trackback:ping>
					   </item><item>
							<title><![CDATA[Ghosting/unghosting]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=37</link> 
							<description>
								<![CDATA[<P>Ghosting and unghosting&nbsp;are terms that are difficult for new SharePoint developers. Ted Pattison have a great <A href="http://www.tedpattison.net/UsingFPwithSP.aspx">guide</A> - but the real experience you won't get before you'll try a lot of different scenarios. I have begun documenting when ghosting/unghosting occurs in this diagram:</P>
<DIV class=imageleft><IMG src="http://www.ekegren.dk/blog/pictures/blog/ea8ad6ac-3a8b-4afb-a8dd-26f74a7faf2eghosting.gif"></DIV>
<DIV class=imageleft>&nbsp;</DIV>
<DIV class=imageleft>Comments are welcome (since it's version 0.9) :-)<BR></DIV>]]>
							</description>
							<category>Development</category>
							<pubDate>Mon, 23 Jan 2006 23:13:32 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=37</comments>
							<slash:comments>3</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=37</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=37</trackback:ping>
					   </item><item>
							<title><![CDATA[Goodiebag in 06]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=36</link> 
							<description>
								<![CDATA[<P>First post in '06 and what a year we're entering! This year is going to be an exiting year for the SharePoint community. The scheduled update of Office "12" in second half of '06 is going to be interesting to follow (if the deadline is kept). Some <A href="http://sharepointblogs.com/mkruger/archive/2006/01/06/4509.aspx">screenshots</A> have appeared in various blogs – but for those of you who where at the PDC, nothing new about it I guess.</P>
<P>Allow me to post a few updates to some of my previous posts. First of all – the "<A href="http://weblogs.asp.net/bsimser/archive/2005/12/14/433191.aspx">SharePoint hydra</A>", the <A href="http://www.ekegren.dk/blog/AddBlogComment.aspx?id=34">SharePoint monster</A> posts, first initiated by Bil Simser and commented by me with a top 10 (in random order) of things that might go wrong during your administration and maintenance of&nbsp; SharePoint. What I would like emphasise in that matter, is that one should remember and notice that in my post, I list a number of technologies and platforms which you should be familiar with. SharePoint is a platform and spawns multiple technologies due to the server farm topology and its place inside the Windows Server System – i.e. you need to know some basic knowledge about the various systems and connect the dots if something goes wrong. This scares some IT administrators – therefore my recommendation usually is to put together a task force of SQL-database, AD- and desktop-administrators to support the SharePoint installation, but the SharePoint administrator should have some overview of what SharePoint utilise within the various technologies and request assistance if either of these are the cause of the problem. A structured sense for investigation and understanding of how SharePoint is build with templates, ASP.NET controls etc. helps, when one should investigate problems.</P>
<P>Regarding SharePoint development, which was what I think Bil Simer originally was thinking of when he stated the SharePoint hydra association, have some truth to it. The API is – exciting – due to the various methods and strange exceptions thrown. Like with any other API it takes time to get equitant with, but then add a bit more with the SharePoint API.</P>
<P>Recently there have been <A href="http://blogs.tamtam.nl/mart/PermaLink,guid,eae8a4be-8073-4994-ac9e-83c86f5fa441.aspx">many</A> <A href="http://weblogs.asp.net/bsimser/archive/2006/01/03/434454.aspx">many</A> posts&nbsp;about limitations of document libraries and the <A href="http://www.sharepointblogs.com/dustin/archive/2006/01/03/4480.aspx">use of meta-data</A> – funny as this topic suddenly exploded. To do it short: do not use folders unless to make a sort of archive in a document library – always use meta-data to be able to do cross site searches for documents of a certain type, using folders won't give you this possibility. The traditional file server is usually nested like this (if you are somewhat structured person/organisation):</P>
<P class=imageleft align=center><IMG src="http://www.ekegren.dk/blog/pictures/blog/70ce5c59-3ea7-43a8-85c6-57aba0c2dcb3fileserver.gif"></P>
<DIV class=imageleft><BR>Therefore – if you really plan to move into a SharePoint world, then tag your documents with meta-data to be able to search them. Level 1 could be a teamsite; level 2 could be a meta-data field of type "choice" called "phase" with 7 options: 00 Proposal, 01 Definition, 02 Analysis, 03 Design, 04 Build, 05 Test, 06 Conclusion; level 3 could be another choice field called "document type" with options like: letter, status report, design documentation etc. Just my 5 cents in the meta-data/subfolder discussion :-)</DIV>
<P>For my next post I would like some comments of which topic to do next (please inspire me by submitting comments for which topic you would like me to cover):</P>
<UL>
<LI>Research panes in Office 2003</LI>
<LI>Writing performance optimized SharePoint code – part II</LI>
<LI>More about organisational stuff and using SharePoint for project management etc.</LI>
<LI>Ghosting/unghosting explained, when should you care</LI></UL>
<P>Happy New Year!</P>]]>
							</description>
							<category>General</category>
							<pubDate>Sun, 08 Jan 2006 01:46:08 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=36</comments>
							<slash:comments>1</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=36</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=36</trackback:ping>
					   </item><item>
							<title><![CDATA[Tips for writing performance optimized code for SharePoint – Part I]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=35</link> 
							<description>
								<![CDATA[<P>I've recently tried to insert 1 million items into a SharePoint list in order to test whether or not this was actual possible. I have been somewhat concerned when reading the Microsoft recommendations (<A href="http://www.microsoft.com/technet/prodtechnol/sppt/wss/fsdoclib.mspx">http://www.microsoft.com/technet/prodtechnol/sppt/wss/fsdoclib.mspx</A>) for amount of data within the SharePoint lists and document libraries, but in order to take them seriously I wanted to conduct some tests to reveal if the recommendations where relevant for the components which we where building on some of these data types. One wonders, as none of the recommendations are hard limits – and how do they effect the SharePoint installation? Do the portal crash? Which methods of the SharePoint API is best capable to deal with these amounts of data?</P>
<P>First answer to your user experience questions:</P>
<UL>
<LI>No, the portal do not crash</LI>
<LI>The area does not seem to run slower</LI>
<LI>The list actually renders quite fine and fast for allitems.aspx (default view)</LI>
<LI>Additional views like filtered, grouped and sorted views are slow ( ~ 40 sec in presenting pages, when presenting paged lists with approximately 100 items on each page) – so you should think about applying a lot of criteria for filtering, sorting and grouping to minimize amounts of list items in the views. <BR>Large views can make the page/request (due to the long processing) hang, but the application do not seem to crash. Visiting another page in the portal executes fine. The problem occurs with grouped and sorted views. Filtered views seem to execute fine.</LI></UL>
<P>Programmatically accessing and inserting (1 million) items into a list:</P>
<UL>
<LI>List webservice responded fast and reliable for inserting items into the list</LI>
<LI>The processbatchdata method was fast and reliable for inserting items into the list</LI>
<LI>The OM was horrifically slow, a bunch of guidelines:</LI>
<UL>
<LI>DO NOT USE the items-property of a list object (SPList.Items) in case of adding or counting elements (for counting always use the ItemCount property of the SPList-object).</LI>
<LI>Instead rely on searching the list using CAML queries and the SPQuery object.</LI>
<LI>If you need to insert items into a very large list, do it by using the webservice or my favourite the processbatchdata method. </LI>
<LI>Using the items-property will fetch all listitems from the list – so if you have one million items within the list, then the returned SPListItemCollection will contain 1 million SPListItem objects and the only way to add a new listitem into a list using the OM is to add a SPListItem using the add-property of the SPListItemCollection.</LI></UL></UL>
<P>Just a few tips for now, I think I'll follow up with a part II of this series.</P>]]>
							</description>
							<category>Guide</category>
							<pubDate>Thu, 22 Dec 2005 00:25:22 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=35</comments>
							<slash:comments>12</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=35</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=35</trackback:ping>
					   </item><item>
							<title><![CDATA[The sharepoint monster!]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=34</link> 
							<description>
								<![CDATA[<P>*LOL* – Bil Simser paints the horrible truth about SharePoint in his <A href="http://weblogs.asp.net/bsimser/archive/2005/12/14/433191.aspx">latest post</A>. Quote: "SharePoint is a hydra with heads growing out of places you wouldn´t believe. Every time you cut one off (or even consider doing it) 3 more grow in it's place."&nbsp; - couldn´t be more right.</P>
<P>SharePoint administrators should receive a medal within IT. Every system administrator which gets the responsibility of a SharePoint solution should master or at least be familiar with: </P>
<UL>
<LI>Microsoft SQL database management 
<LI>Network management 
<LI>Active Directory management and security 
<LI>Have some knowledge about .NET applications 
<LI>IIS configuration 
<LI>Windows 2003 
<LI>Office 2003 
<LI>..and then of course - SharePoint</LI></UL>
<P>Buy all the books – read them. It really hits you when you are in a maintenance situation. I've tried to sum-up a top 10 list (order of appearance not applied) of causes for errors within a SharePoint installation:</P>
<OL>
<LI>Microsoft rolls out a SharePoint service pack through automatic updates which is installed automatically – the portal crashed, due to missing updates. Solution: <A href="http://support.microsoft.com/?kbid=871149">http://support.microsoft.com/?kbid=871149</A> 
<LI>Network is really slow after SharePoint is installed in a farm setup using NLB capabilities of Windows 2003.<BR>In some cases this happens when your network consist of a certain Cisco switch which generates a virtual MAC address which causes broadcast problems. This isn't really SharePoint's fault but the W2K3 NLB setup in combination with Cisco switches. Solution: configure the switches and place the SharePoint servers behind a router to limit the broadcast problem. 
<LI>Users are renamed or recreated with the same username and have problems accessing SharePoint afterwards – in this case the SID changes and SharePoint do not update it in the databases upon re-addition. Dustin Miller have a fix here: <A href="http://www.sharepointblogs.com/dustin/archive/2004/09/10/756.aspx">http://www.sharepointblogs.com/dustin/archive/2004/09/10/756.aspx</A> 
<LI>Subscriptions/alerts are not send to users which have made alerts. Solution should be available within the latest service packs provided by Microsoft – but if the SharePoint index either can't be propagated from index-server to search/front-end server (in a small server farm or larger) then alerts aren't triggered or send. This is most often related to security issues of the user accounts used as SharePoint service accounts – server farm accounts have to be re-assigned with username/password in order to fix problems. Furthermore "Microsoft SharePointPS Search" service has to be restarted. 
<LI>On non-english SharePoint installations language shifts in the files within the layouts directory – after an application pool recycle it goes back to original language. This should be due to an error in the .NET framework – but recent attempts to apply a hotfix have not solved the issue. Love to hear from people who have a fix. 
<LI>Every X attempt to create a site fails. This often happens when several content databases are used and due to some glitch in the SharePoint matrix it haven't got the service account assigned as dbo of one of the databases (hence error the Xth time). 
<LI>Search does not return any results. This could be a number of reasons – one of the them could be that you have deleted the "WorkPhone" property within the profile database, yes is true – Microsoft have hardcoded a reference to that property, if it's missing – the search results crash. 
<LI>Search do not work/"The server instance specified was not found" – code and the "stsadm.exe" tool returns errors specifying that the portal context could not be found or other errors are returned. Running "stsadm.exe –o enumsites" usually expose this error. Could be due to IIS configuration:&nbsp; <A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;832816">http://support.microsoft.com/default.aspx?scid=kb;en-us;832816</A> 
<LI>Can't create a new portal in SharePoint Portal Server. The progress of creating a new portal stops around 47% when the search application should be created. In this case it most probably is due to the collation (<A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;843578">http://support.microsoft.com/default.aspx?scid=kb;en-us;843578</A>)&nbsp; of the MS-SQL server which is incompatible with SharePoint application. If the portal creation progress stops before 40% then it´s most probably to due to errors in the standard templates (which might have been modified) or dependencies in standard templates to custom components. 
<LI>"Webpart is not registered as safe" – custom webpart which is not registered using the stsadm.exe tool which adds node into web.config of the portal. This is usually due to wrong dwp-definition of the webpart (wrong assembly reference).</LI></OL>]]>
							</description>
							<category>Tip</category>
							<pubDate>Fri, 16 Dec 2005 00:25:58 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=34</comments>
							<slash:comments>4</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=34</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=34</trackback:ping>
					   </item><item>
							<title><![CDATA[Modal windows...]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=33</link> 
							<description>
								<![CDATA[<P>I know this is pretty basic – but recently I’ve had some problems in respect to parsing values from modal windows to the opening window, each time I do this from scratch something new happens – or at least I thought, it was just because I didn’t get it (I guess) *very embarrassed*. </P>
<P>I messed around using "window.returnValue" and nothing happened (mislead by the <A href="http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/showmodaldialog.asp">http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/showmodaldialog.asp</A> and <A href="http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/returnvalue_0.asp">http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/returnvalue_0.asp</A>) – it do not seem to me like this works. </P>
<P>Surfing around let me to this great resource at&nbsp;<A href="http://www.codestore.net/store.nsf/unid/DOMM-4R5MDQ?OpenDocument">http://www.codestore.net/store.nsf/unid/DOMM-4R5MDQ?OpenDocument</A></P>
<P>But basically – remember this:</P>
<DIV class=CodeSection>window.showModalDialog(URL, OBJECTREFERENCE, DISPLAYATTRIBUTES);</DIV>
<P>where:</P>
<UL>
<LI>URL: The url to display in the dialogue<BR></LI>
<LI>OBJECTREFERENCE: parse an object into the dialogue window; if you parse the opening window by the variable "self" then variables within the DOM of the opening window, should be assigned with window.dialogArguments.VARIABLENAME. <BR><BR>In this case you could assign a variable within the DOM with:<BR><BR>
<DIV class=CodeSection>var ValueFromModalDialog = null<BR>function openModalWindow(url,sFeatures) {<BR>&nbsp;window.showModalWindow(url,self,sFeatures);<BR>&nbsp;alert(ValueFromModalDialog)<BR>&nbsp;<BR>}</DIV><BR>in the modal window the return value would either read or assigned like:<BR><BR>
<DIV class=CodeSection>window.dialogArguments.ValueFromModalDialog = "return value";</DIV><BR>So in above example the alert box would display "return value".<BR></LI>
<LI>DISPLAYATTRIBUTES: attributes which states how the window should appear.</LI></UL>
<P>Not a very advanced post I agree, but necessary to avoid confusion in the future ;-)</P>]]>
							</description>
							<category>Code snippet</category>
							<pubDate>Thu, 15 Dec 2005 20:16:27 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=33</comments>
							<slash:comments>1</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=33</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=33</trackback:ping>
					   </item><item>
							<title><![CDATA[SharePoint add-on portal?]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=32</link> 
							<description>
								<![CDATA[<P>Nice to see <A href="http://weblogs.asp.net/bsimser/">Bil Simser</A> read and post <A href="http://weblogs.asp.net/bsimser/archive/2005/11/28/431746.aspx">an update</A> to <A href="http://www.ekegren.dk/blog/AddBlogComment.aspx?id=31">my response</A> about the discussion concerning open source vs. products in SharePoint. In his latest post in this matter, he rage about the various repositories (<A href="http://www.gotdotnet.com">GotDotNet</A> and <A href="http://sourceforge.net">SourceForge</A>) for submitting your open source webparts and share my frustration about uselessness of the Microsoft web component directory. He also announces his upcoming SharePointForge project which might be solution to vendor prayers and open source webparts&nbsp;for being exposed?</P>
<P>I would like to delve a bit about the web component directory and what I would guess where the intentions behind it. First of all – when you define a business building SharePoint components, you are in the realm of what Microsoft decides to do with platform. Microsoft has encouraged vendors to start building components and start a business to evolve the platform.<BR>In this case you are very much exposed to shifts in the SharePoint platform – and the secrecy about the next release could mean that your components gets obsolete or becomes incompatible (even though MS states that if you stick within the API then you should be home free). It's hard to stay aligned within the SharePoint sphere when you are continuously are informed through small chunks of information about the next wave, therefore the beta of Office "12" becomes crucial for all vendors but they also require a decision for how Microsoft decides to package the servers within the Office system. For the last couple of SharePoint releases there have been major technology shifts where you as a vendor had to "withdraw and regroup" in order to support the new platform. I guess this is just how it is and as vendor this are the rule of the game.</P>
<P>What people have started building is basically site/list templates, navigation and aggregation components; some have built more advanced webparts which address some of the bad UI design of SharePoint. When vendors start to link to their demo portals and have people request a login I see two reasons for it: sort of protect intellectual value of their product (it's pretty easy for a competitor to build a navigation webpart) and to be able to track interest of potential customers, and who can blame them? I've seen very few good original ideas implemented as standalone webparts and it's pretty easy for a competitor to copy your idea and implement it on his own as long it's limited within the SharePoint API, therefore the attempt to somewhat protect the components behind requests for logins etc. </P>
<P>So what does the ultimate SharePoint add-on resource portal have to provide the end-users? I would love to hear from people, vendors and especially end-users that are looking for components to extend their portals/teamistes - how do you search, where do you go -&nbsp;where do you want to go?&nbsp;</P>]]>
							</description>
							<category>General</category>
							<pubDate>Sun, 04 Dec 2005 18:14:57 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=32</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=32</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=32</trackback:ping>
					   </item><item>
							<title><![CDATA[A comment on products vs. open source]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=31</link> 
							<description>
								<![CDATA[<P>As posted by Bil Simser in this post about "<A href="http://weblogs.asp.net/bsimser/archive/2005/11/22/431211.aspx">Open Source Web Parts, XBox 360, and VS2005 Launch</A>" which stated some debate about open source vs. products on SharePoint I thought I'd have my 5 cents in that debate.</P>
<P>When you build commercial products on SharePoint you have to compete with open source (which right now evolves the entire SharePoint platform – this is great, but also necessary due to the somewhat limited amount of howto's from Microsoft) and other vendors. Like in any other business – if you have a great product, you need to market it and generate some hype about it to have people buy it. If you buy a component – you expect some amount of support associated with it, open source – then you're on your own or at least in the hands of the developer and his dedication in order to support you. A product means continuous product development and the product has to evolve into something greater and better for each release (my opinion). Therefore I think open source is great, it continuously push forward the platform and lifts the level of which products you find on the market.</P>
<P>Right now I think the entire SharePoint platform is mainly for techies and therefore the marketing of components is mostly done through blogs and narrow technical magazines. The platform don’t allow the SharePoint end-user to just download and play with your webpart – he have to talk with his IT administrator in order to install it, and without a proper test/demo portal to test vendors components then a lot of components out there never reach the designated portals. I've seen the Microsoft solution directories – but I have no clue about how many people actually use it? Therefore vendors have to supply a demo portal for the end user in order to demonstrate how great their product is.</P>
<P>Another way is for vendors to sign up partner agreements with consulting agencies or other companies that can push their products into the companies; this also requires a huge effort. Furthermore – I see end-users having a hard time to understand that they have bought a platform which can be extended or more specifically how it can be extended. User adaptation is hard on SharePoint for non-IT employees, so don't under estimate the organisational implementation in education and at least to define how you should use the product. Open source don't provide this – so products on the SharePoint platform should aim at utilising and explaining how to use SharePoint and your add-on on top of it. That's what I currently are focusing on for Netcompany's Case Collaborative Management System – a system that's introduce a easy&nbsp;working/collaboration concept for SharePoint and technical foundation for supporting the concept. I would therefore love to chat with other vendors for how one can push a component onto the market and in which way we as SharePoint developers can help products to be displayed in the market – an annual SharePoint Component Expo might be an idea?</P>]]>
							</description>
							<category>Development</category>
							<pubDate>Tue, 29 Nov 2005 00:32:40 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=31</comments>
							<slash:comments>2</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=31</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=31</trackback:ping>
					   </item><item>
							<title><![CDATA[Get SharePoint object pattern]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=30</link> 
							<description>
								<![CDATA[<P>A lot of SharePoint code is wrapped in catch system.exception due to the sometimes mysterious exceptions which are thrown. This pattern is intended for retrieving objects on URLs within SharePoint. The pattern address the scenario for retriving a site, web, folder or file - input variable url being a complete URL for either of these object types.</P>
<DIV class=CodeSection>
<P>Uri uri = new Uri(url);<BR>SPSite site = new SPSite(uri.AbsoluteUri.ToString());<BR>SPWeb web = null;</P>
<P>string webUrl = SPEncode.UrlDecodeAsUrl(uri.AbsolutePath.ToString());<BR>webUrl = webUrl.Substring(1,webUrl.LastIndexOf('/')-1);</P>
<P>while(web == null) {<BR>&nbsp;try {<BR>&nbsp;&nbsp;web = site.OpenWeb(webUrl);<BR>&nbsp;&nbsp;// test if valid web - try to get ID from web object, this throws an filenotfoundexception<BR>&nbsp;&nbsp;// if the web is not proper initialised/opened<BR>&nbsp;&nbsp;Guid g = web.ID;<BR>&nbsp;}<BR>&nbsp;catch(System.IO.FileNotFoundException e) {<BR>&nbsp;&nbsp;webUrl = webUrl.Substring(0,webUrl.LastIndexOf('/'));<BR>&nbsp;&nbsp;web = null;<BR>&nbsp;}<BR>}<BR>if(web != null) {<BR>&nbsp;SPFile file = null;<BR>&nbsp;try {<BR>&nbsp;&nbsp;file = web.GetFile(uri.AbsolutePath.ToString());<BR>&nbsp;}<BR>&nbsp;catch (System.ArgumentException e) {<BR>&nbsp;&nbsp;file = null; <BR>&nbsp;}<BR>&nbsp;if(file != null &amp;&amp; file.Exists) return file;<BR>&nbsp;else {<BR>&nbsp;&nbsp;// remove eventual trailing slash<BR>&nbsp;&nbsp;string folderUrl = uri.AbsolutePath.ToString();<BR>&nbsp;&nbsp;if(folderUrl.EndsWith("/")) folderUrl = folderUrl.Substring(0,folderUrl.Length-1);</P>
<P>&nbsp;&nbsp;SPFolder folder = web.GetFolder(folderUrl);<BR>&nbsp;&nbsp;if(folder.Exists &amp;&amp; !web.RootFolder.Url.Equals(folder.Url)) return folder;<BR>&nbsp;&nbsp;else return web;<BR>&nbsp;}<BR>}<BR>else<BR>&nbsp;return site;<BR></P></DIV>]]>
							</description>
							<category>Pattern</category>
							<pubDate>Sun, 27 Nov 2005 21:46:23 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=30</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=30</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=30</trackback:ping>
					   </item><item>
							<title><![CDATA[SharePoint code - best practices part I]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=29</link> 
							<description>
								<![CDATA[<SPAN lang=EN-GB style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">
<P><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">The SharePoint OM is difficult to use. It´s not intuitive - it´s throws strange errors if you are not familiar to the architecture.&nbsp;I decided to try to map some behaviour of the SharePoint objects for a group of new developers at our company in order to improve quality of our API’s and components.<BR>&nbsp; <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P>
<TABLE class=MsoNormalTable style="WIDTH: 750px; HEIGHT: 552px; mso-cellspacing: 0cm; mso-table-layout-alt: fixed; mso-padding-alt: 0cm 0cm 0cm 0cm" height=552 cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR style="HEIGHT: 12pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes">
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1.5pt solid; PADDING-LEFT: 0cm; BACKGROUND: black; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1.5pt solid; WIDTH: 80.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 12pt; mso-border-top-alt: 1.5pt; mso-border-left-alt: 1.5pt; mso-border-bottom-alt: .75pt; mso-border-right-alt: .75pt; mso-border-color-alt: black; mso-border-style-alt: solid" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-GB style="FONT-SIZE: 8pt; COLOR: white; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">SPFolder</SPAN></B><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1.5pt solid; PADDING-LEFT: 0cm; BACKGROUND: black; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 12pt; mso-border-top-alt: solid black 1.5pt; mso-border-alt: solid black .75pt" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-GB style="FONT-SIZE: 8pt; COLOR: white; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">SPFile</SPAN></B><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1.5pt solid; PADDING-LEFT: 0cm; BACKGROUND: black; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 12pt; mso-border-top-alt: solid black 1.5pt; mso-border-alt: solid black .75pt" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-GB style="FONT-SIZE: 8pt; COLOR: white; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">SPSite</SPAN></B><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1.5pt solid; PADDING-LEFT: 0cm; BACKGROUND: black; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 12pt; mso-border-top-alt: solid black 1.5pt; mso-border-alt: solid black .75pt" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-GB style="FONT-SIZE: 8pt; COLOR: white; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">SPList</SPAN></B><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1.5pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1.5pt solid; PADDING-LEFT: 0cm; BACKGROUND: black; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 12pt; mso-border-top-alt: 1.5pt; mso-border-left-alt: .75pt; mso-border-bottom-alt: .75pt; mso-border-right-alt: 1.5pt; mso-border-color-alt: black; mso-border-style-alt: solid" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-GB style="FONT-SIZE: 8pt; COLOR: white; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">SPWeb</SPAN></B><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 176.25pt; mso-yfti-irow: 1">
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1.5pt solid; WIDTH: 80.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 176.25pt; BACKGROUND-COLOR: transparent; mso-border-left-alt: solid black 1.5pt; mso-border-alt: solid black .75pt" vAlign=top width=108><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">
<P><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">When referencing a folder with a full url that is not a valid folder, for instance pointing at an non-existing folder – the SPFolder returned is an object which has the name property associated with that of the non-existing folder.<o:p></o:p></SPAN></P>
<P><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">When trying to fetch additional properties a Microsoft.SharePoint.<BR>SPException is thrown.</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB; mso-fareast-font-family: ´Times New Roman´; mso-bidi-font-family: ´Times New Roman´; mso-fareast-language: DA; mso-bidi-language: AR-SA">If using SPWeb.Folders enumeration and referencing a bad location within this collection a System.<BR>ArgumentException is thrown.</SPAN></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 176.25pt; BACKGROUND-COLOR: transparent; mso-border-alt: solid black .75pt" vAlign=top width=108><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">
<P><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">When referencing a file with a full url that is a non-existing file – the SPFile returned is an object which has the name property associated with that of the non-existing file.</SPAN></P>
<P><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"></SPAN><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">When trying to call methods on the object (e.g. InDocumentLibrary) a System.<BR>ArgumentException is thrown.</SPAN></P>
<P><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"></SPAN><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB; mso-fareast-font-family: ´Times New Roman´; mso-bidi-font-family: ´Times New Roman´; mso-fareast-language: DA; mso-bidi-language: AR-SA">If using SPWeb.Files enumeration and referencing a bad location within this collection a System.<BR>ArgumentException is thrown.</SPAN></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 176.25pt; BACKGROUND-COLOR: transparent; mso-border-alt: solid black .75pt" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">When trying to instantiate an object with an Url that is not a valid SharePoint URI a Microsoft.SharePoint.<BR>SPException is thrown.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">If this error happens in script-code (inline in aspx-pages) the error cannot be caught and the ISAPI filter takes over an returns a SharePoint error page stating “An external component has thrown an exception”.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">If the error happens within a compiled webpart or a webcontrol the exception can be caught.<BR></P></SPAN>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 176.25pt; BACKGROUND-COLOR: transparent; mso-border-alt: solid black .75pt" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">When trying to fetch a list which do not exist by referencing a non-existing name or guid a System.<BR>ArgumentException </SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">is thrown. </SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1.5pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1pt solid; HEIGHT: 176.25pt; BACKGROUND-COLOR: transparent; mso-border-right-alt: solid black 1.5pt; mso-border-alt: solid black .75pt" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">If SPSite.OpenWeb method is called with a server relative url which are not registered as valid<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>SPWeb location a System.IO.<BR>FileNotFoundException is thrown.</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"></SPAN><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">If referencing a server relative url containing either a trailing slash or beginning slash a Microsoft.SharePoint.<BR>SPException is thrown.<BR></P></SPAN>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">If trying to get a SPFile on a URL which is not a file (with SPWeb.GetFile) then a System.<BR>ArgumentException is thrown ( Value does not fall within the expected range)<o:p></o:p></SPAN></P></TD></TR>
<TR style="HEIGHT: 45pt; mso-yfti-irow: 2; mso-yfti-lastrow: yes">
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1.5pt solid; WIDTH: 80.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1.5pt solid; HEIGHT: 45pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: .75pt; mso-border-left-alt: 1.5pt; mso-border-bottom-alt: 1.5pt; mso-border-right-alt: .75pt; mso-border-color-alt: black; mso-border-style-alt: solid" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"><STRONG>Best practice:</STRONG> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">Always test the Exist property before doing any operations on a folder item.<o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1.5pt solid; HEIGHT: 45pt; BACKGROUND-COLOR: transparent; mso-border-bottom-alt: solid black 1.5pt; mso-border-alt: solid black .75pt" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"><STRONG>Best practice:</STRONG> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">Always test the Exist property before doing any operations on a file item.<o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1.5pt solid; HEIGHT: 45pt; BACKGROUND-COLOR: transparent; mso-border-bottom-alt: solid black 1.5pt; mso-border-alt: solid black .75pt" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"><STRONG>Best practice:</STRONG> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">Instantiate using a absolute URI as property for the constructor<o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1.5pt solid; HEIGHT: 45pt; BACKGROUND-COLOR: transparent; mso-border-bottom-alt: solid black 1.5pt; mso-border-alt: solid black .75pt" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"><STRONG>Best practice:</STRONG> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">Ensure that the name or GUID is valid input before trying to fetch a SPList object<o:p></o:p></SPAN></P></TD>
<TD style="BORDER-RIGHT: black 1.5pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: black 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: black 1pt solid; WIDTH: 80.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: black 1.5pt solid; HEIGHT: 45pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: .75pt; mso-border-left-alt: .75pt; mso-border-bottom-alt: 1.5pt; mso-border-right-alt: 1.5pt; mso-border-color-alt: black; mso-border-style-alt: solid" vAlign=top width=108>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB"><STRONG>Best practice:</STRONG> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana; mso-ansi-language: EN-GB">Instantiate using a absolute path stripped from trailing slashes as property for OpenWeb<o:p></o:p></SPAN></P></TD></TR></TBODY></TABLE></SPAN></P>]]>
							</description>
							<category>Development</category>
							<pubDate>Sat, 26 Nov 2005 22:31:19 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=29</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=29</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=29</trackback:ping>
					   </item><item>
							<title><![CDATA[Howto: Import User Profile Information of Enabled User Accounts from Active Directory]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=28</link> 
							<description>
								<![CDATA[<P>Great support article: <A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;827754">http://support.microsoft.com/default.aspx?scid=kb;en-us;827754</A></P>]]>
							</description>
							<category>Howto</category>
							<pubDate>Mon, 14 Nov 2005 23:03:39 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=28</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=28</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=28</trackback:ping>
					   </item><item>
							<title><![CDATA[MSDN article about SharePoint development environment]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=27</link> 
							<description>
								<![CDATA[<P>Reading the blog of Mart Muller (<A href="http://blogs.tamtam.nl/mart/TeamBasedDevelopmentOfWSSAndSPSApplications.aspx">http://blogs.tamtam.nl/mart/TeamBasedDevelopmentOfWSSAndSPSApplications.aspx</A>) made&nbsp;me aware of the recent best practice on SharePoint development environment which is posted on MSDN in <A href="http://blogs.tamtam.nl/mart/ct.ashx?id=985c5ea1-cb67-4831-89fc-d6000b0c585e&amp;url=http%3a%2f%2fmsdn.microsoft.com%2foffice%2fdefault.aspx%3fpull%3d%2flibrary%2fen-us%2fodc_sp2003_ta%2fhtml%2fofficesharepointteambaseddev.asp">this article</A>.</P>
<P>I was quite pleased to see the article which match our way of developing SharePoint solutions - however we had quite some problems in respect with remote debugging across domain boundaries (developer in production domain trying to debug the solution executing in the development domain), if you know a good practice for making this work - please comment on this post or send me a comment.</P>]]>
							</description>
							<category>Development</category>
							<pubDate>Sun, 13 Nov 2005 12:41:23 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=27</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=27</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=27</trackback:ping>
					   </item><item>
							<title><![CDATA[WSS SP2 and event handlers]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=26</link> 
							<description>
								<![CDATA[<P>I'm sure this might be a usefull information one day:</P>
<P><A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;909455">http://support.microsoft.com/default.aspx?scid=kb;en-us;909455</A></P>]]>
							</description>
							<category>Tip</category>
							<pubDate>Tue, 08 Nov 2005 08:42:04 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=26</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=26</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=26</trackback:ping>
					   </item><item>
							<title><![CDATA[Hidden fields in document libraries, document identifiers and Office documents]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=25</link> 
							<description>
								<![CDATA[<P>As appendix to my current post yesterday I have investigated how hidden fields can be used within Office documents in order to generate a document identifier. <STRONG>This post is a result of a Proof-of-Concept conducted so code examples and concept is done on a sketch level&nbsp;as a personal reminder</STRONG>. All file references in this post is within a DOCLIB directory if nothing else is specified.</P>
<P>If you specify a hidden field in SCHEMA.XML for a given document library like:</P>
<DIV class=CodeSection>&lt;Field Type="Text" Name="DocID" ShowInNewForm="False" ShowInEditForm="False" DisplayName="ID" Hidden="True" Sealed="True"/&gt;</DIV>
<P>Now – why should one require to have "hidden" and "sealed" fields within a document library definition? In order to implement document identifiers generated by an external source you could use a hidden and sealed field in order to store the data, in that way making it impossible for end-users to apply data in the field. Then make a calculated field definition in order to present the actual ID in views:</P>
<DIV class=CodeSection>&lt;Field Type="Computed" ReadOnly="TRUE" Name="DocIDCalculated" DisplayName="DocID" TextOnly="TRUE" AuthoringInfo="(Document Identifier)" &gt; <BR>&nbsp;&nbsp;&nbsp; &lt;FieldRefs&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;FieldRef Name="DocID"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/FieldRefs&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;DisplayPattern&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Field Name="DocID" /&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/DisplayPattern&gt;<BR>&lt;/Field&gt;</DIV>
<P>The above definition will define a DocID-column available in views. The actual value is presented within the DocID field which I now show how to assign values. In our case we would like another system to generate the document identifier.</P>
<P>I assume a document lifecycle starting with new documents by the user clicking "new document" within&nbsp;a document library in SharePoint. When the user saves the document – nothing happens by default; there is a flaw in standard sharepoint functionality where hidden fields with default values are not assigned values in this work-cycle, if you use the "edit properties" action inside document libraries – it works as expected.</P>
<P>You would need to add a small amount of code into the EDITDLG.HTM in order to have it assign and save a document identifier.</P>
<P>Override the checkScroll() function with the following snippet:</P>
<DIV class=CodeSection>
<P>function checkScroll()<BR>{<BR>&nbsp;&nbsp;if (document.body.scrollHeight &gt; document.body.offsetHeight ||<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.body.scrollWidth &gt; document.body.offsetWidth)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.body.scroll="yes";</P>
<P>&nbsp; // dynamically add hidden field value to properties...<BR>&nbsp; var form = document.getElementById("OWSForm");<BR>&nbsp; var docID = "not assigned";</P>
<P>&nbsp; try {<BR>&nbsp;&nbsp;&nbsp; var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");<BR>&nbsp;&nbsp;&nbsp; // example:<BR>&nbsp;&nbsp;&nbsp; // action=http://portal/cases/casetype/casesite/_vti_bin/owssvr.dll?CS=109<BR><BR>&nbsp;&nbsp;&nbsp; var siteUrl = form.action.replace("/_vti_bin/owssvr.dll?CS=109","");<BR>&nbsp;&nbsp;&nbsp; xmlhttp.Open("POST", caseSiteUrl + "/_layouts/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;%=System.Threading.Thread.CurrentThread.CurrentUICulture.LCID%&gt;/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; docid.aspx", false);<BR>&nbsp;&nbsp;&nbsp; xmlhttp.Send();<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; docID = xmlhttp.ResponseText;<BR>&nbsp; }<BR>&nbsp; catch(e) {<BR>&nbsp;&nbsp;&nbsp; alert(e);<BR>&nbsp; }</P>
<P>&nbsp; var namefield = document.createElement("input");<BR>&nbsp; namefield.setAttribute("ID","onetidIOHidden");<BR>&nbsp; namefield.setAttribute("type", "hidden");<BR>&nbsp; namefield.setAttribute("name",&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;"urn:schemas-microsoft-com:office:office#DocID");<BR>&nbsp; namefield.setAttribute("value", docID);<BR>&nbsp; form.appendChild(namefield);<BR>}</P></DIV>
<P>Now in your document you should see a document identifier "DocID" which you can use within the document to include in footers or cover pages. </P>
<P class=imageleft align=right><IMG src="http://www.ekegren.dk/blog/pictures/blog/3fb0f0cd-4570-4397-9bf3-1a626e1475cedocid_screendump.gif"></P>
<DIV class=imageleft align=center><EM>The "DocID" field now is available as part of the document properties to include inside a document. If you implement a template picker which have the DocID field as part of the template this should work on different location as well. Otherwise the DocID field is not available until after the document has been saved.</EM></DIV>
<DIV class=imageleft align=center>&nbsp;</DIV>
<DIV class=imageleft>&nbsp;</DIV>
<P class=imageleft align=center><IMG src="http://www.ekegren.dk/blog/pictures/blog/cee678fc-78b9-4985-8634-64ed10bb36ebdocid_properties.gif"></P>
<DIV class=imageleft align=center><EM>The hidden DocID are not visible to the end-user and the web-file properties Office dialogue&nbsp;always call the docid.aspx when the document is saved (also when&nbsp;the dialogue is not&nbsp;shown).</EM></DIV>
<P>The above code would of course have to be implemented so a new document id isn't assigned each time the document is saved.<BR>The external page "docid.aspx" (which I placed&nbsp;in the layouts-folder) returns a document identifier (in my example just the current time – but it could be a database generating identifiers instead, the document URL could be posted to the aspx page having a separate register of documents with assigned identifiers).</P>
<P>In order to complete the entire cycle you would need to apply some javascript to the upload.aspx and editform.aspx pages being part of the doclib-template as well.</P>]]>
							</description>
							<category>Development</category>
							<pubDate>Mon, 07 Nov 2005 19:00:05 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=25</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=25</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=25</trackback:ping>
					   </item><item>
							<title><![CDATA[Utilising document meta-data properties within Office documents]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=24</link> 
							<description>
								<![CDATA[<P>With SharePoint you get a powerful document collaboration platform, and when you start to utilise the power of categorising documents with meta-data you define for document libraries you move towards a document management solution. Often people wish to have the meta-data present within the document itself.</P>
<P>Typically people define a "status" field as part of the document library properties. Now in combination with a pragmatic human workflow description for how writers should use the status field like:</P>
<DIV class=imageleft align=center><IMG src="http://www.ekegren.dk/blog/pictures/blog/d11ef2a7-4d23-4e31-b277-96d1d171a1afdocproperties_workflow.gif"><BR><EM>Create a workflow diagram to formalise document workflow and introduce it along with a SharePoint workspace. Include steps which tells the user when to update status on the document to have consensus&nbsp;around the pragmatic workflow.</EM></DIV>
<P>you formalise the way to work with documents within your SharePoint solution (which I think is needed in order to really utilise SharePoint, a workflow diagram as part of a project model might be a way to introduce SharePoint as a corporate tool for project execution).</P>
<P>Using this information within the documents is often crucial in order to complete the link between information present in the document library views and documents.</P>
<P>It is quite easy to obtain this:</P>
<OL>
<LI>Just reference the document properties using the "insert &gt; field.." menu..<BR>
<DIV class=imageleft id=image4><IMG src="http://www.ekegren.dk/blog/pictures/blog/c9ff19dd-9537-4e68-b8af-1661ab538767docproperties_field.gif"><BR></DIV></LI>
<LI>
<DIV class=imageleft>Find the requested property within the "Document Information" &gt; "DocProperty" section.<BR><BR>
<DIV class=imageleft id=image3><IMG src="http://www.ekegren.dk/blog/pictures/blog/297231da-b656-4475-a876-93d8cae50e8cdocproperties_DocProperty.gif"><BR><EM>The listed field properties in this section are available when the document have been saved inside the document library. When creating document templates reference expected fields.<BR></EM></DIV></DIV></LI>
<LI>
<DIV class=imageleft>In order to have it update automatically upon document load you need a macro within the document – otherwise fields throughout the document won't get updated before you right-click the field reference and select "update field". Include a macro in the document template which updates references automatically when the document is loaded:<BR><BR>
<DIV class=imageleft id=image2><IMG src="http://www.ekegren.dk/blog/pictures/blog/27683281-ddc0-455d-8202-cb5c70993f00docproperties_macro.gif"><BR>Use the <STRONG>ThisDocument.Fields.Update</STRONG> method in order to update fields when the document is loaded.</DIV></DIV></LI></OL>]]>
							</description>
							<category>Tip</category>
							<pubDate>Sun, 06 Nov 2005 14:45:51 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=24</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=24</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=24</trackback:ping>
					   </item><item>
							<title><![CDATA[Great new feature with SharePoint SP2!]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=23</link> 
							<description>
								<![CDATA[<P>Well we all had problems with usernames/accounts that didn't work with SharePoint. This occurs&nbsp;if the user have been migrated from a different (sub)domain&nbsp;or deleted and then created again with the same username. This was due to the "SID problem" in which SharePoint keeps the SID of the user in the database and don't updates it when users are re-added to SharePoint.<BR>&nbsp;<BR>There are numerous posts about this problem and a solution suggested by Dustin Miller <A href="http://www.sharepointblogs.com/dustin/archive/2004/09/10/756.aspx">http://www.sharepointblogs.com/dustin/archive/2004/09/10/756.aspx</A> is known to be quite an elegant fix. </P>
<P>Now it seems that Microsoft have recognised the problem and helped us by including a new class in the SharePoint API with the <A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/cPortalAccountMigrationManager_SV01187833.asp">PortalAccountMigrationManager class</A> for account migration. I haven't tested the method yet – but it seems very promising and the answer to my prayers!<BR></P>]]>
							</description>
							<category>Development</category>
							<pubDate>Sun, 30 Oct 2005 21:58:02 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=23</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=23</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=23</trackback:ping>
					   </item><item>
							<title><![CDATA[Howto: Move list templates to other portal areas]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=10</link> 
							<description>
								<![CDATA[<P>A&nbsp;lot of users are quite confused about list templates in SharePoint Portal Server. When building a template and saving it as a template, it is not able to be used on portal areas build with other portal area templates, than the one in which the template was build and saved.</P>
<P>Example: a user builds a document library on a topic area and saves this document library as a template. Next step the user wish to create a new document library on a news area using this very same template which he just saved. He can't do that. He can navigate to another topic area in the portal - and inside this area he can create a new document library using the template. As it is not always clear to the end-user which template that have been used to create the area some confusion occur.</P>
<P>What to do? This actually means, that the user has to build the same document library in the news area and then save the template again, before being able to use it on areas of that type.</P>
<P>I dug into this problem and actually found a way to copy the list template from one area template to another. It's not a task for the normal user – but you as an administrator or developer should be able to follow these steps:</P>
<OL>
<LI>Navigate to the list template gallery of the portal (Site Settings &gt; Manage security and additional settings &gt; Manage list template gallery) 
<LI>Download the stp-file which SharePoint have saved in the gallery (in this illustrated example – doclib6.stp) 
<LI>Rename the file to doclib6.cab<BR>
<P class=imageleft align=center><IMG src="http://www.ekegren.dk/blog/pictures/blog/5e0fe3b1-f07e-42d3-a181-eb280c9ba0f5movetemplate_contentsofstp.gif"></P>
<LI>Extract the files to a folder e.g. C:\doclib6 
<LI>You can now see the contents of the template – in my example it is a document library with two files (saved the document library as a template with content).<BR>
<P class=imageleft align=center><IMG src="http://www.ekegren.dk/blog/pictures/blog/0c87c9a4-9a09-4bd0-9a06-9d15251c7d6fmovetemplate_editmanifest.gif"></P>
<LI>In order to enable it to be used in another area template you need to modify the <STRONG>TemplateID</STRONG> node of the manifest.xml file<BR>
<P class=imageleft align=center><IMG src="http://www.ekegren.dk/blog/pictures/blog/a8fdc165-6d04-4fd2-88e0-b398908127ddmovetemplate_manifest_xml.gif"></P>
<DIV class=imageleft align=center><EM>The section highlighted with filename1.txt and filename2.log are the files which where included in the document library as content. The "by status.aspx" file is a custom view made in the document library.<BR></EM><BR></DIV>
<LI>Change it to the ID of the area template (to see which ID's which is applicable find the C:\Program Files\Common Files\Microsoft Shared\Web server extensions\60\TEMPLATE\1033\XML\WEBTEMPSPS.xml) 
<LI>In my example the manifest.xml have a reference to the SPSNEWS (news area template) with ID <STRONG>32</STRONG>, I change this to <STRONG>33</STRONG> as I wish to use the list template on the SPSNHOME (news home template). 
<LI>Now you need to make a new stp-file. The CAB-SDK (<A href="http://support.microsoft.com/default.aspx?scid=KB;en-us;310618">http://support.microsoft.com/default.aspx?scid=KB;en-us;310618</A>) includes a utility to build cab files so you need to use the <STRONG>cabarc.exe</STRONG> programme to make a stp-file. Apply the LZX compressing algorithm as the MSZIP do not work with SharePoint (if you build a cabinet using the ZIP-algorithm the list template does not display the title of your list template).<BR>
<P class=imageleft align=center><IMG src="http://www.ekegren.dk/blog/pictures/blog/0e1c73b4-c0dc-43e6-814d-cb39d8af25bcmovetemplate_cabarc.gif"><BR></P>
<LI>Upload the new stp-file (doclib10.stp in illustrated example) to the list template gallery 
<LI>Navigate to the portal area where you expect the list template to be available – and *tada* it is possible to create a new list/document library using your migrated template</LI></OL>]]>
							</description>
							<category>Howto</category>
							<pubDate>Sat, 29 Oct 2005 01:14:26 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=10</comments>
							<slash:comments>3</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=10</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=10</trackback:ping>
					   </item><item>
							<title><![CDATA[Howto: restore a portal site from one SharePoint farm to another SharePoint farm]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=9</link> 
							<description>
								<![CDATA[<P>The backup/restore tool for SharePoint Portal Server 2003 doesn't always perform as expected. It's very difficult to investigate want went wrong when trying to restore a backup. Moving from one farm to another isn't an easy task as well.</P>
<P>When people build their SharePoint infrastructure I usually recommend to have a test environment where to test the effect of service packs and custom made webparts, templates and controls.<BR>After going into production and having build a huge portal IT-staff usually wishes to have the same content on the test environment.</P>
<P>This can be a somewhat challenging task as some IT personal does not have all the skills which the SharePoint platform actually requires for supporting full service of the installation. Spanning skills within SQL-server, Active Directory and some knowledge of .NET it can be a heavy task for the traditional IT supporter which have skills within a single area of responsibility.</P>
<P>I wrote this guide in order to move production data (source) to a test environment (destination) using SQL server backup/restore procedures and the SharePoint Central Administration site.</P>
<ol>
<LI>Start Enterprise Manager on source SQL server 
<LI>Perform a full SQL backup of the "_SITE", "_PROF" and "_SERV" databases 
<ol>
<LI>Rightclick each database 
<LI>Select "All tasks > Backup database.." 
<LI>Select "database complete" 
<LI>Add a file location (directory and beginning of filename) 
<LI>Execute backup by clicking "OK" 
</ol>
<LI>Copy the 3 files onto the disk of the <EM>destination</EM> SQL Server 
<LI>Start Enterprise Manager on destination SQL server 
<LI>Create three databases named "_SITE", "_PROF" and "_SERV" accordingly 
<LI>Ensure that the SharePoint database user is added as "dbo" on each of the databases 
<ol>
<LI>Expand each database 
<LI>Right click "Users" 
<LI>Select "New database user" 
<LI>Select the SharePoint database user from the login dropdown list 
<LI>Grant the "db_owner" right 
<LI>Click "ok" 
</ol>
<LI>Restore each database from the copy 
<ol>
<LI>Rightclick each database 
<LI>Select "All tasks > Restore database.." 
<LI>Select "From device" 
<LI>Click "Select devices" 
<LI>Find the corresponding database backup file which where copied in step 3 
<LI>Switch to the options tab 
<LI>Click "Force restore over existing database" 
<LI>Click "OK"
</ol>
<LI>Ensure that custom templates are copied into the TEMPLATE directory - run "iisreset"
<LI>Enter SharePoint Central Administration 
<LI>Click "Create a portal" 
<LI>Select "Restore a portal" 
<LI>Enter the names of the databases accordingly 
<ul>
<LI>Site database = "_SITE" 
<LI>Profile database = "_PROF" 
<LI>Services database = "_SERV" 
</ul>
<LI>Select an unextended virtual server 
<LI>Click "OK" 
<LI>The progress bar now displays the construction progress 
<LI>Click "OK" 
<LI>Visit your restored portal 
<LI>Reinstall custom webparts and webcontrols using deployment scripts or stsadm.exe tool
</ol>]]>
							</description>
							<category>Howto</category>
							<pubDate>Wed, 26 Oct 2005 17:44:11 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=9</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=9</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=9</trackback:ping>
					   </item><item>
							<title><![CDATA[ASPNET2.0 and SharePoint]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=8</link> 
							<description>
								<![CDATA[<P>With the release of <A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9c552114-dc9a-43ee-9281-b080b7c280b4&amp;DisplayLang=en">WSS SP2</A>&nbsp;you now have the possibility to move your Windows SharePoint Services development to the ASPNET 2.0 platform.</P>
<P>I was actually going to talk about this at a conference in Denmark but it got cancelled due to lack of participants... While preparing for the talk in September (using <A href="http://www.microsoft.com/windowsserver2003/R2/overview/default.mspx">Windows R2 beta</A>) I got the opportunity to investigate how the ASPNET 2.0 could be utilised within SharePoint. I was going to suggest some development strategies for those who build SharePoint solutions today and wish to prepare for the next wave of SharePoint in Office "12" which will be build upon ASPNET2.0.</P>
<P><STRONG>Wrapping ASPNET2.0 controls inside SharePoint Controls?</STRONG><BR>I created a proof of concept in which I wrapped some ASPNET2.0 controls using the new ASPNET2.0 build-in menucontrol, in a SharePoint webpart. It is really no big deal – it´s just to construct a new webcontrol object and add it to the SharePoint webpart controls collection in the OnInit-function:</P>
<DIV class=CodeSection>// WSSMenuControl is a webcontrol written in ASPNET2.0 <BR>menu = new WSSMenuControl();<BR>Controls.Add(menu);</DIV>
<P>However - see the end of this post that you need to configure the virtual server of WSS in order to have a successfull implementation.<BR><BR>The interesting part of it was to investigate whether or not that I could use the ASPNET2.0 control in the new ASPNET2.0 webpart framework and also use it within SharePoint inside a wrapper webpart maintaining connectivity between the webparts (connected webparts).</P>
<P>On the beta - I couldn´t get anything other than a WebControl to work successfully in both scenarios. When including a UserControl (build as 100% code behind and registered to the GAC) inside a web part zone the ASPNET2.0 framework returned an error:</P>
<P align=center><EM>The "path" argument cannot be empty if the "type" argument is UserControl.</EM></P>
<P>As coding the control exclusively as code, not using the "ascx" part of the UserControl - the switch to WebControl wasn´t more difficult than changing the inheritance in the namespace declaration, therefore beware of which type of controls you use when trying this dual-support of the webpart technology.</P>
<P><STRONG>The proof of concept<BR></STRONG>In order to test what could be achieved I created two webcontrols:<BR><BR>- a list-menu, enumerating the lists of a SPWeb inside a ASPNET2.0 menu-control<BR>- a list-viewer using the build-in SharePoint ListView Control.</P>
<P>The controls should inserted and connected in the ASPNET2.0 page framework. Inorder to support connected webparts in ASPNET2.0 you need to implement an interface (in this case: IListGuid) which is used to parse which list the list viewer control should render from the menu:</P>
<DIV class=CodeSection>
<P>public Guid SelectedListGuid<BR>{<BR>&nbsp;&nbsp;&nbsp; get {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return listID;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;set {<BR>// needed in order to make bridge from SharePoint webpart framework &lt;-&gt; ASPNET2.0<BR>// and&nbsp;expose this property to the web part connection framework within sharepoint<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listID = value;<BR>&nbsp;&nbsp;&nbsp; }<BR>}</P></DIV>
<P>The list viewer webcontrol defines a connection consumer:</P>
<DIV class=CodeSection>
<P>IListGuid _listGuid;<BR><BR>[ConnectionConsumer("List Guid", "ListGuidConsumer")]<BR>public void GetInterface(IListGuid provider) {<BR>&nbsp;&nbsp;&nbsp; _listGuid = provider;<BR>}</P></DIV>
<P>The menu webcontrol defines a connection provider:</P>
<DIV class=CodeSection>// connections to consume - ASPNET2.0 webpart connections<BR>[ConnectionProvider("ListGuid", "ListGuidProvider")]<BR>Public IListGuid ProvideInterface() {<BR>&nbsp;&nbsp;&nbsp; return this;<BR>}</DIV>
<P><STRONG>Connectivity in both a&nbsp;ASPNET2.0 page and&nbsp;WSS?</STRONG><BR>When placing both webcontrols on a ASPNET2.0 page using the webpart-manager and webpart zone framework, the two webcontrols can be connected either by dynamic or static defined connections. For my example I used the static connections:</P>
<DIV class=CodeSection>&lt;asp:WebPartManager runat="server" ID="PageManager" OnAuthorizeWebPart="PageManager_AuthorizeWebPart" OnWebPartAdded="PageManager_WebPartAdded" OnWebPartAdding="PageManager_WebPartAdding"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;StaticConnections&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;asp:WebPartConnection ConsumerID="listview1" ProviderID="menu1" ID="connection1" ConsumerConnectionPointID="ListGuidConsumer" ProviderConnectionPointID="ListGuidProvider"&gt;&lt;/asp:WebPartConnection&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/StaticConnections&gt;<BR>&lt;/asp:WebPartManager&gt;</DIV>
<P>which I think is a very nice feature of the ASPNET2.0 framework - it would be nice if the same was possible inside SharePoint today, templates defined with "ONET.xml" could be ready to use (when containing webparts which should be connected).</P>
<P>In order to wrap the webcontrols (instance members named "listView" and "menu" in the snippets below) and proxy the interface to the SharePoint webpart connection methods, very little code was needed.</P>
<P>In the provider webpart – the IListGuid interface of the wrapped menu control was proxied inside the <A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/smpmWebPartPartCommunicationMain_SV01014961.asp">PartCommunicationMain</A> function where the RowReadyArgs are assigned the value from the menu IListGuid interface.</P>
<DIV class=CodeSection>public override void PartCommunicationMain() {<BR>&nbsp;&nbsp;&nbsp; if (_rowConnectedCount &gt; 0) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (RowReady != null) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RowReadyEventArgs rowReadyArgs = new RowReadyEventArgs();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (menu.SelectedListGuid != Guid.Empty) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // the selectedlistdatawrapper wraps the guid in a datarow array<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rowReadyArgs.Rows = SelectedListDataWrapper(menu.SelectedListGuid);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rowReadyArgs.SelectionStatus = "Standard";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataRow[] dr = new DataRow[1];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dr[0] = null;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rowReadyArgs.Rows = dr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rowReadyArgs.SelectionStatus = "None";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RowReady(this, rowReadyArgs);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>}</DIV>
<P>In the consumer webpart, containing the "listView" control implementing the IListGuid interface, the WSS-webpart connection methods, more specifically the RowReady function of the SharePoint webpart, is mapped to receive the transferred value from the transferred RowReadyEventArgs object.<BR><BR>In ASPNET2.0 the webpart framework automatically connects the interfaces using the consumer/provider attributes controlled by the webpart manager, but in SharePoint we need to tie the connection -&nbsp;more specifically in the RowReady function in the consuming webpart:</P>
<DIV class=CodeSection>
<P>public void RowReady(object sender, RowReadyEventArgs rowReadyEventArgs) {<BR>&nbsp;&nbsp;&nbsp; if (rowReadyEventArgs.Rows != null) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (rowReadyEventArgs.Rows[0] != null) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt;= rowReadyEventArgs.Rows.GetUpperBound(0); i++) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SelectedListGuid = rowReadyEventArgs.Rows[i]["SelectedListGuid"].ToString();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listView.SelectedListGuid = new Guid(SelectedListGuid);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>}</P></DIV>
<P>If the controls only where to be used within ASPNET2.0 the IListGuid-interface didn´t need to have the "set" parameter specified, but it is needed by the proxy RowReady function in the SharePoint consumer webpart.</P>
<P>All could be constructed by the provider and interface internally inside the controls. I know there are initiatives out there in order to construct a new "SmartPart" (<A href="http://weblogs.asp.net/jan/archive/2005/09/14/425192.aspx">http://weblogs.asp.net/jan/archive/2005/09/14/425192.aspx</A>)&nbsp; which should do the above automatically(?) but I really do not think there is so much to it, and you should be able to code your ASPNET2.0 controls and simply wrap them in "proxy" webparts. </P>
<P><STRONG>Configuration of WSS in order to support ASPNET2.0</STRONG><BR>Some final notes about the development on the beta:</P>
<LI>
<DIV>You need to add some "managed paths" to the WSS virtual server in order to utilise the ASPNET2.0 built-in controls (the IIS need to server some javascript resources for the user-interface of the controls), so add "<EM>webresource.axd</EM>" as an&nbsp;excluded path.</DIV>
<LI>
<DIV>You switch the ASPNET version of the WSS-virtual server to ASPNET2.0</DIV>
<LI>
<DIV>The web.config of the WSS virtual server needs the addition of some elements: <BR><BR>&lt;namespaces&gt;<BR>&lt;remove namespace="System.Web.UI.WebControls.WebParts"/&gt;<BR>&lt;/namespaces&gt;<BR><BR>and your need to change the trust-level for "processRequestInApplicationTrust": <BR><BR>&lt;trust level="WSS_Minimal" originUrl="" processRequestInApplicationTrust="false" /&gt;<BR></DIV>
<LI>
<DIV>The stsadm.exe could not register the webparts:<BR><BR>
<DIV class=imageleft id=image4><IMG src="http://www.ekegren.dk/blog/pictures/blog/120234fb-1402-4eec-947e-d5a14afe8f5acommandprompt_notcompatible.gif"><BR><BR>but you can add the "safecontrols"-tags manually to web.config. I recently saw a post (<A href="http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=197">http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=197</A>) by Maurice Prather that the "stsadm.exe.config" file should support additional version tags to enable installation for those versions, but this did not work in the beta.</DIV></DIV>
<P>
<DIV class=imageleft><STRONG>Development strategy</STRONG></DIV>
<DIV class=imageleft>It all depends on your development strategies but you should be able to develop ASPNET2.0 webparts already now -&nbsp;since it technically can be done, if you apply the latest service packs. Your development strategy for the current SharePoint platform could very well be like this:</DIV>
<DIV class=imageleft>&nbsp;</DIV>
<P></P>
<DIV class=imageleft>
<P class=imagecenter align=center><IMG src="http://www.ekegren.dk/blog/pictures/blog/e718fdff-0f26-4056-9f50-fdfdd747b22ddevelopmentstrategy.gif"></P>
<DIV class=imagecenter>&nbsp;</DIV></DIV>
<P>
<DIV class=imageleft>&nbsp;</DIV>
<DIV class=imageleft>The recent availablity of the <A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=171dc9a7-b4ba-4759-bd64-6b7d851a97ef&amp;DisplayLang=en">SPS SP2</A>&nbsp;does not&nbsp;support ASPNET2.0 so the sceanario is only applicable for Windows SharePoint Services.</DIV>
<DIV class=imageleft><BR>&nbsp;</DIV>
<P></P></LI>]]>
							</description>
							<category>Development</category>
							<pubDate>Sat, 22 Oct 2005 18:23:18 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=8</comments>
							<slash:comments>2</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=8</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=8</trackback:ping>
					   </item><item>
							<title><![CDATA[Those styles, those styles..]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=7</link> 
							<description>
								<![CDATA[<P>I always seem to need a tool for investigating the DOM and stylesheet. I discovered the <A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;displaylang=en">IE Developer Toolbar</A> which I think every (web) developer should install and take usage of...</P>
<DIV class=imageleft id=image4><IMG src="http://www.ekegren.dk/blog/pictures/blog/6d492321-2e35-4d7c-b070-8f08d742ecb7IEdevtoolbar.gif"><BR></DIV>]]>
							</description>
							<category>Tip</category>
							<pubDate>Sat, 22 Oct 2005 15:56:12 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=7</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=7</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=7</trackback:ping>
					   </item><item>
							<title><![CDATA[The secret of the SharePoint topology]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=6</link> 
							<description>
								<![CDATA[<P>If you read microsoft articles about&nbsp;the architecture of SharePoint,&nbsp;you know that they reference different scenarios for putting together a SharePoint Portal Server topology,&nbsp;however&nbsp;the descriptions&nbsp;should be read&nbsp;with care and&nbsp;is&nbsp;not accurate&nbsp;in some cases (for instance you can't create a SharePoint installation with 4 servers(!)).&nbsp;<BR><BR>I have put together&nbsp;the table below when I consult about the number of servers for use in a SharePoint installation.</P>
<P>
<TABLE dir=ltr height=192 cellSpacing=0 cellPadding=0 width=397>
<TBODY>
<TR>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=83 height=32>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana"><STRONG>No of servers</STRONG></SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=32>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana"><STRONG>Web</STRONG></SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=32>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana"><STRONG>Search</STRONG></SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=32>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana"><STRONG>Index</STRONG></SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=32>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana"><STRONG>Job</STRONG></SPAN></DIV></TD></TR>
<TR>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=83 height=20>
<DIV style="TEXT-ALIGN: right; mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">1&nbsp;</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a</SPAN></DIV></TD></TR>
<TR>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=83 height=20>
<DIV style="TEXT-ALIGN: right; mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">2&nbsp;</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">b</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">b</SPAN></DIV></TD></TR>
<TR>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=83 height=20>
<DIV style="TEXT-ALIGN: right; mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">3&nbsp; </SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a,b</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a,b</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">c</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">c</SPAN></DIV></TD></TR>
<TR>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=83 height=20>
<DIV style="TEXT-ALIGN: right; mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">4&nbsp; </SPAN></DIV></TD>
<TD style="BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=315 colSpan=4 height=20>
<DIV style="TEXT-ALIGN: center; mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">- A SPS farm can't consist of 4 servers- </SPAN></DIV></TD></TR>
<TR>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=83 height=20>
<DIV style="TEXT-ALIGN: right; mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">5&nbsp; </SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a,b,c</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">d,e</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">d,e</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">d</SPAN></DIV></TD></TR>
<TR>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=83 height=20>
<DIV style="TEXT-ALIGN: right; mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">6&nbsp; </SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a,b</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">d,e</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">f</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">f</SPAN></DIV></TD></TR>
<TR>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=83 height=20>
<DIV style="TEXT-ALIGN: right; mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">7&nbsp; </SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">a,b,c</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">d,e</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">f,g</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=20>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">g</SPAN></DIV></TD></TR>
<TR>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=83 height=25>
<DIV style="TEXT-ALIGN: right; mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">8 - 17&nbsp; </SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=25>
<DIV style="mso-margin-left-alt: 216; mso-vertical-align-special: bottom" align=center><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">2 - 8</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=25>
<DIV style="mso-line-spacing: '100 20 0'" align=center><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">Max 4</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=25>
<DIV style="mso-line-spacing: '100 20 0'" align=center><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">Max 4</SPAN></DIV></TD>
<TD style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" width=79 height=25>
<DIV style="mso-line-spacing: '100 20 0'" align=center><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-hansi-font-family: Verdana; mso-ascii-font-family: Verdana">1</SPAN></DIV></TD></TR></TBODY></TABLE></P>
<P>Each letter in the schema represents a physical server.</P>]]>
							</description>
							<category>Architecture</category>
							<pubDate>Tue, 18 Oct 2005 22:36:30 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=6</comments>
							<slash:comments>0</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=6</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=6</trackback:ping>
					   </item><item>
							<title><![CDATA[The gem of SPWeb - ProcessBatchData]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=4</link> 
							<description>
								<![CDATA[<P>I don"t know how many times I"ve come short with the SharePoint OM. There is always some small part which the API doesn’t cover and you are stuck. You probably have found many clues in the SDK referencing the Frontpage RPC calls. Going this way leads to the construction of posts against the SharePoint dll’s like “ows.dll”, “owssvr.dll” specifying methods in the URL as query parameters. Not many like to go this way – unless you have a powerful API or class library wrapping these posts.</P>
<P>The good news is: you don’t have to. Of course – you still need the FRPC calls for some operations but several of them can be completed in a much more “clean” way using the ProcessBatchData method of the SPWeb object. I haven’t seen many people using it – maybe because they don’t have to in their solutions?</P>
<P>I recently had to implement a way to programmatically change the field order in document libraries&nbsp; (<A href="http://msdn.microsoft.com/library/en-us/spptsdk/html/SPPTWSSRPC_SV01072919.asp">http://msdn.microsoft.com/library/en-us/spptsdk/html/SPPTWSSRPC_SV01072919.asp</A>). The API do not tell you exactly how to do this – but digging&nbsp; through a few of the described methods of the SPWeb revealed the ProcessBatchData method. </P>
<P>It wasn’t straightforward just to use it – you really have to know SharePoint in order to successfully utilise this method – you need to understand some of the CAML specification for lists and you need to know that SharePoint updates the version number of a list everytime you push the update button or update it programmatically.</P>
<P>The version is very important to remember otherwise you’ll get an error message like” the list have been updated by another use – click back in the browser to refresh your changes” or something like that.</P>
<P>I constructed a small function which are able to reorder the fields programmatically:</P>
<DIV class=CodeSection>
<P>/// &lt;summary&gt;<BR>/// This function reorders the fields in the specified list programmatically as specified by the xmlFieldsOrdered parameter<BR>/// &lt;/summary&gt;<BR>/// &lt;param name="web"&gt;The SPWeb object containing the list&lt;/param&gt;<BR>/// &lt;param name="list"&gt;The SPList object to update&lt;/param&gt;<BR>/// &lt;param name="xmlFieldsOrdered"&gt;A string in XML-format specifying the field order by the location within a xml-tree&lt;/param&gt;</P>
<P>static void ReorderFields(SPWeb web, SPList list, string xmlFieldsOrdered)&nbsp;<BR>{<BR>&nbsp;&nbsp;&nbsp; try&nbsp;{<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;string fpRPCMethod = @"&lt;?xml version=""1.0"" encoding=""UTF-8""?&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Method ID=""0,REORDERFIELDS""&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SetList Scope=""Request""&gt;{0}&lt;/SetList&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SetVar Name=""Cmd""&gt;REORDERFIELDS&lt;/SetVar&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SetVar Name=""ReorderedFields""&gt;{1}&lt;/SetVar&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SetVar Name=""owshiddenversion""&gt;{2}&lt;/SetVar&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Method&gt;";</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // relookup list version in order to be able to update it<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;list = web.Lists[list.ID];</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int currentVersion = list.Version;</P>
<P>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;string version = currentVersion.ToString();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string RPCCall = String.Format(fpRPCMethod, list.ID, xmlFieldsOrdered.Replace("&lt;","&amp;lt;").Replace("&gt;","&amp;gt;").Replace("\"","&amp;quot;"), version);<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;web.AllowUnsafeUpdates = true;</P>
<P>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(web.ProcessBatchData(RPCCall));<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; catch (System.Net.WebException err) <BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("Warning:" + err.Message);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}</P></DIV>
<P>The parameter “xmlFieldsOrdered” should be organised in a xml-tree like:</P>
<DIV class=CodeSection>&lt;Fields&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;Field Name="InternalName1"/&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;Field Name="InternalName2"/&gt;<BR>&lt;/Fields&gt;</DIV>
<P>Hope you’ll find this tip usefull!<BR></P>]]>
							</description>
							<category>Code snippet</category>
							<pubDate>Mon, 17 Oct 2005 18:35:13 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=4</comments>
							<slash:comments>6</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=4</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=4</trackback:ping>
					   </item><item>
							<title><![CDATA[blog.ekegren kickoff]]></title> 
							<link>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=3</link> 
							<description>
								<![CDATA[<P>Returned from <A href="http://msdn.microsoft.com/events/pdc">PDC05</A> enlighted, inspirred and ready to blog! My name is Michael and I'm going to dedicate this blog to thoughts &amp; findings&nbsp;within the SharePoint product and technologies platform. Being a consultant working with SharePoint since 2001&nbsp;I have created numerous portals and solutions on the SharePoint platform, meet many customers and fellow consultants and programmers with questions about how to twist the SharePoint platform to meet their specific needs. Its time to share - its time to meet many more people working within the SharePoint platform and the purpose with this blog is to take the technology and community a step further.</P>
<P>I hope to get in contact with so many people as possible. Please contact me using the contact form and post questions and other aspects you would like to discuss.</P>
<P>Welcome to my blog<BR>-Michael</P>]]>
							</description>
							<category>General</category>
							<pubDate>Sun, 16 Oct 2005 17:02:41 GMT</pubDate>
							<comments>http://www.ekegren.dk/blog/AddBlogComment.aspx?id=3</comments>
							<slash:comments>2</slash:comments>
							<wfw:commentRss>http://www.ekegren.dk/blog/commentRss.aspx?id=3</wfw:commentRss>
							<trackback:ping>http://www.ekegren.dk/blog/trackback.aspx?id=3</trackback:ping>
					   </item></channel></rss>