<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msftplayground.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Microsoft Playground</title><subtitle type="html">Microsoft Playground is a blog created for blogging about Microsoft Technologies. Technologies I will write about are SharePoint 2007, SharePoint 2010, Team Foundation Server, Windows Server 2008, Windows Server 2008 R2, ASP.Net and much more.</subtitle><id>http://msftplayground.com/atom.aspx</id><link rel="alternate" type="text/html" href="http://msftplayground.com/default.aspx" /><link rel="self" type="application/atom+xml" href="http://msftplayground.com/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61129.2">Community Server</generator><updated>2009-10-05T15:34:00Z</updated><entry><title>SharePoint 2010 &amp; Office 2010 Launch Date</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2010/03/08/sharepoint-2010-office-2010-launch-date.aspx" /><id>http://msftplayground.com/archive/2010/03/08/sharepoint-2010-office-2010-launch-date.aspx</id><published>2010-03-08T09:09:16Z</published><updated>2010-03-08T09:09:16Z</updated><content type="html">Today, it is officially announced that May 12th, 2010, is the release date for SharePoint 2010 &amp;amp; Office 2010. The RTM of the products they are trying to release to RTM this April. Can’t wait to be working with the RTM :)....(&lt;a href="http://msftplayground.com/archive/2010/03/08/sharepoint-2010-office-2010-launch-date.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=159" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="SharePoint 2010" scheme="http://msftplayground.com/archive/tags/SharePoint+2010/default.aspx" /></entry><entry><title>SharePoint Memory Leak</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2010/02/25/sharepoint-memory-leak.aspx" /><id>http://msftplayground.com/archive/2010/02/25/sharepoint-memory-leak.aspx</id><published>2010-02-25T06:55:10Z</published><updated>2010-02-25T06:55:10Z</updated><content type="html">A few day’s ago I stumbled on a article about SharePoint Memory leaks because we were looking at memory leaks for 1 of out clients. I found a great article from Todd Carter about a giant memory leak within SharePoint that he found just a month ago. &amp;#160; It is really a must read: &amp;#160; SharePoint’s Sasquatch Memory Leak...(&lt;a href="http://msftplayground.com/archive/2010/02/25/sharepoint-memory-leak.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=157" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="SharePoint 2007" scheme="http://msftplayground.com/archive/tags/SharePoint+2007/default.aspx" /><category term="ASP.NET" scheme="http://msftplayground.com/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>Failure in loading assembly</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2010/02/22/failure-in-loading-assembly.aspx" /><id>http://msftplayground.com/archive/2010/02/22/failure-in-loading-assembly.aspx</id><published>2010-02-22T10:48:47Z</published><updated>2010-02-22T10:48:47Z</updated><content type="html">In the application event log I found several errors that were pointing to assemblies that I wasn’t using anymore. The error looks like the message below: Error: Failure in loading assembly: Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=Token. &amp;#160; The application was trying to load an assembly that I wasn’t in the GAC or in the BIN folder. This causes the error so I searched trough the complete solution for references to the specified assembly but couldn’t find any. &amp;#160; After searching...(&lt;a href="http://msftplayground.com/archive/2010/02/22/failure-in-loading-assembly.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=156" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="WSS 3.0" scheme="http://msftplayground.com/archive/tags/WSS+3.0/default.aspx" /><category term="SharePoint 2007" scheme="http://msftplayground.com/archive/tags/SharePoint+2007/default.aspx" /><category term="Errors" scheme="http://msftplayground.com/archive/tags/Errors/default.aspx" /></entry><entry><title>Visual Studio 2010 Release Candidate is Available</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2010/02/12/visual-studio-2010-release-candidate-is-available.aspx" /><id>http://msftplayground.com/archive/2010/02/12/visual-studio-2010-release-candidate-is-available.aspx</id><published>2010-02-12T16:19:12Z</published><updated>2010-02-12T16:19:12Z</updated><content type="html">&lt;p&gt;&lt;img title="Visual Studio 2010 Release Candidate icon" border="0" alt="Visual Studio 2010 Release Candidate icon" align="left" src="http://mastykarz.nl/blog/images/VisualStudio2010ReleaseCandidateisavaila_726A/vsicon.png" width="181" height="105" /&gt;If you haven’t noticed. A few day’s ago the Release Candidate of Visual Studio 2010 became available.&lt;/p&gt;  &lt;p&gt;The new version really feels a lot faster and is also about 1GB larger. Go try it out and let me know what you think.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/nl-nl/vstudio/dd582936(en-us).aspx"&gt;Visual Studio 2010 Release Candidate&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can download the following version from the download center:&lt;/p&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=183179"&gt;Visual Studio 2010 Ultimate&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=183178"&gt;Visual Studio 2010 Premium&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=183177"&gt;Visual Studio 2010 Professional&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=183191"&gt;Visual Studio 2010 Remote Debugger&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=183192"&gt;Visual Studio 2010 F# 2.0 Runtime&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=154" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author></entry><entry><title>Inline Editing in SharePoint 2010 (UI and Code)</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2010/02/02/inline-editing-in-sharepoint-2010-ui-and-code.aspx" /><id>http://msftplayground.com/archive/2010/02/02/inline-editing-in-sharepoint-2010-ui-and-code.aspx</id><published>2010-02-02T09:25:35Z</published><updated>2010-02-02T09:25:35Z</updated><content type="html">&lt;p&gt;Within SharePoint 2010 it is possible to enable inline editing on list items. This can be done by changing properties on a view of a SharePoint library what can be done in code and trough the user interface.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To allow inline editing trough the user interface you have to do the following:&lt;/p&gt;  &lt;p&gt; Navigate to the list for which you want to allow inline editing:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msftplayground.com/blogs/msft/ListSettings_56711FD2.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="List settings" border="0" alt="List settings" src="http://msftplayground.com/blogs/msft/ListSettings_thumb_7E541F31.png" width="441" height="263" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Click on list and then list settings. On the list settings screen click on the list view you would like to edit on the bottom of the screen:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msftplayground.com/blogs/msft/ListSettingsScreen_6AC6BF90.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="List settings screen" border="0" alt="List settings screen" src="http://msftplayground.com/blogs/msft/ListSettingsScreen_thumb_1B0D9447.png" width="448" height="269" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In the view screen you have a section called: Inline editing. Within that section you have a checkbox to allow inline editing:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msftplayground.com/blogs/msft/ViewSettings_5926AEF8.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="Enable inline editing" border="0" alt="Enable inline editing" src="http://msftplayground.com/blogs/msft/ViewSettings_thumb_731A6F1A.png" width="448" height="206" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;When you have enabled this checkbox you can inline edit the items in your list:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msftplayground.com/blogs/msft/InlineEditing_03B26A09.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="Inline Editing" border="0" alt="Inline Editing" src="http://msftplayground.com/blogs/msft/InlineEditing_thumb_221CAAF2.png" width="448" height="269" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Inline editing can also be enabled trough code. You can do this by following the code example below:&lt;/p&gt;  &lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:530px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt;(SPSite site = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPSite(&amp;quot;&lt;span style="color:#8b0000;"&gt;URL of the site&lt;/span&gt;&amp;quot;))
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  2: {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  3:     SPWeb web = site.RootWeb;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  4:     SPList list = web.Lists[&amp;quot;&lt;span style="color:#8b0000;"&gt;Name of the list&lt;/span&gt;&amp;quot;];
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  5:                 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  6:     SPView view  = list.Views[&amp;quot;&lt;span style="color:#8b0000;"&gt;Title of the view&lt;/span&gt;&amp;quot;];
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  7:     view.InlineEdit = &amp;quot;&lt;span style="color:#8b0000;"&gt;TRUE&lt;/span&gt;&amp;quot;;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  8:     view.Update();
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  9: }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The ‘InlineEdit’ property on the view is in the public beta version of SharePoint 2010 a string value. Hopefully they will change this to a Boolean value in the final version.&lt;/p&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=153" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="SharePoint 2010" scheme="http://msftplayground.com/archive/tags/SharePoint+2010/default.aspx" /><category term="C#" scheme="http://msftplayground.com/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Microsoft Visual Studio 2010 Gets New Launch Date</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2010/01/15/microsoft-visual-studio-2010-gets-new-launch-date.aspx" /><id>http://msftplayground.com/archive/2010/01/15/microsoft-visual-studio-2010-gets-new-launch-date.aspx</id><published>2010-01-15T07:38:59Z</published><updated>2010-01-15T07:38:59Z</updated><content type="html">&lt;p&gt;In late 2009 Microsoft added an extra test release to the schedule of Visual Studio 2010. This resulted in a push-back of the launch date of the product.&lt;/p&gt;  &lt;p&gt;Microsoft had now rescheduled the official launch event for VS 2010 and .Net 4.0 from 22 March to April 12.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;More information about Visual Studio 2010 can be found here:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.microsoft.com/presspass/newsroom/developer/factsheets/VS2010PackagingFS.docx" target="_blank"&gt;Planned packaging and pricing of Visual Studio 2010&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.microsoft.com/netherlands/visualstudio/products/2010/default.mspx?WT.mc_id=SEARCH&amp;amp;WT.srch=1&amp;amp;wt.srch=1" target="_blank"&gt;Information about Visual Studio 2010&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-gb/ee679805.aspx"&gt;Enhancements over previous versions of Visual Studio that will be in the 2010 release&lt;/a&gt;. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h5&gt;source: &lt;a title="http://blogs.zdnet.com/microsoft/?p=4981" href="http://blogs.zdnet.com/microsoft/?p=4981"&gt;http://blogs.zdnet.com/microsoft/?p=4981&lt;/a&gt;&lt;/h5&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=152" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="Framework 4.0" scheme="http://msftplayground.com/archive/tags/Framework+4.0/default.aspx" /><category term="Visual Studio 2010" scheme="http://msftplayground.com/archive/tags/Visual+Studio+2010/default.aspx" /></entry><entry><title>Hiding the ‘Create Site’ option in the Site Actions menu</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2009/12/27/hiding-the-create-site-option-in-the-site-actions-menu.aspx" /><id>http://msftplayground.com/archive/2009/12/27/hiding-the-create-site-option-in-the-site-actions-menu.aspx</id><published>2009-12-27T14:53:17Z</published><updated>2009-12-27T14:53:17Z</updated><content type="html">&lt;p&gt;Within SharePoint you have something called &lt;a href="http://msdn.microsoft.com/en-us/library/ms465980.aspx"&gt;custom actions&lt;/a&gt;. You can use custom actions to create custom menu items within SharePoint. Besides custom actions you also have &lt;a href="http://msdn.microsoft.com/en-us/library/ms414790.aspx"&gt;hide custom actions&lt;/a&gt; to hide custom actions. With the hide custom actions you can only hide custom actions that have been created with a CustomAction schema file.&lt;/p&gt;  &lt;p&gt;The ‘Create Site’ menu options and also the ‘Create Page’ option are not created with a custom actions but on a different way. To hide these custom actions you can alter a file that resides in the masterpages gallery within a site collection.&lt;/p&gt;  &lt;p&gt;In the masterpages gallery there is a folder called ‘Editing Menu’ in this folder there are four files you can use to alter certain menu options.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa674506.aspx"&gt;CustomEditingMenu.xml : Used to customize the page editing toolbar&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;a&gt;CustomQuickAccess.xml: Used to customize the quick access actions&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;a&gt;CustomSiteAction.xml: Used to alter the site actions menu&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms520217.aspx"&gt;RTE2ToolbarExtension.xml: Used to customize the HTML Editor Field control&lt;/a&gt;.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;When you would like to hide the ‘Create Site’ action in the site actions menu you have to alter the CustomSiteAction.xml file by adding several nodes. Below there is an example of a CustomSiteAction.xml file that hides the ‘Create Site’ action:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:530px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;&amp;lt;?&lt;/span&gt;xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; &lt;span style="color:#0000ff;"&gt;?&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  2: &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Console&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  3:    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;references&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  4:       &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;reference&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;TagPrefix&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;cms&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;assembly&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt;   &lt;span style="color:#ff0000;"&gt;namespace&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  5:    &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;references&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  6:    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;structure&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  7:    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;ConsoleNode&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;ConfigMenu&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Delete&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;ChangedNodeID&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;wsaCreateSite&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  8:    &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;structure&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  9: &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Console&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;The reference is to a SharePoint assembly that creates the custom actions. The ‘ConsoleNode’ stated what should happen with a certain menu action in the above example it is ‘ChangeNodeID’ which is ‘wsaCreateSite’ (This id can be found be looking in the source of the page). If you would also like to hide the ‘Create Page’ action you add the following line to the CustomSiteAction file:&lt;/p&gt;

&lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:530px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;ConsoleNode&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;ConfigMenu&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Delete&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;ChangedNodeID&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;wsaCreatePage&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;These changes can also be done with a feature and a feature receiver if you guys would like to have a example how to accomplish this let me now and also if you would like to see some examples for the other files. &lt;/p&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=151" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="WSS 3.0" scheme="http://msftplayground.com/archive/tags/WSS+3.0/default.aspx" /><category term="SharePoint 2007" scheme="http://msftplayground.com/archive/tags/SharePoint+2007/default.aspx" /><category term="CustomActions" scheme="http://msftplayground.com/archive/tags/CustomActions/default.aspx" /></entry><entry><title>Deploying multiple wsp packages with one installation file</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2009/11/18/deploying-multiple-wsp-packages-with-one-installation-file.aspx" /><id>http://msftplayground.com/archive/2009/11/18/deploying-multiple-wsp-packages-with-one-installation-file.aspx</id><published>2009-11-18T22:19:53Z</published><updated>2009-11-18T22:19:53Z</updated><content type="html">&lt;p&gt;Today the public beta of SharePoint 2010 is released and everyone started blogging about SharePoint 2010. I am still preparing a Virtual Machine because the beta does not fully works on a Windows Server 2008 R2 installation and I had prepared a virtual machine with this operating system. But know back to deploying multiple wsp packages.&lt;/p&gt;  &lt;p&gt;At the moment I’m working for a client that want to install multiple wsp packages and keep it simple for administrators to change the deployment. To accomplish this I created a sample configuration file for a custom installation.&lt;/p&gt;  &lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:530px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;&amp;lt;?&lt;/span&gt;xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; &lt;span style="color:#0000ff;"&gt;?&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  2: &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Solution&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  3:    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Package&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;file&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Solutions\CustomPackage2.wsp&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;deployment&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Globally&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Package&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  4:    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Package&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;file&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Solutions\CustomPackage1.wsp&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;deployment&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;WebApplication&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  5:       &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;WebApplication&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;url&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;http://myportal.com&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  6:    &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Package&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  7: &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Solution&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  8: &lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;In the configuration file you can see that there are two packages. One of the packages has to be deployed globally and 1 of them for several web applicatiosn that is why the second packages has child elements.&lt;/p&gt;

&lt;p&gt;Know that we have a sample configuration file we want we to start building a application to install those packages. First of all we will try to read out the xml file in a console application.&lt;/p&gt;

&lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:530px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; Program
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  2: {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  3:    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;const&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; SolutionElement = &amp;quot;&lt;span style="color:#8b0000;"&gt;Solution&lt;/span&gt;&amp;quot;;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  4:    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;const&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; PackageElement = &amp;quot;&lt;span style="color:#8b0000;"&gt;Package&lt;/span&gt;&amp;quot;;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  5:    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;const&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; FileAttribute = &amp;quot;&lt;span style="color:#8b0000;"&gt;file&lt;/span&gt;&amp;quot;;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  6:    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;const&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; DeploymentAttribute = &amp;quot;&lt;span style="color:#8b0000;"&gt;deployment&lt;/span&gt;&amp;quot;;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  7: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  8:    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Main()
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  9:    { 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 10: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 11:       &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 12:       {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 13:          &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (File.Exists(&amp;quot;&lt;span style="color:#8b0000;"&gt;Installation.config&lt;/span&gt;&amp;quot;))
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 14:          {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 15:             &lt;span style="color:#008000;"&gt;//get the installation document&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 16:             WriteSectionLine(&amp;quot;&lt;span style="color:#8b0000;"&gt;Loading installation configuration file.....&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 17:             var config = XDocument.Load(&amp;quot;&lt;span style="color:#8b0000;"&gt;Installation.config&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 18: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 19:             var packages = from XElement package &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; config.Element(SolutionElement).Elements(PackageElement)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 20:                            select package;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 21: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 22:             &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (XElement element &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; packages)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 23:             {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 24:                ProcessPackage(element);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 25:             }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 26:          }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 27:          &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 28:          {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 29:             Console.WriteLine(&amp;quot;&lt;span style="color:#8b0000;"&gt;Configuration file 'Installation.config' is nog in the same directory as the solution installer.&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 30:          }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 31:       }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 32:    &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception exception)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 33:    {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 34:       Console.WriteLine(&amp;quot;&lt;span style="color:#8b0000;"&gt;An exception ocurred during the installation&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 35:       Console.WriteLine(&amp;quot;&lt;span style="color:#8b0000;"&gt;-------------------------------------------------------------------&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 36:       Console.WriteLine(exception.Message);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 37:       Console.WriteLine(&amp;quot;&lt;span style="color:#8b0000;"&gt;-------------------------------------------------------------------&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 38:    }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 39:    WriteSectionLine(&amp;quot;&lt;span style="color:#8b0000;"&gt;Press any key to close.&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 40:    Console.ReadKey();
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 41: }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;In the ‘Main’ of the console application we check if the configuration file exists and when it exists we load the file and run a linq query for the package elements. When we have package elements within the configuration file we run the method ProcessPackage for each package element.&lt;/p&gt;

&lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:530px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ProcessPackage(XElement element)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  2: {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  3:    var deployment = element.Attribute(DeploymentAttribute).Value;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  4:    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (deployment.ToUpperInvariant() == &amp;quot;&lt;span style="color:#8b0000;"&gt;GLOBALLY&lt;/span&gt;&amp;quot;)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  5:    {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  6:       DeploymentGlobally(element);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  7:    }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  8:    &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  9:    {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 10:       DeploymenWebApplication(element);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 11:    }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 12: }
&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;In the process package we check the deployment attribute to check how to deploy the package, globally or for web applications.&lt;/p&gt;

&lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:530px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; DeploymenWebApplication(XElement element)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  2: {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  3:    var file = element.Attribute(FileAttribute).Value;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  4:    var fileName = Path.GetFileName(file);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  5:    
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  6:    WriteSectionLine(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;Processing Global Solution: {0}&lt;/span&gt;&amp;quot;, fileName));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  7:    var query = from childElement &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; element.Elements(&amp;quot;&lt;span style="color:#8b0000;"&gt;WebApplication&lt;/span&gt;&amp;quot;)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  8:                select childElement;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  9: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 10:    &lt;span style="color:#008000;"&gt;//delete / retract solution&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 11:    &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (XElement el &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; query)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 12:    {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 13:       var url = el.Attribute(&amp;quot;&lt;span style="color:#8b0000;"&gt;url&lt;/span&gt;&amp;quot;).Value;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 14:       Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;retractsolution&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;-name {0} -url {1} -immediate&lt;/span&gt;&amp;quot;, fileName, url)));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 15:       Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;execadmsvcjobs&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 16:    }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 17: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 18:    Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;deletesolution&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;-name {0} -override&lt;/span&gt;&amp;quot;, fileName)));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 19:    Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;addsolution&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;-filename {0}&lt;/span&gt;&amp;quot;, file)));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 20: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 21:    &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (XElement el &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; query)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 22:    {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 23:       var url = el.Attribute(&amp;quot;&lt;span style="color:#8b0000;"&gt;url&lt;/span&gt;&amp;quot;).Value;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 24:       Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;deploysolution&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;-name {0} -url {1} -allowgacdeployment -immediate&lt;/span&gt;&amp;quot;, fileName, url)));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 25:       Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;execadmsvcjobs&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 26:    }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 27: }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 28: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 29: &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; DeploymentGlobally(XElement element)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 30: {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 31:    var file = element.Attribute(FileAttribute).Value;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 32:    var fileName = Path.GetFileName(file);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 33: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 34:    WriteSectionLine(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;Processing Global Solution: {0}&lt;/span&gt;&amp;quot;, fileName));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 35: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 36:    &lt;span style="color:#008000;"&gt;//preform processes&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 37:    Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;retractsolution&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;-name {0} -immediate&lt;/span&gt;&amp;quot;, fileName)));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 38:    Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;execadmsvcjobs&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 39:    Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;deletesolution&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;-name {0} -override&lt;/span&gt;&amp;quot;, fileName)));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 40:    Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;addsolution&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;-filename {0}&lt;/span&gt;&amp;quot;, file)));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 41:    Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;deploysolution&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;-name {0} -allowgacdeployment -immediate&lt;/span&gt;&amp;quot;, fileName)));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 42:    Console.WriteLine(Processes.RunStsAdmProcces(&amp;quot;&lt;span style="color:#8b0000;"&gt;execadmsvcjobs&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty));
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 43: }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;In the methods we read out additional information from the package element. In the ‘DeploymentWebApplication’ we read out the child elements and retract and delete the solution for each web application before we start installing the solution. Each time we retract or deploy a package we also run the execadmsvcjobs because we have to make sure no action for a package is running at the moment we start a new action.&lt;/p&gt;

&lt;p&gt;The actions we do are started by the method RunStsAdmProcess this methods starts a new process that runs the stsadm tool of SharePoint. The methods needs two parameters the command and the argument.&lt;/p&gt;

&lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:530px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;internal&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; RunStsAdmProcces(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; command, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; arguments)
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  2: {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  3:    var retVal = &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  4:    var commonFilesPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonProgramFiles);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  5: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  6:    &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; (var process = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Process())
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  7:    {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  8:       &lt;span style="color:#008000;"&gt;//create the start info of the project&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  9:       var processStartInfo = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; ProcessStartInfo(command);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 10:       processStartInfo.UseShellExecute = &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 11:       processStartInfo.RedirectStandardOutput = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 12:       processStartInfo.FileName = commonFilesPath + @&amp;quot;&lt;span style="color:#8b0000;"&gt;\Microsoft Shared\web server extensions\12\BIN\stsadm.exe&lt;/span&gt;&amp;quot;;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 13:       processStartInfo.Arguments = &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt; -o {0} {1}&lt;/span&gt;&amp;quot;, command, arguments);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 14: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 15:       &lt;span style="color:#008000;"&gt;//initialize the process&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 16:       process.StartInfo = processStartInfo;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 17:       process.Start();
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 18: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 19:       &lt;span style="color:#008000;"&gt;//read the output stream of the process&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 20:       StreamReader myStreamReader = process.StandardOutput;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 21:       retVal = myStreamReader.ReadToEnd();
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 22:       
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 23:       process.Close();
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 24:    }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 25:    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; retVal;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 26: }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;In the method a new stsadm process is started with the parameters. With a streamreader the output of the process is captured and returned to the console application.&lt;/p&gt;

&lt;p&gt;I hope this can help you guys with creating solutions to deploy multiple wsp packages from one installation.&lt;/p&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=144" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="SharePoint 2007" scheme="http://msftplayground.com/archive/tags/SharePoint+2007/default.aspx" /><category term="SharePoint" scheme="http://msftplayground.com/archive/tags/SharePoint/default.aspx" /><category term="Deployment" scheme="http://msftplayground.com/archive/tags/Deployment/default.aspx" /></entry><entry><title>SharePoint 2010: Getting Started with Development – Part 2</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2009/11/10/sharepoint-2010-getting-started-with-development-part-2.aspx" /><id>http://msftplayground.com/archive/2009/11/10/sharepoint-2010-getting-started-with-development-part-2.aspx</id><published>2009-11-10T06:53:00Z</published><updated>2009-11-10T06:53:00Z</updated><content type="html">&lt;P&gt;More and more resources are coming available for starting development with SharePoint 2010. Today I received a link from MSDN Flash with some cool new developer resources. After watching the presentations you can even test your skill by answering a question. Besides that their are also code samples available for each module.&lt;/P&gt;
&lt;P&gt;&lt;A title=http://msdn.microsoft.com/en-us/sharepoint/ee513147.aspx href="http://msdn.microsoft.com/en-us/sharepoint/ee513147.aspx"&gt;&lt;FONT color=#669966&gt;Get Started Developing on SharePoint 2010&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513148.aspx"&gt;&lt;FONT color=#669966&gt;Module 1: Getting Started: Building Web Parts in SharePoint 2010&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513149.aspx"&gt;&lt;FONT color=#669966&gt;Module 2: What Developers Need to Know About SharePoint 2010&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513150.aspx"&gt;&lt;FONT color=#669966&gt;Module 3: Building Blocks for Web Part Development in SharePoint 2010&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513151.aspx"&gt;&lt;FONT color=#669966&gt;Module 4: Accessing SharePoint 2010 Data and Objects with Server-Side APIs&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513152.aspx"&gt;&lt;FONT color=#669966&gt;Module 5: Accessing SharePoint 2010 Data and Objects with Client-Side APIs&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513153.aspx"&gt;&lt;FONT color=#669966&gt;Module 6: Accessing External Data with Business Connectivity Services in SharePoint 2010&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513154.aspx"&gt;&lt;FONT color=#669966&gt;Module 7: Developing Business Processes with SharePoint 2010 Workflows&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513155.aspx"&gt;&lt;FONT color=#669966&gt;Module 8: Creating Silverlight User Interfaces for SharePoint 2010 Solutions&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513156.aspx"&gt;&lt;FONT color=#669966&gt;Module 9: Sandboxed Solutions for Web Parts in SharePoint 2010&lt;/FONT&gt;&lt;/A&gt; 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/sharepoint/ee513157.aspx"&gt;&lt;FONT color=#669966&gt;Module 10: Creating Dialog Boxes and Ribbon Controls for SharePoint 2010&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Besides the getting started modules Microsoft also released resources to get started working with Visual Studio 2010 and SharePoint 2010:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx"&gt;&lt;FONT color=#669966&gt;SharePoint Development in Visual Studio 2010&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You should also take a look at &lt;A title=Channel9 href="http://channel9.msdn.com/learn/courses/SharePoint2010Developer/"&gt;http://channel9.msdn.com/learn/courses/SharePoint2010Developer/&lt;/A&gt;. On this site there are severela great movies to learn how to develop for SharePoint 2010.&lt;/P&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=143" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="SharePoint 2010" scheme="http://msftplayground.com/archive/tags/SharePoint+2010/default.aspx" /><category term="WSS 4.0" scheme="http://msftplayground.com/archive/tags/WSS+4.0/default.aspx" /><category term="ASP.NET" scheme="http://msftplayground.com/archive/tags/ASP.NET/default.aspx" /><category term="Framework 4.0" scheme="http://msftplayground.com/archive/tags/Framework+4.0/default.aspx" /><category term="SharePoint" scheme="http://msftplayground.com/archive/tags/SharePoint/default.aspx" /></entry><entry><title>SharePoint 2010: Getting Started with Development</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2009/10/28/sharepoint-2010-getting-started-with-development.aspx" /><id>http://msftplayground.com/archive/2009/10/28/sharepoint-2010-getting-started-with-development.aspx</id><published>2009-10-28T12:59:19Z</published><updated>2009-10-28T12:59:19Z</updated><content type="html">&lt;p&gt;When I was reading and searching information about SharePoint 2010 on the internet I found I really helpful page in the Microsoft download&amp;#160; to get started with development for SharePoint 2010.&lt;/p&gt;  &lt;p&gt;On the page a 10 Hands on Labs for you to try out in C# and Visual Basic.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Overview     &lt;br /&gt;HOL01 - Developing a Visual Web Part in Visual Studio 2010      &lt;br /&gt;&lt;/strong&gt;This hands-on lab introduces the Visual Studio 2010 SharePoint development environment. It shows how to build a Visual Web Part using LINQ to SharePoint, and how to connect one Web Part to another Web Part on the page. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;HOL02 - Developing a List Definition and Event Receiver in Visual Studio 2010      &lt;br /&gt;&lt;/strong&gt;This hands-on lab walks you through building a list definition for SharePoint 2010 in Visual Studio 2010. It also shows how to build an event receiver for the list in Visual Studio 2010 and deploy it to SharePoint. After the list and event receiver are deployed, you can use the developer dashboard to evaluate the performance of the event receiver. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;HOL03 - Developing Advanced Web Parts for SharePoint 2010 with Visual Studio 2010      &lt;br /&gt;&lt;/strong&gt;This hands-on lab shows how to build a Web Part using several SharePoint-specific controls in Visual Studio 2010. Investigate advanced built-in Web Parts, including the Data View Web Part. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;HOL04 - Developing with LINQ to SharePoint in Visual Studio 2010 &lt;/strong&gt;    &lt;br /&gt;This hands-on lab explores a variety of LINQ queries on SharePoint 2010, going into more depth than the introductory hands-on lab. It also walks you through an exercise of creating a custom content type in Visual Studio 2010. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;HOL05 - Developing for SharePoint 2010 with the Client OM and REST in Visual Studio 2010      &lt;br /&gt;&lt;/strong&gt;This hands-on lab introduces the Client object model for use in calling SharePoint 2010 APIs from a client machine. It also shows the use of ADO.NET Data Services to call REST services in SharePoint 2010. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;HOL06 - Developing a BCS External Content Type with Visual Studio 2010 &lt;/strong&gt;    &lt;br /&gt;This hands-on lab walks you through building an external content type for Business Connectivity Services using Visual Studio 2010. It also builds a form for Microsoft Outlook and shows the data being edited offline in Outlook. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;HOL07 - Developing a SharePoint 2010 Workflow with Initiation Form in Visual Studio 2010      &lt;br /&gt;&lt;/strong&gt;This hands-on lab walks you through building a workflow in Visual Studio 2010 for SharePoint 2010. You add an initiation form to the workflow and use an external data exchange activity in the workflow. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;HOL08 - Developing SharePoint 2010 User Interface with Silverlight in Visual Studio 2010&lt;/strong&gt;    &lt;br /&gt;This hands-on lab walks you through building Microsoft Silverlight applications for use in SharePoint 2010. You will access SharePoint 2010 data in Silverlight using the Client object model. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;HOL09 - Developing SharePoint 2010 Sandboxed Solutions in Visual Studio 2010      &lt;br /&gt;&lt;/strong&gt;This hands-on lab walks you through building a Sandboxed Solution Web Part for SharePoint 2010. It will also add code to the Web Part that overloads the limits placed by the sandboxed solution, and you will review how the solution is shut down. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;HOL10 - Developing SharePoint 2010 User Interface Ribbon and Dialog Customizations&lt;/strong&gt;    &lt;br /&gt;This hands-on lab walks you through adding a custom action to the SharePoint 2010 ribbon, and creating a Web Part that uses the Dialog Framework.&lt;/p&gt;  &lt;p&gt;You can download them &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=C010FC68-B47F-4DB6-B8A8-AD4BA33A35C5&amp;amp;displaylang=en#filelist" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Besides that I subscribed myself for one of the &lt;a href="http://msdn.msnlevents.net/content/info.asp?infoid=13&amp;amp;Ccpsubsiteid=157" target="_blank"&gt;MSDN Get Ready sessions&lt;/a&gt; that will be given in November and December of this year. I will be attending the SharePoint 2010 Development session. Let me know if you will be attending one of those sessions.&lt;/p&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=84" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="SharePoint 2010" scheme="http://msftplayground.com/archive/tags/SharePoint+2010/default.aspx" /><category term="ASP.NET" scheme="http://msftplayground.com/archive/tags/ASP.NET/default.aspx" /><category term="SharePoint" scheme="http://msftplayground.com/archive/tags/SharePoint/default.aspx" /><category term="C#" scheme="http://msftplayground.com/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Sitemap Provider for Community Server 2.1</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2009/10/28/sitemap-provider-for-community-server-2-1.aspx" /><id>http://msftplayground.com/archive/2009/10/28/sitemap-provider-for-community-server-2-1.aspx</id><published>2009-10-28T12:00:00Z</published><updated>2009-10-28T12:00:00Z</updated><content type="html">&lt;P&gt;For my new blog I had to create a sitemap provider to provide my content to several search engines.&lt;/P&gt;
&lt;P&gt;Because I did not find any solution on the internet I thought I would share my solution with you guys:&lt;/P&gt;
&lt;P&gt;You can download the source here: 
&lt;DIV style="PADDING-BOTTOM:0px;MARGIN:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;FLOAT:none;PADDING-TOP:0px;" id=scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:7f4c332a-cfd8-4921-bf8d-9294eb705127 class=wlWriterEditableSmartContent&gt;
&lt;DIV&gt;&lt;A href="http://msftplayground.com/blogs/msft/MSFTPlayground.Sitemap_1507AC0B.zip" target=_self&gt;MSFTPlayground.Sitemap.zip&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;The provider is meant for one blog. In the definitions file within the solution you can change the properties for you blog. You only have to add a httphandler to your web.config just like it is done in the file “web.config(extension)” within the solution. &lt;/P&gt;
&lt;P&gt;Let me know what you guys think of this provider.&lt;/P&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=83" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author></entry><entry><title>So long "Blog About SharePoint" and Hello "Microsoft Playground"</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2009/10/28/so-long-blog-about-sharepoint-and-hello-microsoft-playground.aspx" /><id>http://msftplayground.com/archive/2009/10/28/so-long-blog-about-sharepoint-and-hello-microsoft-playground.aspx</id><published>2009-10-28T11:41:55Z</published><updated>2009-10-28T11:41:55Z</updated><content type="html">&lt;p&gt;Almost two years ago I started &amp;quot;Blog About SharePoint&amp;quot; to blog about SharePoint related subjects.&lt;/p&gt;  &lt;p&gt;The last couple of months my focus has changed to more Microsoft products so I have created a new blog called &amp;quot;&lt;a href="http://msftplayground.com"&gt;Microsoft Playground&lt;/a&gt;&amp;quot;. Microsoft Playground will be a blog for articles regarding all kind of Microsoft technologies. &lt;/p&gt;  &lt;p&gt;I hope you guys will enjoy &amp;quot;&lt;a href="http://msftplayground.com"&gt;Microsoft Playground&lt;/a&gt;&amp;quot; as much as you have enjoyed &amp;quot;Blog About SharePoint&amp;quot;. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;RSS feed : &lt;a href="http://msftplayground.com/rss.aspx"&gt;Microsoft Playground&lt;/a&gt;&lt;/p&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=82" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="Blogging" scheme="http://msftplayground.com/archive/tags/Blogging/default.aspx" /></entry><entry><title>ASP.NET Checkbox with confirmation message</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2009/10/27/asp-net-checkbox-with-confirmation-message.aspx" /><id>http://msftplayground.com/archive/2009/10/27/asp-net-checkbox-with-confirmation-message.aspx</id><published>2009-10-27T14:56:35Z</published><updated>2009-10-27T14:56:35Z</updated><content type="html">&lt;p&gt;For one of my assignments I had to create a checkbox that displays a confirmation message when you uncheck a checkbox. I thought I would share my solution with you guys.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;First off al you will have to create a new class file that we will call ‘ConfirmationCheckbox’ the class will inherit from ‘System.Web.UI.WebControls.Checkbox’ (the normal checkbox). For our checkbox you have to override the ‘OnPreRender’ to add JavaScript to the page and the ‘AddAttributesToRender’ to add the onclick to the checkbox for the notification. Besides that you have to create a property for the confirmation text.&lt;/p&gt;  &lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:540px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  2: &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  3: &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Linq;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  4: &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Text;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  5: &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  6: &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Web.UI;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  7: &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Globalization;
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  8: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  9: &lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; Motion10.SharePoint.WebControls {  
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 10:     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; ConfirmationCheckBox : CheckBox {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 11:         &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; ConfirmationText { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 12: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 13:         &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnPreRender(EventArgs e) {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 14:             &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.OnPreRender(e);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 15:             &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Page.ClientScript.RegisterClientScriptResource(&lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(ConfirmationCheckBox), &amp;quot;&lt;span style="color:#8b0000;"&gt;Motion10.SharePoint.JavaScript.js&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 16:         }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 17: 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 18:         &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; AddAttributesToRender(HtmlTextWriter writer) {
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 19:             &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Attributes[&amp;quot;&lt;span style="color:#8b0000;"&gt;onclick&lt;/span&gt;&amp;quot;] += &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(CultureInfo.CurrentCulture, &amp;quot;&lt;span style="color:#8b0000;"&gt;Confirmation(this, '{0}');&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.ConfirmationText);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 20:             &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.AddAttributesToRender(writer);
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 21:         }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 22:     }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 23: }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt; 24: &lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;In the code sample above you see the overridden methods, in the ‘AddAttributesToRender’ we add a call to the JavaScript method to the attribute ‘onclick’. The JavaScript that we will create later on in this article needs two parameters the object in this case the checkbox (this) and the text for the confirmation (this.ConfirmationText).&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The JavaScript will be added to the page in the OnPreRender method of the CheckBox. The JavaScript is a embedded resource in our dll. For that reason you have to use “Motion10.SharePoint.Notification.JavaScript.js”.&lt;/p&gt;

&lt;p&gt;If you want to create a JavaScript file as embedded resource you have to do the following:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Create a JavaScript file within your project.&lt;/li&gt;

  &lt;li&gt;Right click on the file and choose properties.&lt;/li&gt;

  &lt;li&gt;In the properties window set the Build Action to embedded resource.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After you have done this you can add the Resource to the ‘AssemblyInfo.cs’ file under the properties like this:&lt;/p&gt;

&lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:540px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: [assembly: WebResource(&amp;quot;&lt;span style="color:#8b0000;"&gt;Motion10.SharePoint.JavaScript.js&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="color:#8b0000;"&gt;text/javascript&lt;/span&gt;&amp;quot;)]&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Finally you will have to point to the file by using the full assembly name followed by the filename. If you place the file in a folder you will also have to add the folder to the name. &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Know we have got this out off the way we still have to create the JavaScript for the confirmation message. &lt;/p&gt;

&lt;pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;padding-bottom:5px;background-color:#fbfbfb;min-height:40px;padding-left:5px;width:540px;padding-right:5px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding-top:5px;"&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;function&lt;/span&gt; Confirmation(el, message) { 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  2:    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!el.checked) { 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  3:       el.checked = !&lt;span style="color:#0000ff;"&gt;confirm&lt;/span&gt;(message); 
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  4:    }
&lt;/pre&gt;&lt;pre style="background-color:#fbfbfb;margin:0em;width:100%;font-family:consolas,'Courier New',courier,monospace;font-size:10px;"&gt;  5: }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;As you can see we have one method in the JavaScript file called Confirmation that needs to parameters. The ‘el’ stands for the checkbox and ‘message’ for the message that needs to be displayed. In the method we check if the checkbox is unchecked because we only want to display a notification when the checkbox is unchecked.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msftplayground.com/blogs/msft/Notification_24474C2F.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="Javascript Confirmation" border="0" alt="Javascript Confirmation" src="http://msftplayground.com/blogs/msft/Notification_thumb_42B18D18.png" width="434" height="171" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;So when a user uncheck the checkbox a confirmation message will be shown (The message we entered as property of the checkbox). If the users selects ‘Ok’ the checkbox stays unchecked and when the user selects ‘Cancel’ the checkbox will stay checked and the “OnCheckChange” event of the checkbox will not be called.&lt;/p&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=74" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="ASP.NET" scheme="http://msftplayground.com/archive/tags/ASP.NET/default.aspx" /><category term="C#" scheme="http://msftplayground.com/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Prompting for Credentials</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2009/10/26/prompting-for-credentials.aspx" /><id>http://msftplayground.com/archive/2009/10/26/prompting-for-credentials.aspx</id><published>2009-10-26T12:39:53Z</published><updated>2009-10-26T12:39:53Z</updated><content type="html">&lt;p&gt;Often people ask me a question why Windows keeps prompting to login when you open a document from SharePoint. &lt;/p&gt;  &lt;p&gt;To automatically login you can change the settings that I have written down in this blog post: &lt;a href="http://msftplayground.com/archive/2008/12/10/sharepoint-prompts-to-login-multiple-time-when-opening-a-document.aspx"&gt;SharePoint prompts to login multiple time when opening a document&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you still have problems with windows that keeps prompting for credentials you should not stop the WebClient service like many blogs give as solution. Stopping this service &lt;strong&gt;is&lt;/strong&gt; a resolution for this problem but not &lt;strong&gt;the correct&lt;/strong&gt; solution. When you stop this service other problems can occur like:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;When you open a document from SharePoint and press “Save” the save dialog will not open with the document library but with a local folder.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;But what is the resolution I hear you thinking! The resolution for vista is a registry key setting. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Go to start – run, and type regedit.&lt;/li&gt;    &lt;li&gt;When the registry editor window opens go to this path:&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;HKEY_LOCAL_MACHINE – SYSTEM – CurrentControlSet – Services – WebClient – Parameters.&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Right-click the ‘Parameters’ subkey and create a new Multi-String Value.&lt;/li&gt;    &lt;li&gt;Give the Multi-String Value the name ‘AuthForwardServerList’.&lt;/li&gt;    &lt;li&gt;Open the new value and type in the list of SharePoint server URL’s that are trusted and click ‘Ok’&lt;/li&gt;    &lt;li&gt;Close the registry editor.&lt;/li&gt;    &lt;li&gt;Reboot your PC or restart the WebClient Service : start – Administrative Tools - Services&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The steps I have written down should work on a PC with Windows Vista SP1. If you guys have found another solution please let me know by placing a comment.&lt;/p&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=22" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="SharePoint 2007" scheme="http://msftplayground.com/archive/tags/SharePoint+2007/default.aspx" /><category term="Vista" scheme="http://msftplayground.com/archive/tags/Vista/default.aspx" /><category term="Registry" scheme="http://msftplayground.com/archive/tags/Registry/default.aspx" /></entry><entry><title>Using Windows Server as a Desktop Operating System</title><link rel="alternate" type="text/html" href="http://msftplayground.com/archive/2009/10/05/using-windows-server-as-a-desktop-operating-system.aspx" /><id>http://msftplayground.com/archive/2009/10/05/using-windows-server-as-a-desktop-operating-system.aspx</id><published>2009-10-05T20:34:00Z</published><updated>2009-10-05T20:34:00Z</updated><content type="html">&lt;p&gt;On this planet there are a lot of geeks (Including me) that run Windows Server 2008 (R2) as their desktop operating system.   &lt;br /&gt;I installed my development laptop with a dual boot of Windows 7 and Windows Server 2008 R2. The Windows Server 2008 R2 install is really a virtual hard disk that I setup as a boot device.&lt;/p&gt;  &lt;p&gt;If there are some developers who would like to setup a Virtual hard disk as boot device I would recommend the following article:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://ochoco.blogspot.com/2009/01/windows-7-boot-from-vhd-first.html"&gt;Boot from VHD First Impression&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I recommend an installation of a virtual hard disk on a hyper-v server. After the installation you can run ‘sysprep’ with the option ‘shutdown’ and copy the virtual hard disk to your computer. After that you can set it up as a boot device as explained in the article above.&lt;/p&gt;  &lt;p&gt;After you have followed the steps (or installed Windows Server) you have a server environment as your desktop operation system, but it still isn’t like a Windows 7 or Windows Vista environment. If you would like your windows server installation to look like windows Vista or Windows 7 you have to install the ‘Desktop Experience’ feature.&lt;/p&gt;  &lt;p&gt;The ‘Desktop experience’ feature includes programs like:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Windows Media Player &lt;/li&gt;    &lt;li&gt;Windows Aero and other desktop themes &lt;/li&gt;    &lt;li&gt;Video for Windows (AVI support) &lt;/li&gt;    &lt;li&gt;Windows Defender&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;To install the ‘Desktop experience’ follow the following steps:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Open Server Manager: click Start, point to Administrative Tools, and click Server Manager. &lt;/li&gt;    &lt;li&gt;In the Features Summary section, click Add features. &lt;/li&gt;    &lt;li&gt;Select the Desktop Experience check box, and then click ‘Next’ and then click ‘Install’.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Now you are ready to get a real desktop experience from Windows Server, but the Aero theme still isn’t working. To get this working you will have to activate the “Themes” services from windows and set the startup type to automatic. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Click Start, click Run, type in services.msc, and then click OK. &lt;/li&gt;    &lt;li&gt;In the list of installed services, right click Themes, and then click Properties. &lt;/li&gt;    &lt;li&gt;In the startup section click automatic, click apply and the click Start. And then click OK to close the window.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;After this configuration change your desktop needs to be restarted. After the reboot you can change the windows theme. By right clicking on the desktop and choosing ‘Personalize’ and selecting the Windows 7 Theme in case of windows server 2008 R2.&lt;/p&gt;&lt;img src="http://msftplayground.com/aggbug.aspx?PostID=73" width="1" height="1"&gt;</content><author><name>Maik van der Gaag</name><uri>http://msftplayground.com/members/Maik+van+der+Gaag.aspx</uri></author><category term="Desktop Experience" scheme="http://msftplayground.com/archive/tags/Desktop+Experience/default.aspx" /><category term="Virtual Harddisk" scheme="http://msftplayground.com/archive/tags/Virtual+Harddisk/default.aspx" /></entry></feed>