<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="RSSFeed.xsl"?>
<rss version="2.0">
     <channel>
          <title>Rob Nowiks SharePoint Blog</title>
          <description>Rob Nowiks SharePoint Blog</description>
          <link>http://rnowik.com</link>
          <lastBuildDate>11/03/2010 01:18:48</lastBuildDate>
          <generator>Rob Nowiks Blog</generator>
          <item>
               <title>MOSS 2007 / WSS 3 &amp;ndash; Configuring Reporting Services</title>
               <description>&lt;p&gt;Just blogging a link to this great set of articles.. .&lt;/p&gt;  &lt;p&gt;&lt;a title="http://mosshowto.blogspot.com/2009/01/sharepoint-report-server-2008.html" href="http://mosshowto.blogspot.com/2009/01/sharepoint-report-server-2008.html"&gt;http://mosshowto.blogspot.com/2009/01/sharepoint-report-server-2008.html&lt;/a&gt;&lt;/p&gt;</description>
               <link>http://rnowik.com/MOSS-2007-WSS-3-ndash-Configuring-Reporting-Services.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>28/01/2010 18:37:33</pubDate>
          </item>
          <item>
               <title>Sharepoint: FormField Control</title>
               <description>&lt;p&gt;Just discovered this control the other day. It renders sharepoint field types (and custom field types) as they would appear on a sharepoint form. All you need to pass to it it the id of a list and field name.It can also be used generate a form element in edit mode (i,e. with values populated). &lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;using (var site = new SPSite(&amp;quot;&lt;/font&gt;&lt;a href="http://mywebsite&amp;quot;))"&gt;&lt;font size="1" face="Courier New"&gt;http://mywebsite&amp;quot;))&lt;/font&gt;&lt;/a&gt;    &lt;br /&gt;&lt;font size="1" face="Courier New"&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; using (var web = site.OpenWeb())      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var list = web.Lists[this.ListName]; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach (SPField field in list.Fields)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (field.FieldRenderingControl != null &amp;amp;&amp;amp;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; !field.Hidden &amp;amp;&amp;amp; !field.ReadOnlyField &amp;amp;&amp;amp;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; field.Type != SPFieldType.Attachments)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var currentField = new FormField();      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; currentField.ListId = list.ID;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; currentField.FieldName = field.InternalName;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; currentField.ID = &amp;quot;Control_&amp;quot; + field.InternalName;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; currentField.ControlMode = SPControlMode.New;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.Controls.Add(currentField);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;See this article for a longer explanation / more code!&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.fivenumber.com/sharepoint-list-form-generator/" href="http://www.fivenumber.com/sharepoint-list-form-generator/"&gt;http://www.fivenumber.com/sharepoint-list-form-generator/&lt;/a&gt;&lt;/p&gt;</description>
               <link>http://rnowik.com/Sharepoint-FormField-Control.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>09/11/2009 20:27:49</pubDate>
          </item>
          <item>
               <title>WSPBuilder: Ensure that GAC&amp;rsquo;d assemblies are always added to wsp</title>
               <description>&lt;p&gt;GAC’d assemblies are not always included in a wsp build by wspbuilder. See &lt;/p&gt;  &lt;p&gt;&lt;a title="http://wspbuilder.codeplex.com/Thread/View.aspx?ThreadId=22446" href="http://wspbuilder.codeplex.com/Thread/View.aspx?ThreadId=22446"&gt;http://wspbuilder.codeplex.com/Thread/View.aspx?ThreadId=22446&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;To counteract this, add the following post build events &lt;/p&gt;  &lt;p&gt;ATTRIB -R &amp;quot;$(SolutionDir)[FolderContainingFeatureProject]\GAC\&amp;quot;&amp;#160; /S /D    &lt;br /&gt;COPY &amp;quot;$(TargetPath)&amp;quot; &amp;quot;$(SolutionDir) [FolderContainingFeatureProject] \GAC\&amp;quot; /Y &lt;/p&gt;</description>
               <link>http://rnowik.com/WSPBuilder-Ensure-that-GAC-rsquo-d-assemblies-are-always-added-to-wsp.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>09/11/2009 20:09:29</pubDate>
          </item>
          <item>
               <title>Using OM to access Lists in another web app / Random Notes</title>
               <description>&lt;p&gt;I had to access a list on a SharePoint web app from another web app on the same farm using code, but experienced a sql exception. The app pool accounts had least privilege, but the accounts of the user had restricted reader rights to both web apps (and app pool account as i tried running with elevated privileges). It turns out that if your executing code against a web app outside of your current context, you need to have rights to the db on the server. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.krichie.com/2008/09/11/unrestricted-access-via-sharepoint-object-model-from-console-applications/"&gt;http://blog.krichie.com/2008/09/11/unrestricted-access-via-sharepoint-object-model-from-console-applications/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I ended up reading via webservices and converting to a datatable, similar to the following. &lt;/p&gt; &lt;a href="http://politechnosis.kataire.com/2008/09/reading-sharepoint-lists-into-adonet.html"&gt;http://politechnosis.kataire.com/2008/09/reading-sharepoint-lists-into-adonet.html&lt;/a&gt;  &lt;br /&gt;  &lt;p&gt;Unrelated, here is a good article on making web.config mods via a feature receiver. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/wesleybakker/archive/2009/01/21/web.config-modifications-with-a-sharepoint-feature.aspx"&gt;http://weblogs.asp.net/wesleybakker/archive/2009/01/21/web.config-modifications-with-a-sharepoint-feature.aspx&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Here is another unrelated article about group policy (something i never fully remember).   &lt;br /&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc732593(WS.10).aspx"&gt;http://technet.microsoft.com/en-us/library/cc732593(WS.10).aspx&lt;/a&gt;&lt;/p&gt;</description>
               <link>http://rnowik.com/Using-OM-to-access-Lists-in-another-web-app-Random-Notes.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>23/10/2009 19:36:02</pubDate>
          </item>
          <item>
               <title>C#: What threads are custom controls running in</title>
               <description>&lt;p&gt;Here’s a useful (well maybe) block of code to determine what thread controls are running in. &lt;/p&gt;  &lt;p&gt;Note that this code was placed in a base class (hence the 1s on the stack frame to show callers etc). &lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;protected override void CreateChildControls()     &lt;br /&gt;{      &lt;br /&gt;&amp;#160; var stack = new StackTrace();      &lt;br /&gt;&amp;#160; var message = string.Format(      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; CultureInfo.InvariantCulture,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;quot;THREAD ID: {0}, CLASSNAME: {1}, METHOD: {2}&amp;quot;,      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Thread.CurrentThread.ManagedThreadId,      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; stack.GetFrame(1).GetMethod().ReflectedType.FullName,      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; stack.GetFrame(1).GetMethod().Name);      &lt;br /&gt;&amp;#160; Debug.WriteLine(message);      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;</description>
               <link>http://rnowik.com/C-What-threads-are-custom-controls-running-in.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>13/10/2009 20:34:08</pubDate>
          </item>
          <item>
               <title>Quicknote: Design Considerations for using the SharePoint UserProfileManager</title>
               <description>&lt;p&gt;Just recording this link….&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.davehunter.co.uk/Blog/Lists/Posts/Post.aspx?List=f0e16a1a%2D6fa9%2D4130%2Dbcab%2Dbaeb97ccc4ff&amp;amp;ID=88" href="http://www.davehunter.co.uk/Blog/Lists/Posts/Post.aspx?List=f0e16a1a%2D6fa9%2D4130%2Dbcab%2Dbaeb97ccc4ff&amp;amp;ID=88"&gt;http://www.davehunter.co.uk/Blog/Lists/Posts/Post.aspx?List=f0e16a1a%2D6fa9%2D4130%2Dbcab%2Dbaeb97ccc4ff&amp;amp;ID=88&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Contains some useful points on userprofilemanager. &lt;/p&gt;</description>
               <link>http://rnowik.com/Quicknote-Design-Considerations-for-using-the-SharePoint-UserProfileManager.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>13/10/2009 20:27:42</pubDate>
          </item>
          <item>
               <title>Notes: My Current Workstation Configuration</title>
               <description>&lt;p&gt;I am running windows 7 as my main environment, however i have a need to run Windows Server 2008 R2 64-bit as well. In addition my Windows 7 environment needs to run Bitlocker. Virtual PC does not support 64-bit operating systems. &lt;/p&gt;  &lt;p&gt;The approach I took was to use the Boot to VHD feature of Windows 7 and run VHDs from a new partition on my main HD, (so bitlocker can still be enabled on my Windows 7 partition). I could have run traditional due boot from a partition, but in doing so would loose the benefits of easily being able to backup. &lt;/p&gt;  &lt;p&gt;Steps to do this were: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Launch “Computer Management”&lt;/li&gt;    &lt;li&gt;Select storage-&amp;gt;disk management&lt;/li&gt;    &lt;li&gt;Shrink the relevant drive to create space for the new partition&lt;/li&gt;    &lt;li&gt;Right click unallocated space (from shrink) and create a “New Simple Volume”. Make sure the file system for this is set to NTFS (note that Bitlocker must not be applied to this volume). &lt;/li&gt;    &lt;li&gt;Shut down windows and boot into Windows Server 2008 R2 DVD. &lt;/li&gt;    &lt;li&gt;At “install now” click the “repair your computer” option, don’t select a installation and select the command prompt (alternatively press shift + F10).&lt;/li&gt;    &lt;li&gt;At the command prompt run &lt;em&gt;Diskpart&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;Run &lt;em&gt;create vdisk file=”V:\server2008.vhd” type=”fixed” maximum=30000 &lt;/em&gt;(where V is the name of your partition).&lt;/li&gt;    &lt;li&gt;Run &lt;em&gt;select vdisk file=”V:\server2008.vhd”&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;Run &lt;em&gt;attach vdisk&lt;/em&gt;&amp;#160;&lt;/li&gt;    &lt;li&gt;Exit the console window and click x to close the dialog. &lt;/li&gt;    &lt;li&gt;Run through the Server 2008 installed and install to the newly created vhd (which will show as a partition). &lt;/li&gt;    &lt;li&gt;Once installed, you will now see the boot menu with both operating systems.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Note that when you want to delete / reattach VHDs use bcdedit as per &lt;a title="http://thelazyadmin.com/blogs/thelazyadmin/archive/2009/01/12/windows-7-boot-from-vhd.aspx" href="http://thelazyadmin.com/blogs/thelazyadmin/archive/2009/01/12/windows-7-boot-from-vhd.aspx"&gt;http://thelazyadmin.com/blogs/thelazyadmin/archive/2009/01/12/windows-7-boot-from-vhd.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Related links:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a title="http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx" href="http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx"&gt;http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a title="http://windows7news.com/2009/08/25/how-to-create-and-configure-a-vhd-in-windows-7/2/" href="http://windows7news.com/2009/08/25/how-to-create-and-configure-a-vhd-in-windows-7/2/"&gt;http://windows7news.com/2009/08/25/how-to-create-and-configure-a-vhd-in-windows-7/2/&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a title="http://blog.frankovic.net/2009/05/boot-win-2008-r2-rc-from-vhd/" href="http://blog.frankovic.net/2009/05/boot-win-2008-r2-rc-from-vhd/"&gt;http://blog.frankovic.net/2009/05/boot-win-2008-r2-rc-from-vhd/&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;</description>
               <link>http://rnowik.com/Notes-My-Current-Workstation-Configuration.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>02/10/2009 12:12:42</pubDate>
          </item>
          <item>
               <title>VS2008: Profiling a Web Application Using Sampling</title>
               <description>&lt;p&gt;In Visual Studio 2008, you can profile managed code using the Performance Tools that exists under the Analyze Menu. This allows you determine performance bottlenecks in code. There are two ways of doing this:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Sampling - measures program state by sampling certain metrics such as clock cycles on a periodic basis. &lt;/li&gt;    &lt;li&gt;Instrumentation - inserts additional code into your code &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This article discusses sampling. It is important to note that sampling can only be performed on a physical environment (i.e. not a VM).&amp;#160; &lt;/p&gt;  &lt;p&gt;To start profiling code, you must first enable collection of data using VSPerfCLREnv.cmd, typically located at&amp;#160; C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Performance Tools. To enable CPU profiling, I run the above batch file with the option /globalsampleon. This enables sampling (attaching) to managed services. You can also enabled /globalsamplegc to profile memory. SImply run VSPerfCLREnv.cmd with no parameters to get the full list of options. Once this has been set, you need to perform a reboot, or restart all process that use dot net (at least i think - w3wp on its own was not sufficient). &lt;/p&gt;  &lt;p&gt;Open the project you want to profile in Visual Studio and from the analyze menu select &amp;quot;Launch Performance Wizard&amp;quot;. Select the relevant project to profile from your current solution e.g&lt;/p&gt;  &lt;p&gt;&lt;img alt="image" src="http://rnowik.com/images/VS2008ProfilingaWebApplicationUsingSampl_88FC/image_thumb.png" width="384" height="293" /&gt; &lt;/p&gt;  &lt;p&gt;Select sampling as the profiling method&lt;/p&gt;  &lt;p&gt;&lt;img alt="image" src="http://rnowik.com/images/VS2008ProfilingaWebApplicationUsingSampl_88FC/image_thumb_3.png" width="383" height="292" /&gt; &lt;/p&gt;  &lt;p&gt;Click finish on the next screen&lt;/p&gt;  &lt;p&gt;&lt;img alt="image" src="http://rnowik.com/images/VS2008ProfilingaWebApplicationUsingSampl_88FC/image_thumb_4.png" width="382" height="291" /&gt; &lt;/p&gt;  &lt;p&gt;The performance explorer will now appear (note that you can add additional target projects to this). To start gathering performance data, simply right click the performance node and select &amp;quot;attach/detach&amp;quot;.&amp;#160; Locate and attach to the W3WP (you may need to check the &amp;quot;Show Processes in All Sessions&amp;quot; and &amp;quot;Show Processes for all users checkboxes&amp;quot;. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img alt="image" src="http://rnowik.com/images/VS2008ProfilingaWebApplicationUsingSampl_88FC/image_thumb_5.png" width="303" height="192" /&gt;&lt;/p&gt;  &lt;p&gt;Once attached, begin hitting your web application through the browser (suggestion - set up a load test to repeatedly hit multiple times).&amp;#160; Click stop in the performance explorer window when complete. The results will then process to give you summary data.&lt;/p&gt;  &lt;p&gt;&lt;img alt="image" src="http://rnowik.com/images/VS2008ProfilingaWebApplicationUsingSampl_88FC/image_thumb_6.png" width="371" height="297" /&gt; &lt;/p&gt;  &lt;p&gt;Change the current view drop down to drill into the results. E.g. change to modules and scoll down to find modules appropriate to your code&lt;/p&gt;  &lt;p&gt;&lt;img alt="image" src="http://rnowik.com/images/VS2008ProfilingaWebApplicationUsingSampl_88FC/image_thumb_7.png" width="372" height="297" /&gt; &lt;/p&gt;  &lt;p&gt;Double click on relevant functions to drill into the details...&lt;/p&gt;  &lt;p&gt;&lt;img alt="image" src="http://rnowik.com/images/VS2008ProfilingaWebApplicationUsingSampl_88FC/image_thumb_8.png" width="376" height="301" /&gt; &lt;/p&gt;  &lt;p&gt;Note that you can order by &amp;quot;Inclusive Samples %&amp;quot; to get the most expensive function calls from your current function. Double click these functions to drill into these. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Related Links&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a title="http://blogs.msdn.com/timothyc/archive/2006/03/08/546437.aspx" href="http://blogs.msdn.com/timothyc/archive/2006/03/08/546437.aspx"&gt;http://blogs.msdn.com/timothyc/archive/2006/03/08/546437.aspx&lt;/a&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/dd255431.aspx" href="http://msdn.microsoft.com/en-us/library/dd255431.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd255431.aspx&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;</description>
               <link>http://rnowik.com/VS2008-Profiling-a-Web-Application-Using-Sampling.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>27/09/2009 10:55:34</pubDate>
          </item>
          <item>
               <title>Office 2007 Tip &amp;ndash; Lorem Function</title>
               <description>&lt;p&gt;In Office 2007, type &lt;strong&gt;&lt;em&gt;=lorem()&lt;/em&gt;&lt;/strong&gt; to generate some lorem ipsum text. To control the number of paragraphs and sentences per paragraph simple type &lt;strong&gt;&lt;em&gt;=lorem(3,5)&lt;/em&gt;&lt;/strong&gt; This will generate 3 paragraphs of lorem ipsum text with 5 sentences per paragraph. &lt;/p&gt;</description>
               <link>http://rnowik.com/Office-2007-Tip-ndash-Lorem-Function.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>23/09/2009 14:07:56</pubDate>
          </item>
          <item>
               <title>Visual Studio 2008: Auto Formatting</title>
               <description>&lt;p&gt;Simply press Control + K then Control + D.&amp;#160; and the code will be auto-formatted. Nice!&lt;/p&gt;</description>
               <link>http://rnowik.com/Visual-Studio-2008-Auto-Formatting.aspx</link>
               <author>Rob Nowik</author>
               <pubDate>10/09/2009 18:25:36</pubDate>
          </item>
     </channel>
</rss>