<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEcGRHc6eyp7ImA9WhRaFE0.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977</id><updated>2012-02-16T09:27:05.913-06:00</updated><category term="C#" /><category term="Project Server 2010" /><category term="SharePoint 2010" /><category term="WSS 3.0" /><title>Dennis Alzoubi Blog</title><subtitle type="html">Where Dennis &lt;b&gt;Share&lt;/b&gt;s his &lt;b&gt;Point&lt;/b&gt;</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.dennispoint.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.dennispoint.com/" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/tQXy" /><feedburner:info uri="blogspot/tqxy" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CUAASX88cSp7ImA9WhRWFk8.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-5709306460978878984</id><published>2012-01-03T14:49:00.001-06:00</published><updated>2012-01-03T14:49:08.179-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-03T14:49:08.179-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Project Server 2010" /><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010" /><title>Problem with Risks and Issues in PWA for Project Server 2010 after upgrading from 2007</title><content type="html">&lt;p&gt;This is an issue I came across after upgrading our SharePoint and Project Server 2007 environment into SharePoint and Project Server 2010.&lt;/p&gt; &lt;h3&gt;Issue&lt;/h3&gt; &lt;p&gt;Any updates made to the Risks or Issues lists in the Project Workspace (PWS) were not being carried over from PWS to the&amp;nbsp; Project Web Application (PWA)&lt;/p&gt; &lt;p&gt;PWS Risks List:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-zXVU2kGtLbM/TwNpugfAUDI/AAAAAAAABb8/PJvp2g82-2A/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-d1XvRBQCSp4/TwNpuxrTi2I/AAAAAAAABcE/urgepOGAthk/image_thumb%25255B2%25255D.png?imgmax=800" width="244" height="49"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;PWA Issues and Risks Page:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-4MUlJ-W9aMc/TwNpwa8FpCI/AAAAAAAABcM/7M6azMsaDw0/s1600-h/image%25255B12%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-pNlKjhDxkcc/TwNpw0L53MI/AAAAAAAABcU/4Lb1reQjfc8/image_thumb%25255B3%25255D.png?imgmax=800" width="244" height="15"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You will notice that the Active, Postponed, and closed count is not correct. If you go to SharePoint Logs, you will find a critical error complaining about references to the old Project Server assembly, viola!&lt;/p&gt; &lt;h3&gt;&lt;font color="#ff0000"&gt;Error&lt;/font&gt;&lt;/h3&gt; &lt;p&gt;01/03/2012 14:11:14.59&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w3wp.exe (0x246C)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x1860&amp;nbsp;&amp;nbsp;&amp;nbsp; SharePoint Foundation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; General&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6644&amp;nbsp;&amp;nbsp;&amp;nbsp; Critical&amp;nbsp;&amp;nbsp;&amp;nbsp; Event manager error: Could not load file or assembly 'Microsoft.Office.Project.Server.PWA, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;    &lt;h3&gt;&lt;font color="#008000"&gt;Solution&lt;/font&gt;&lt;/h3&gt; &lt;p&gt;I noticed that all the event receivers linked to those two lists are still referencing Version=12 assembly and not the new Version=14.&lt;/p&gt; &lt;p&gt;To resolve this issue, update all the event receivers to reference Assembly: Microsoft.Office.Project.Server.PWA,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c&lt;/p&gt; &lt;p&gt;You are welcome!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-5709306460978878984?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/muQ5iN9vHD2z2kqJb8oMxz9Oz4g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/muQ5iN9vHD2z2kqJb8oMxz9Oz4g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/muQ5iN9vHD2z2kqJb8oMxz9Oz4g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/muQ5iN9vHD2z2kqJb8oMxz9Oz4g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/ngd0Yk2oN1c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/5709306460978878984/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=5709306460978878984&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/5709306460978878984?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/5709306460978878984?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/ngd0Yk2oN1c/problem-with-risks-and-issues-in-pwa.html" title="Problem with Risks and Issues in PWA for Project Server 2010 after upgrading from 2007" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-d1XvRBQCSp4/TwNpuxrTi2I/AAAAAAAABcE/urgepOGAthk/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2012/01/problem-with-risks-and-issues-in-pwa.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04BQnY_fip7ImA9WhRXE0Q.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-3818982147871570878</id><published>2011-12-20T09:45:00.001-06:00</published><updated>2011-12-20T09:45:53.846-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-20T09:45:53.846-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010" /><title>Error When Deploying a Custom Solution in SharePoint 2010</title><content type="html">&lt;p&gt;This is an error I received when trying to deploy a SharePoint 2010 with a custom site definition in my development environment&lt;/p&gt; &lt;h3&gt;&lt;font color="#ff0000"&gt;Error&lt;/font&gt;&lt;/h3&gt; &lt;p&gt;"PMS_FG" and "PMS_FG" contain a file that deploys to the same Package location: PMS\PMS_FG\documents.aspx&amp;nbsp;&amp;nbsp;&amp;nbsp; D:\Users\dalzoubi\Solutions\PMIS\Spectra.PMS2010\Package\Package.package&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-WXnc_U7osC4/TvCtOWkGn5I/AAAAAAAABac/XdhmLt0RsG8/s1600-h/image%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-3X020Ailfm8/TvCtQcwOJDI/AAAAAAAABak/i_z5SQQO43w/image_thumb.png?imgmax=800" width="244" height="152"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Looking at the folder PMS_FG\, there is only one document.aspx file!!!&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Ff-K3EZ3k7Y/TvCtQ688oqI/AAAAAAAABas/htLcAziLNNc/s1600-h/image%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-j74LGZdY4UY/TvCtT67SONI/AAAAAAAABa0/I6bpOyIix-8/image_thumb%25255B1%25255D.png?imgmax=800" width="156" height="244"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So that did not make sense at first site, so&amp;nbsp; I decided to open the Visual Studio Project Item Data file that represents the site definition to see what is going wrong in there.&lt;/p&gt; &lt;h3&gt;&lt;font color="#008000"&gt;Solution&lt;/font&gt;&lt;/h3&gt; &lt;p&gt;1. In &lt;strong&gt;Solution Explorer&lt;/strong&gt;, right click the &lt;strong&gt;Site Definitions&lt;/strong&gt; and click &lt;strong&gt;Open Folder in Windows Explorer&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-u5M-Z9WtK4Q/TvCtXyKEwWI/AAAAAAAABa8/vB3xlvXbJEw/s1600-h/image%25255B8%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-A9ryVbJiVYE/TvCtaRn10HI/AAAAAAAABbE/kKrQtnNjd8Q/image_thumb%25255B2%25255D.png?imgmax=800" width="194" height="244"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;2. In explorer view, double click &lt;strong&gt;SharePointProjectItem.spdata&lt;/strong&gt;, select &lt;strong&gt;Select a program from a list of installed programs&lt;/strong&gt;, click &lt;strong&gt;OK&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;3. Select &lt;strong&gt;Notepad&lt;/strong&gt;, uncheck &lt;strong&gt;Always use the selected program to open this kind of file&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;4. Click &lt;strong&gt;OK&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;5. Notepad opens and right there you will notice one element that is different than the other elements:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-1EAbB-I705c/TvCtdTgokTI/AAAAAAAABbM/WxYl4jHDoxo/s1600-h/image%25255B11%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-mBZ9aA1OrD4/TvCth2WQPDI/AAAAAAAABbU/xmNXTiIrJOk/image_thumb%25255B3%25255D.png?imgmax=800" width="244" height="158"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;6. Remove that element, Save and close your file.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-RLkZlNH4VpQ/TvCtkiQlvQI/AAAAAAAABbc/zmQlDefh3EM/s1600-h/image%25255B14%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-ai2OHPd2iqk/TvCtrfGkSwI/AAAAAAAABbk/9jE_sGh1lOk/image_thumb%25255B4%25255D.png?imgmax=800" width="244" height="158"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;7. Go back to &lt;strong&gt;Visual Studio&lt;/strong&gt;, you will be asked to reload that file, click &lt;strong&gt;Yes to All&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-wm5eqdngyLQ/TvCtrkgv6CI/AAAAAAAABbs/NRHnLOrnTRs/s1600-h/image%25255B17%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-P32s7jgqx6k/TvCtsOQGiwI/AAAAAAAABb0/iW1R2_1dPvc/image_thumb%25255B5%25255D.png?imgmax=800" width="244" height="84"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;8. Now try to deploy your solution, you should no longer have that error. &lt;/p&gt; &lt;p&gt;Happy coding!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-3818982147871570878?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YEU8zccZR8ITrBZtD-17ahCMuZU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YEU8zccZR8ITrBZtD-17ahCMuZU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YEU8zccZR8ITrBZtD-17ahCMuZU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YEU8zccZR8ITrBZtD-17ahCMuZU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/4TIpOm6iRZw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/3818982147871570878/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=3818982147871570878&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/3818982147871570878?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/3818982147871570878?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/4TIpOm6iRZw/error-when-deploying-custom-solution-in.html" title="Error When Deploying a Custom Solution in SharePoint 2010" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-3X020Ailfm8/TvCtQcwOJDI/AAAAAAAABak/i_z5SQQO43w/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2011/12/error-when-deploying-custom-solution-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEECRn48eCp7ImA9WhdUEkk.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-7353309871493446360</id><published>2011-09-28T16:44:00.001-05:00</published><updated>2011-09-28T16:51:07.070-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-28T16:51:07.070-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Console application with SharePoint client object model crashes when run remotely</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
So I started experimenting with the new client object model that comes with SharePoint 2010. I created a console application that references Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll to use the capabilities of this object model.&lt;br /&gt;
I created an application that simply looks at one of the lists on my root site and prints out the list name, COOL app huh!&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Net;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;using&lt;/span&gt; Microsoft.SharePoint.Client;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;namespace&lt;/span&gt; SharePointTest&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;{&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    &lt;span style="color: blue;"&gt;class&lt;/span&gt; Program&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    {&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Main(&lt;span style="color: blue;"&gt;string&lt;/span&gt;[] args)&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        {&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            &lt;span style="color: blue;"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            {&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                var credential = &lt;span style="color: blue;"&gt;new&lt;/span&gt; NetworkCredential(&lt;span style="color: #006080;"&gt;"user"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"pass"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"domain"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                var clientContext = &lt;span style="color: blue;"&gt;new&lt;/span&gt; ClientContext(&lt;span style="color: #006080;"&gt;"http://sp2010"&lt;/span&gt;) {Credentials = credential};&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                Web web = clientContext.Web;&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                List projects = web.Lists.GetByTitle(&lt;span style="color: #006080;"&gt;"Projects"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                clientContext.Load(projects);&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                clientContext.ExecuteQuery();&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                Console.WriteLine(&lt;span style="color: #006080;"&gt;"List name: {0}."&lt;/span&gt;, projects.Title);&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            }&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            &lt;span style="color: blue;"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            {&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                Console.WriteLine(ex.Message);&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            }&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            Console.ReadLine();&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        }&lt;/pre&gt;
&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    }&lt;/pre&gt;
&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
Worked like a charm on my virtual development box that has SP2010 installed on it. So I decided to move it to my Win7 environment to see if it does what it claims to do (which is run remotely!). To come to a surprise that application crashes! even when wrapping my code with Try Catch blocks.&lt;br /&gt;
&lt;h4&gt;


&lt;b&gt;&lt;span style="color: red;"&gt;Issue&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
Console application with SharePoint client object model crashes when run remotely.&lt;br /&gt;
&lt;h4&gt;


&lt;span style="color: red;"&gt;Solution&lt;/span&gt;&lt;/h4&gt;
Register Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll in GAC on the remote computer where you like to run your application that references the above assemblies.&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-7353309871493446360?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/g_cHIeGwRFqoy8CDTJkRGw96AyM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/g_cHIeGwRFqoy8CDTJkRGw96AyM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/g_cHIeGwRFqoy8CDTJkRGw96AyM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/g_cHIeGwRFqoy8CDTJkRGw96AyM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/fvluPwTZr2Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/7353309871493446360/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=7353309871493446360&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/7353309871493446360?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/7353309871493446360?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/fvluPwTZr2Q/console-application-with-sharepoint.html" title="Console application with SharePoint client object model crashes when run remotely" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2011/09/console-application-with-sharepoint.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUBSXg4fyp7ImA9WhdVFE0.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-7158522875378108091</id><published>2011-09-18T21:39:00.002-05:00</published><updated>2011-09-18T21:44:18.637-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-18T21:44:18.637-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>One Issue with Web.Fields.Add in SharePoint 2010</title><content type="html">I was trying to add a field, and for the heck of it, I decided to start with a field name that has spaces in it:&lt;br /&gt;
&lt;div id="codeSnippetWrapper"&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;string&lt;/span&gt; benefitsLongDesc = web.Fields.Add(&lt;span style="color: #006080;"&gt;"Benefits Long Description"&lt;/span&gt;, SPFieldType.Note, &lt;span style="color: blue;"&gt;false&lt;/span&gt;);
web.Update();

SPField benefitsLongDescField = web.Fields[benefitsLongDesc];
benefitsLongDescField.Title = &lt;span style="color: #006080;"&gt;"Long Description"&lt;/span&gt;;
benefitsLongDescField.Group = &lt;span style="color: #006080;"&gt;"Human Resources"&lt;/span&gt;;
benefitsLongDescField.Update();
&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;I was surprised that code line 4 failed to resolve field, even when I’m returning the internal field name from code line 1.&lt;/div&gt;&lt;br /&gt;
To resolve this, you have a couple of options:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Don’t use spaces in the Display Name in code line 1, which is preferred as you don’t want your field internal name to contain spaces that get converted to _x0020_ and make your life miserable trying to remember to add those characters every time you want to call the field.&lt;/li&gt;
&lt;li&gt;In code line 3, instead of getting the field from web.Fields directly, use the following:&lt;/li&gt;
&lt;/ol&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;SPField benefitsLongDescField = web.Fields.GetFieldByInternalName(benefitsLongDesc);&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Happy coding!&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-7158522875378108091?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ej0mx_sQ7bW15HygBh4VrXPLZEI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ej0mx_sQ7bW15HygBh4VrXPLZEI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ej0mx_sQ7bW15HygBh4VrXPLZEI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ej0mx_sQ7bW15HygBh4VrXPLZEI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/Qx03xRKiYDk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/7158522875378108091/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=7158522875378108091&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/7158522875378108091?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/7158522875378108091?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/Qx03xRKiYDk/one-issue-with-webfieldsadd-in.html" title="One Issue with Web.Fields.Add in SharePoint 2010" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2011/09/one-issue-with-webfieldsadd-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYAQH4-fip7ImA9WhZWGEw.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-2592286685674644353</id><published>2011-05-19T09:58:00.001-05:00</published><updated>2011-05-19T09:59:01.056-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-19T09:59:01.056-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>When not to use SPContext.Current.Web</title><content type="html">&lt;p&gt;This morning I was trying to change a title of a webpart that I have in my SharePoint site, when I noticed that its not working and throwing the following error&lt;/p&gt; &lt;p&gt;Cannot save the property settings for this Web Part. Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_MScGvomCHCc/TdUwI73yMjI/AAAAAAAABVg/qu3QD_3LpII/s1600-h/image%5B5%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_MScGvomCHCc/TdUwJaCK5tI/AAAAAAAABVk/AXF2rgH_BTc/image_thumb%5B1%5D.png?imgmax=800" width="244" height="234"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I was surprised since nothing much has changed in that page since the last time we created it!&lt;/p&gt; &lt;p&gt;So I started looking for an answer, and as usual the first spot was the SharePoint logs and that proved useless as it only showed the error message that the webpart was displaying, duh!&lt;/p&gt; &lt;p&gt;Next step was to run Visual Studio in debug mode to see if I can catch any exceptions on the page that our custom webparts may have caused, and that didn’t work either.&lt;/p&gt; &lt;p&gt;the final step was to remove the webparts of the page one by one to see which one was causing the issue and viola! When removing the webpart, the error disappeared for all the other webparts. So I decided to open up Visual Studio again and inspect the code for that webpart.&lt;/p&gt; &lt;p&gt;This webpart was doing a lot of things, but one thing I have noticed was the use of &lt;strong&gt;SPContext.Current.Web&lt;/strong&gt; in one of the methods and while I was searching the web for an answer, some people mentioned that this call causes issues, so I replaced that call with &lt;strong&gt;using (SPWeb web = SPContext.Current.Site.OpenWeb()) &lt;/strong&gt;and that worked! Unbelievable.&lt;/p&gt; &lt;p&gt;&lt;font color="#c0504d"&gt;Lessons learned: do not use &lt;strong&gt;SPContext.Current.Web&lt;/strong&gt;&amp;nbsp; or even &lt;strong&gt;SPControl.GetContextWeb(Context) &lt;/strong&gt;in your webparts as that causes issues with the webpart page.&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-2592286685674644353?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UMH-QZumucq35VqOrkztQY_jKoI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UMH-QZumucq35VqOrkztQY_jKoI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UMH-QZumucq35VqOrkztQY_jKoI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UMH-QZumucq35VqOrkztQY_jKoI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/NAaW6JwQcoI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/2592286685674644353/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=2592286685674644353&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/2592286685674644353?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/2592286685674644353?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/NAaW6JwQcoI/when-not-to-use-spcontextcurrentweb.html" title="When not to use SPContext.Current.Web" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_MScGvomCHCc/TdUwJaCK5tI/AAAAAAAABVk/AXF2rgH_BTc/s72-c/image_thumb%5B1%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2011/05/when-not-to-use-spcontextcurrentweb.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAARHs_cSp7ImA9Wx9VFks.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-2798181577654986803</id><published>2011-02-02T10:17:00.001-06:00</published><updated>2011-02-02T10:22:25.549-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-02T10:22:25.549-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Get the date for a specific day of the week</title><content type="html">&lt;p&gt;Ever needed a way to get the date for a specific day of the week (i.e. The date for last Thursday, date next Friday, get date for the next Friday after 2/2/2011, etc.)&lt;/p&gt; &lt;p&gt;I have created an extension method that will help you accomplish that:&lt;/p&gt; &lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;  &lt;p&gt; &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;/// Gets the day of week.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;param name="date"&amp;gt;Baseline Date .&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;param name="day"&amp;gt;The day you want to find.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;param name="inFuture"&amp;gt;if set to true, then looks into the future, else it looks in the past&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;param name="includeToday"&amp;gt;if set to &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt; it includes the date's day when searching.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; DateTime GetDayOfWeek(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt; DateTime date, DayOfWeek day, &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; inFuture, &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; includeToday)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    DateTime currentDate = date;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; sameDay = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;while&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (currentDate.DayOfWeek == day &amp;amp;&amp;amp; (includeToday || !sameDay))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DateTime(currentDate.Year, currentDate.Month, currentDate.Day, 0, 0, 0);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (currentDate &amp;gt; DateTime.MaxValue.AddDays(-1) ||&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            currentDate &amp;lt; DateTime.MinValue.AddDays(1))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ArgumentOutOfRangeException(currentDate + &lt;span style="color: #006080"&gt;" is out of range"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        currentDate = currentDate.AddDays(inFuture ? 1 : -1);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        sameDay = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;Hope this helps you!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-2798181577654986803?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_Nd5bzzN0daCsx744gf2noyXJQw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_Nd5bzzN0daCsx744gf2noyXJQw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_Nd5bzzN0daCsx744gf2noyXJQw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_Nd5bzzN0daCsx744gf2noyXJQw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/_OBB7xFGPgU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/2798181577654986803/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=2798181577654986803&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/2798181577654986803?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/2798181577654986803?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/_OBB7xFGPgU/get-date-for-specific-day-of-week.html" title="Get the date for a specific day of the week" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2011/02/get-date-for-specific-day-of-week.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcFRHg6fCp7ImA9Wx9XEUo.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-7849495002398402143</id><published>2011-01-04T14:45:00.001-06:00</published><updated>2011-01-04T14:46:55.614-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-04T14:46:55.614-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Ways to Get SPList Object In Your C# Code</title><content type="html">&lt;p&gt;I was looking at a code that I wrote for m=one of my projects earlier today and here is the code snippet that I was got my attention and made me think if there is a better way to retrieve the SP list in my methods:&lt;/p&gt; &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;//web is an SPWeb object created somewhere earlier in my code&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;SPList list = web.Lists[&lt;span style="color: #006080"&gt;"Tasks"&lt;/span&gt;];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Right away I can see two issues:&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;If that list doesn’t exist, then my code will blow up.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;What if the list exists but one of the power users renames it? then again, my code will blow up&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Problem: code blowing up if list title does not exist in the SPListCollection object under SPWeb.Lists!&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Solution 1: Wrap your code with a try catch block&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;SPList list = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #008000"&gt;//web is an SPWeb object created somewhere earlier in my code&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    list = web.Lists[&lt;span style="color: #006080"&gt;"Tasks"&lt;/span&gt;];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #008000"&gt;//Log this or do whatever you feel like doing to report the issue&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;This will stop your code from firing an exception, but now there is a big chance of getting this exception especially in an environment where users keep changing stuff around the site. so no love for this solution (in my opinion) as it does solve issue #1 but not #2.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Solution 2: Create a method that will enumerate through the SPListCollection and find that title or return null&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; SPList GetListByTitle(SPWeb web, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; listTitle)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (SPList list &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; web.Lists)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (list.Title.Equals(listTitle, StringComparison.InvariantCultureIgnoreCase))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; list;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;This method will now fire any exceptions and return null back to the caller if the list was not found. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;This was the solution I implemented for the project I worked on. BUT I knew there is a better way to doing that as this still does not solve my issue #1 but not #2&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Solution 3: get list by URI instead of Title (Optimal)&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; SPList GetListByUrl(SPWeb web, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; listUrl)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; web.GetList(web.Url + listUrl);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Now this is a solution that I like, as the list URI will never change, even if the user changes the list title. I wonder why I haven’t thought of this one before!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Happy Coding!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-7849495002398402143?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DZoMPD-TqbSrfvzz24KdH8Epo2U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DZoMPD-TqbSrfvzz24KdH8Epo2U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DZoMPD-TqbSrfvzz24KdH8Epo2U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DZoMPD-TqbSrfvzz24KdH8Epo2U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/PItvwAoqYok" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/7849495002398402143/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=7849495002398402143&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/7849495002398402143?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/7849495002398402143?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/PItvwAoqYok/ways-to-get-splist-object-in-your-c.html" title="Ways to Get SPList Object In Your C# Code" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2011/01/ways-to-get-splist-object-in-your-c.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQCSXYzeip7ImA9Wx5VGUw.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-6762925908347335455</id><published>2010-10-11T16:50:00.001-05:00</published><updated>2010-10-12T14:06:08.882-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-12T14:06:08.882-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>C# Extension Methods to Serialize and Deserialize any object</title><content type="html">&lt;p&gt;I don’t know if that has lots of usages where you come from, but felt like it was a nice thing to have and thought of sharing it with you&lt;/p&gt; &lt;p&gt;I needed a method that can serialize and object that I can create and deserialize any string that represents any type, so ended up with the following extension methods:&lt;/p&gt; &lt;div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: 'Courier New', courier, monospace; background-color: #f4f4f4; text-align: left"&gt; &lt;div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// Serializes the specified obj.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;param name="obj"&amp;gt;The obj.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;returns&amp;gt;A string representing serialized data&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&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;string&lt;/span&gt; Serialize(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; obj)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #008000"&gt;//Check is object is serializable before trying to serialize&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (obj.GetType().IsSerializable)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;        &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; (var stream = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MemoryStream())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            var serializer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XmlSerializer(obj.GetType());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            serializer.Serialize(stream, obj);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            var bytes = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[stream.Length];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;            stream.Position = 0;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            stream.Read(bytes, 0, bytes.Length);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Encoding.UTF8.GetString(bytes);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NotSupportedException(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #006080"&gt;"{0} is not serializable."&lt;/span&gt;, obj.GetType()));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// Deserializes the specified serialized data.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;param name="serializedData"&amp;gt;The serialized data.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; T Deserialize&amp;lt;T&amp;gt;(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; serializedData)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;    var serializer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XmlSerializer(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt; (T));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    var reader = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XmlTextReader(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StringReader(serializedData));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (T) serializer.Deserialize(reader);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Happy Coding!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-6762925908347335455?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/B07Ag7yU7UBelS-h-U_RfRz89u4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B07Ag7yU7UBelS-h-U_RfRz89u4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/B07Ag7yU7UBelS-h-U_RfRz89u4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B07Ag7yU7UBelS-h-U_RfRz89u4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/zrMZscI90as" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/6762925908347335455/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=6762925908347335455&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/6762925908347335455?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/6762925908347335455?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/zrMZscI90as/c-extension-methods-to-serialize-and.html" title="C# Extension Methods to Serialize and Deserialize any object" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/10/c-extension-methods-to-serialize-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAFRHo_fyp7ImA9Wx9aF0U.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-2055594165306056510</id><published>2010-10-11T11:07:00.004-05:00</published><updated>2011-03-10T12:45:15.447-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-10T12:45:15.447-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><title>Extension Method to Send HTML Emails in SharePoint</title><content type="html">You can use this method to extend SPWeb to send HTML email and lets you specifies the From, To, CC, Bcc, subject and body of the email and uses the out of the box SPUtility.SendEmail to send the email (without the need to specify all details of the mail server)&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border: 1px solid silver; cursor: text; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; height: 307px; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding: 4px; text-align: left; width: 97.5%;"&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// Sends an email to the selected users&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;param name="web"&amp;gt;The web.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;param name="from"&amp;gt;From.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;param name="to"&amp;gt;To.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;param name="cc"&amp;gt;The cc.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;param name="bcc"&amp;gt;The BCC.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;param name="subject"&amp;gt;The subject.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;param name="body"&amp;gt;The body.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/// &amp;lt;param name="isHtml"&amp;gt;if set to &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt; [is HTML].&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; SendEmail(&lt;span style="color: blue;"&gt;this&lt;/span&gt; SPWeb web, &lt;span style="color: blue;"&gt;string&lt;/span&gt; from, &lt;span style="color: blue;"&gt;string&lt;/span&gt; to,&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;string&lt;/span&gt; cc, &lt;span style="color: blue;"&gt;string&lt;/span&gt; bcc, &lt;span style="color: blue;"&gt;string&lt;/span&gt; subject, &lt;span style="color: blue;"&gt;string&lt;/span&gt; body,&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;bool&lt;/span&gt; isHtml)&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;{&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;// &amp;lt;pex&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (web == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; ArgumentNullException(&lt;span style="color: #006080;"&gt;"web"&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;// &amp;lt;/pex&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (!&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(to))&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;{&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;var headers = &lt;span style="color: blue;"&gt;new&lt;/span&gt; StringDictionary&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;{&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;{&lt;span style="color: #006080;"&gt;"to"&lt;/span&gt;, to},&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;{&lt;span style="color: #006080;"&gt;"subject"&lt;/span&gt;, subject},&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;{&lt;span style="color: #006080;"&gt;"content-type"&lt;/span&gt;, isHtml ? &lt;span style="color: #006080;"&gt;"text/html"&lt;/span&gt; : &lt;span style="color: #006080;"&gt;"text/plain"&lt;/span&gt;}&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;};&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;headers.AddNewItem(&lt;span style="color: #006080;"&gt;"from"&lt;/span&gt;, from);&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;headers.AddNewItem(&lt;span style="color: #006080;"&gt;"cc"&lt;/span&gt;, cc);&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;headers.AddNewItem(&lt;span style="color: #006080;"&gt;"bcc"&lt;/span&gt;, bcc);&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;SPUtility.SendEmail(web, headers, body);&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;}&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;}&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; AddNewItem(&lt;span style="color: blue;"&gt;this&lt;/span&gt; StringDictionary stringDictionary,  &lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;string&lt;/span&gt; key, &lt;span style="color: blue;"&gt;string&lt;/span&gt; &lt;span style="color: blue;"&gt;value&lt;/span&gt;)&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;{&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (!&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="color: blue;"&gt;value&lt;/span&gt;) &amp;amp;&amp;amp; !stringDictionary.ContainsKey(key))&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;{&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;stringDictionary.Add(&lt;span style="color: #006080;"&gt;key&lt;/span&gt;, &lt;span style="color: blue;"&gt;value&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;}&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-2055594165306056510?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XTA0MnRM2j8yX-F8SyCa7PrtnJE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XTA0MnRM2j8yX-F8SyCa7PrtnJE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XTA0MnRM2j8yX-F8SyCa7PrtnJE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XTA0MnRM2j8yX-F8SyCa7PrtnJE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/wG7Ir-bb3LA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/2055594165306056510/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=2055594165306056510&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/2055594165306056510?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/2055594165306056510?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/wG7Ir-bb3LA/extension-method-to-send-html-emails-in.html" title="Extension Method to Send HTML Emails in SharePoint" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/10/extension-method-to-send-html-emails-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUINRn06eyp7ImA9Wx5VE0w.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-4585893749558158090</id><published>2010-10-05T17:26:00.001-05:00</published><updated>2010-10-05T17:26:37.313-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-05T17:26:37.313-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><title>Developing Custom SharePoint 2007 Workflows in a 64-bit Development Environment</title><content type="html">&lt;p&gt;I got a new requirement last week to build a state machine workflow for my client, and having the experience in building workflow, I went ahead and put in the time estimate needed to complete this task.&lt;/p&gt; &lt;p&gt;So I went into VS2010, &lt;strong&gt;File –&amp;gt; New –&amp;gt; Project&lt;/strong&gt;, Under &lt;strong&gt;Installed Templates&lt;/strong&gt;, drill down to &lt;strong&gt;Visual C# –&amp;gt; SharePoint –&amp;gt; 2007 &lt;/strong&gt;and select&lt;strong&gt; SharePoint 2007 State Machine Workflow,&lt;/strong&gt;&amp;nbsp; type in a name for your project and hit &lt;strong&gt;OK.&lt;/strong&gt; and BOOM! I get an error!!!&lt;/p&gt; &lt;h3&gt;Issue&lt;/h3&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_MScGvomCHCc/TKul-uPIyVI/AAAAAAAABQw/RQ6rH3Yah1E/s1600-h/image%5B2%5D.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="39" alt="image" src="http://lh3.ggpht.com/_MScGvomCHCc/TKul-zVofCI/AAAAAAAABQ0/woY7jcsXSaI/image_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Error message: A 32-bit version of Windows SharePoint Services is required by this project but is not installed on the system. Please install Windows SharePoint Services 3.0, available either from the Microsoft Download Center or as part of Microsoft Office SharePoint Server 2007.&lt;/p&gt; &lt;h3&gt;Solution&lt;/h3&gt; &lt;p&gt;After researching this issue, I realized it is not possible to build workflows using the VS template to build workflows on a 64bit machine, what a bummer right!&lt;/p&gt; &lt;p&gt;Some sites recommended using &lt;a href="http://wspbuilder.codeplex.com/" target="_blank"&gt;WSPBuilder&lt;/a&gt;’s workflow template to create a state machine workflow that would work on a 64bit machine, so I went back, deleted the broken solution folder that just got created and started fresh in VS2010.&lt;/p&gt; &lt;p&gt;So I went into VS2010, &lt;strong&gt;File –&amp;gt; New –&amp;gt; Project&lt;/strong&gt;, Under &lt;strong&gt;Installed Templates&lt;/strong&gt;, drill down to &lt;strong&gt;Visual C# –&amp;gt; WSPBuilder &lt;/strong&gt;and select&lt;strong&gt; WSPBuilder Project with Workflow,&lt;/strong&gt;&amp;nbsp; type in a name for your project and hit &lt;strong&gt;OK.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This created the shell for developing my workflow, didn’t seem to blow up which is a good sign so far.&lt;/p&gt; &lt;p&gt;Next step was to add the actual workflow feature that will deploy my workflow to my environment.&lt;/p&gt; &lt;p&gt;So I went to &lt;strong&gt;Project–&amp;gt; Add New Item&lt;/strong&gt;, Under &lt;strong&gt;Installed Templates&lt;/strong&gt;, drill down to &lt;strong&gt;Visual C# –&amp;gt; WSPBuilder &lt;/strong&gt;and select&lt;strong&gt; State Machine Workflow,&lt;/strong&gt;&amp;nbsp; type in a name and hit &lt;strong&gt;OK&lt;/strong&gt;. Next its going to show you the feature wizard, set it up as you please and hit &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;After that step, your solution explorer should look similar to this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_MScGvomCHCc/TKul_Vsme1I/AAAAAAAABQ4/5lTFGwJvh_4/s1600-h/image%5B5%5D.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://lh4.ggpht.com/_MScGvomCHCc/TKul_ho-TPI/AAAAAAAABQ8/iTEQ-YCQFAw/image_thumb%5B1%5D.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Now, if you open the workflow designer by double clicking on the &lt;strong&gt;StateWorkflowFeature1.cs&lt;/strong&gt;, you should see the workflow designer that allows you to create your actual workflow. DONE? not so fast!!! if you look at your toolbox, you will notice that SharePoint Workflow Actions are missing! and what good will that do me if I cannot get those to work with…&lt;/p&gt; &lt;h3&gt;Issue&lt;/h3&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;SharePoint Workflow Toolbox Tab is missing and cannot get it to show up in my project&lt;/p&gt; &lt;h3&gt;Solution&lt;/h3&gt; &lt;p&gt;Looking at my &amp;lt;Projectname&amp;gt;.csproj file in notepad made me realize that my project has the following ProjectTypeGuids:&lt;/p&gt; &lt;p&gt;&amp;lt;ProjectTypeGuids&amp;gt;{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&amp;lt;/ProjectTypeGuids&amp;gt;&lt;/p&gt; &lt;p&gt;After looking at &lt;a href="http://www.mztools.com/Articles/2008/MZ2008017.aspx" target="_blank"&gt;this blog post&lt;/a&gt;, I found out that they represent the following project types:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Workflow (C#) {14822709-B5A1-4724-98CA-57A101D1B079}  &lt;li&gt;Windows (C#) {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Hmm, where is the SharePoint workflow reference?! so I picked the SharePoint Workflow reference and added it to the ProjectTypesGUIDS so that they look like the following:&lt;/p&gt; &lt;p&gt;&amp;lt;ProjectTypeGuids&amp;gt;{F8810EC1-6754-47FC-A15F-DFABD2E3FA90};{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&amp;lt;/ProjectTypeGuids&amp;gt;&lt;/p&gt; &lt;p&gt;Reloaded my project and viola! my Workflow designer is now showing the &lt;strong&gt;SharePoint Workflow&lt;/strong&gt; toolbox items.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-4585893749558158090?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vNGHpdPF4Pn-TF9EUj0GwnE4lv0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vNGHpdPF4Pn-TF9EUj0GwnE4lv0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vNGHpdPF4Pn-TF9EUj0GwnE4lv0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vNGHpdPF4Pn-TF9EUj0GwnE4lv0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/chAFx7Xzyvk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/4585893749558158090/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=4585893749558158090&amp;isPopup=true" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/4585893749558158090?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/4585893749558158090?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/chAFx7Xzyvk/developing-sharepoint-2007-workflows-in.html" title="Developing Custom SharePoint 2007 Workflows in a 64-bit Development Environment" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_MScGvomCHCc/TKul-zVofCI/AAAAAAAABQ0/woY7jcsXSaI/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/10/developing-sharepoint-2007-workflows-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08GRngzeSp7ImA9Wx5SF08.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-6999729797209044567</id><published>2010-08-13T13:57:00.001-05:00</published><updated>2010-08-13T13:57:07.681-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-13T13:57:07.681-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><title>What to do if you unintentionally delete your SharePoint 2007 site AppPool or website from IIS?</title><content type="html">&lt;p&gt;I was playing with SharePoint and trying to break it in any way possible (which is easy btw, just think outside the box!)&lt;/p&gt; &lt;p&gt;So I went to IIS, and firstly deleted my SharePoint – 8090 Website and guess what? I can no longer access my site. Imagine if that was a production site!!!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Problem: &lt;/u&gt;&lt;/strong&gt;I deleted my Website for my Site in IIS (now this can happen for other reasons than just deleting it manually) and need to restore it without loosing my data stored in content database.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Solution:&lt;/u&gt;&lt;/strong&gt; you are screwed! no I’m just kidding… the beauty of SharePoint 2007 is that they have thought of that and already have a solution for it.&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Note: &lt;/strong&gt;I would strongly recommend creating a full backup of your environment before trying this approach as&amp;nbsp; its not a guarantee that you will get your sites back and running and may affect other running applications/processes that may have used that website for other reasons.&lt;/font&gt;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Start &lt;strong&gt;Internet Explorer &lt;/strong&gt;and navigate to &lt;strong&gt;Central Administration &lt;/strong&gt;site&lt;/li&gt; &lt;li&gt;Click &lt;strong&gt;Application Management &lt;/strong&gt;tab and then click &lt;strong&gt;Content Databases &lt;/strong&gt;under &lt;strong&gt;SharePoint Web Application Management &lt;/strong&gt;section.&lt;/li&gt; &lt;li&gt;Make sure that your web application affected is selected and write down the content DB name (in my case its &lt;a href="http://lh5.ggpht.com/_MScGvomCHCc/TGWVdArbStI/AAAAAAAABQQ/4rsGhsxX5-Y/s1600-h/image%5B2%5D.png"&gt;&lt;strong&gt;WSS_Content_8090) &lt;/strong&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_MScGvomCHCc/TGWVeJj-1vI/AAAAAAAABQU/o6e--SRCloA/image_thumb.png?imgmax=800" width="244" height="27"&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/_MScGvomCHCc/TGWVdArbStI/AAAAAAAABQQ/4rsGhsxX5-Y/s1600-h/image%5B2%5D.png"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Click &lt;strong&gt;Application Management &lt;/strong&gt;tab and then click &lt;strong&gt;Delete Web Application &lt;/strong&gt;under &lt;strong&gt;SharePoint Web Application Management &lt;/strong&gt;section.&lt;/li&gt; &lt;li&gt;Make sure that &lt;strong&gt;Delete content databases &lt;/strong&gt;is set to &lt;strong&gt;No. &lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/_MScGvomCHCc/TGWVfAyXl3I/AAAAAAAABQY/Q6ktNEJrOa8/s1600-h/image%5B15%5D.png"&gt;&lt;strong&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_MScGvomCHCc/TGWVgpzssbI/AAAAAAAABQc/cxTV2DPfgI4/image_thumb%5B5%5D.png?imgmax=800" width="42" height="30"&gt;&lt;/strong&gt;&lt;/a&gt;, click &lt;strong&gt;Delete&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;Once operation is completed. click &lt;strong&gt;Create or Extend Web Application &lt;/strong&gt;under &lt;strong&gt;SharePoint Web Application Management &lt;/strong&gt;section, then click &lt;strong&gt;Create new Web Application&lt;/strong&gt;.&lt;/li&gt; &lt;li&gt;Configure the web application to use port 8090 (or any other port if you want to use a different port this time)&lt;/li&gt; &lt;li&gt;&lt;font color="#ff0000"&gt;The key thing now is to choose the same content database now as the one that was attached to the affected site (in my case it was WSS_Content_8090)&lt;/font&gt;&lt;/li&gt; &lt;li&gt;Once done, click &lt;strong&gt;Ok &lt;/strong&gt;and wait for the process to complete.&lt;/li&gt; &lt;li&gt;That’s it! Try to navigate to your site and you should be able to see the contents.&lt;/li&gt;&lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-6999729797209044567?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BBgOGHH772vE1SXC77-XseDgY3Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BBgOGHH772vE1SXC77-XseDgY3Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BBgOGHH772vE1SXC77-XseDgY3Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BBgOGHH772vE1SXC77-XseDgY3Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/hfqH0bOfF7c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/6999729797209044567/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=6999729797209044567&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/6999729797209044567?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/6999729797209044567?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/hfqH0bOfF7c/what-to-do-if-you-unintentionally.html" title="What to do if you unintentionally delete your SharePoint 2007 site AppPool or website from IIS?" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_MScGvomCHCc/TGWVeJj-1vI/AAAAAAAABQU/o6e--SRCloA/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/08/what-to-do-if-you-unintentionally.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMARn4ycCp7ImA9WhdVFkw.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-3618163503484592811</id><published>2010-08-13T13:23:00.003-05:00</published><updated>2011-09-21T08:40:47.098-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-21T08:40:47.098-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><title>Getting a List’s Base View Programmatically</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
This is something that took me a little while to figure out but then realized how easy it was :-)&lt;br /&gt;
To get the base view from a list, you need to get the view that has an empty string for the name, weird right!!&lt;br /&gt;
So this is how you do it:&lt;br /&gt;
&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border: 1px solid silver; cursor: text; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding: 4px; text-align: left; width: 97.5%;"&gt;
&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;
&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New',courier,monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;SPView view = list.Views[&lt;span style="color: blue;"&gt;string&lt;/span&gt;.Empty];&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
Update: this will only work if the list is a custom list (meaning: you created the list definition and specified a baseview with ID 0).&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Update&lt;/b&gt;&lt;/u&gt; &lt;br /&gt;
This only applies to custom list created using custom list definition where you have specified a view with BaseID 0&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-3618163503484592811?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7JDH6aTf3-yYNypVZjcufg2KEfI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7JDH6aTf3-yYNypVZjcufg2KEfI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7JDH6aTf3-yYNypVZjcufg2KEfI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7JDH6aTf3-yYNypVZjcufg2KEfI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/7PFefoL8oAs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/3618163503484592811/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=3618163503484592811&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/3618163503484592811?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/3618163503484592811?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/7PFefoL8oAs/getting-lists-base-view.html" title="Getting a List’s Base View Programmatically" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/08/getting-lists-base-view.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IDRnw7eip7ImA9WxFXGUo.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-8815420561655978689</id><published>2010-05-27T09:46:00.001-05:00</published><updated>2010-05-27T09:46:17.202-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-27T09:46:17.202-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><title>Custom List Definitions: Customization of List Instances</title><content type="html">&lt;p&gt;Assume you are creating a custom list definition (without going into details on this part, &lt;a href="http://msdn.microsoft.com/en-us/library/ms466023.aspx" target="_blank"&gt;click here&lt;/a&gt; if you want more information) and it gets deployed to the site and you start creating instances of the list all over the place.&lt;/p&gt;  &lt;p&gt;John Dickhead, is one of the users of the site, and he really has a thing for change! goes into the site and modifies the list (creates new fields from the interface, adds new views and modifies the current views).&lt;/p&gt;  &lt;p&gt;A week after that, your manager comes back to you and asks you to add a new field to the list definition so that it gets applied to all the instances of your list. So you think &amp;quot;&lt;strong&gt;Oh, that’s a piece of cake, I just go to my list definition and add the field, reset IIS and everything will get updated auto-magically”&lt;/strong&gt; right? well, unfortunately that is not completely right and here is the reason:&lt;/p&gt;  &lt;p&gt;When MR. Dickhead decided to go and update his list from the interface, he actually disassociated that list instance from the definition and from that point on; any change to the list definition does not get applies to that list.&lt;/p&gt;  &lt;p&gt;That being said, you will need to update the list definition, and then create an upgrade methods (I used and STSADM command in my case to update the things that did not get updated).&lt;/p&gt;  &lt;p&gt;Happy Coding!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-8815420561655978689?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GhuhdA0UwT3YceYyXMwnD9mGpIo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GhuhdA0UwT3YceYyXMwnD9mGpIo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GhuhdA0UwT3YceYyXMwnD9mGpIo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GhuhdA0UwT3YceYyXMwnD9mGpIo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/rONjoozOWRM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/8815420561655978689/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=8815420561655978689&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/8815420561655978689?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/8815420561655978689?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/rONjoozOWRM/custom-list-definitions-customization.html" title="Custom List Definitions: Customization of List Instances" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/05/custom-list-definitions-customization.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYHQ3k6eCp7ImA9Wx5SF08.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-9190042516287909996</id><published>2008-04-23T09:49:00.000-05:00</published><updated>2010-08-13T13:28:52.710-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-13T13:28:52.710-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><title>Starting a SharePoint out of the box Approval Workflow Programmatically</title><content type="html">&lt;div class="ExternalClass06FEEB13375A44D099B388A8364CF5C1"&gt; &lt;div class="ExternalClass8BCA1D06E1554F36BAA74ACEF6786EFF"&gt; &lt;p&gt;This was something I needed to do for the client, where I had to start the out of the box approval workflow to make use of all the facilities provided by doing so (ability to edit task within outlook, ability to reassign tasks and change task ownership). &lt;/p&gt; &lt;p&gt;Prerequisites: you need to associate the default approval workflow with a list, call it "&lt;strong&gt;Approval&lt;/strong&gt;". &lt;/p&gt; &lt;p&gt;Then in your visual studio workflow add a code activity and include the following code snippet: &lt;/p&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;SPWorkflowAssociationCollection associationCol = WorkflowProperties.List.WorkflowAssociations;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (SPWorkflowAssociation association &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; associationCol)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (association.Name.Equals(&lt;span style="color: #006080"&gt;"Approval"&lt;/span&gt;))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        StringBuilder allApprovers = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; approver &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; Approvers)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            allApprovers.Append(&lt;span style="color: #006080"&gt;"&amp;lt;my:Person&amp;gt;"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            allApprovers.Append(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #006080"&gt;"&amp;lt;my:DisplayName&amp;gt;{0}&amp;lt;/my:DisplayName&amp;gt;"&lt;/span&gt;, approver));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            allApprovers.Append(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #006080"&gt;"&amp;lt;my:AccountId&amp;gt;{0}&amp;lt;/my:AccountId&amp;gt;"&lt;/span&gt;, approver));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            allApprovers.Append(&lt;span style="color: #006080"&gt;"&amp;lt;my:AccountType&amp;gt;User&amp;lt;/my:AccountType&amp;gt;"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            allApprovers.Append(&lt;span style="color: #006080"&gt;"&amp;lt;/my:Person&amp;gt;"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; associationData =&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:myFields xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:my=\"http://schemas.microsoft.com/office/infopath/2003/myXSD\" xml:lang=\"en-us\"&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:Reviewers&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        allApprovers +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;/my:Reviewers&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:CC&amp;gt;&amp;lt;/my:CC&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:DueDate xsi:nil=\"true\"&amp;gt;&amp;lt;/my:DueDate&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:Description&amp;gt;&amp;lt;/my:Description&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:Title&amp;gt;&amp;lt;/my:Title&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:DefaultTaskType&amp;gt;1&amp;lt;/my:DefaultTaskType&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:CreateTasksInSerial&amp;gt;true&amp;lt;/my:CreateTasksInSerial&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:AllowDelegation&amp;gt;true&amp;lt;/my:AllowDelegation&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:AllowChangeRequests&amp;gt;true&amp;lt;/my:AllowChangeRequests&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:StopOnAnyReject xsi:nil=\"true\"&amp;gt;&amp;lt;/my:StopOnAnyReject&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:WantedTasks xsi:nil=\"true\"&amp;gt;&amp;lt;/my:WantedTasks&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:SetMetadataOnSuccess&amp;gt;false&amp;lt;/my:SetMetadataOnSuccess&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:MetadataSuccessField&amp;gt;&amp;lt;/my:MetadataSuccessField&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:MetadataSuccessValue&amp;gt;&amp;lt;/my:MetadataSuccessValue&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:ApproveWhenComplete&amp;gt;false&amp;lt;/my:ApproveWhenComplete&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:TimePerTaskVal xsi:nil=\"true\"&amp;gt;&amp;lt;/my:TimePerTaskVal&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:TimePerTaskType xsi:nil=\"true\"&amp;gt;&amp;lt;/my:TimePerTaskType&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:Voting&amp;gt;false&amp;lt;/my:Voting&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:MetadataTriggerField&amp;gt;&amp;lt;/my:MetadataTriggerField&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:MetadataTriggerValue&amp;gt;&amp;lt;/my:MetadataTriggerValue&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:InitLock&amp;gt;false&amp;lt;/my:InitLock&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:MetadataStop&amp;gt;false&amp;lt;/my:MetadataStop&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:ItemChangeStop&amp;gt;false&amp;lt;/my:ItemChangeStop&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;my:GroupTasks&amp;gt;false&amp;lt;/my:GroupTasks&amp;gt;"&lt;/span&gt; +&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #006080"&gt;"&amp;lt;/my:myFields&amp;gt;"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        association.SetHistoryList(WorkflowProperties.HistoryList);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        association.SetTaskList(WorkflowProperties.TaskList);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        SPWorkflow approvalWorkflow = wfManager.StartWorkflow(WorkflowProperties.Item, association, associationData, &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-9190042516287909996?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KBYvOK5K-WzuTNZivprZ7OJRtNs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KBYvOK5K-WzuTNZivprZ7OJRtNs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KBYvOK5K-WzuTNZivprZ7OJRtNs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KBYvOK5K-WzuTNZivprZ7OJRtNs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/8HiBz-iIOIE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/9190042516287909996/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=9190042516287909996&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/9190042516287909996?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/9190042516287909996?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/8HiBz-iIOIE/starting-sharepoint-out-of-box-approval.html" title="Starting a SharePoint out of the box Approval Workflow Programmatically" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2008/04/starting-sharepoint-out-of-box-approval.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMBRnY7eCp7ImA9WhdVFkw.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-809506229611248095</id><published>2008-04-18T14:55:00.000-05:00</published><updated>2011-09-21T08:40:57.800-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-21T08:40:57.800-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><title>Showing Quick Launch Bar on Web Part pages in WSS 3.0</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="ExternalClass7DC8D5002237464FA7D0B13DDA5BA8A4"&gt;
&lt;span style="color: black;"&gt;Open your page in SharePoint Designer and delete these placeholders:        &lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server"&amp;gt;&amp;lt;/asp:Content&amp;gt;          &lt;br /&gt;&amp;lt;asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"&amp;gt;&amp;lt;/asp:Content&amp;gt;           &lt;br /&gt;&amp;lt;asp:Content ContentPlaceHolderId="PlaceHolderNavSpacer" runat="server"&amp;gt;&amp;lt;/asp:Content&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: black;"&gt;A simple way to don't have to do this manipulation on all your futurs pages is to modify the default page template at (I don't recommend this approach):        &lt;br /&gt;&lt;span style="font-family: courier new;"&gt;.\12\TEMPLATE\1036\STS\DOCTEMP\SMARTPGS\spstdX.aspx &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Your changes to the default SharePoint pages may get overwritten in case of service pack installs or upgrades.&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-809506229611248095?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aIhmLjWv90q5qHjZWwJHbSR_a0g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aIhmLjWv90q5qHjZWwJHbSR_a0g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aIhmLjWv90q5qHjZWwJHbSR_a0g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aIhmLjWv90q5qHjZWwJHbSR_a0g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/bqApBQ_3gyI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/809506229611248095/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=809506229611248095&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/809506229611248095?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/809506229611248095?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/bqApBQ_3gyI/showing-quick-launch-bar-on-web-part.html" title="Showing Quick Launch Bar on Web Part pages in WSS 3.0" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2008/04/showing-quick-launch-bar-on-web-part.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0AESHsyfSp7ImA9WxFSEkg.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-1502710966147476145</id><published>2008-04-18T12:50:00.000-05:00</published><updated>2010-04-14T09:35:09.595-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-14T09:35:09.595-05:00</app:edited><title>Compact VHD (Virtual Hard Disk) of your Virtual PC</title><content type="html">&lt;div class="ExternalClass4F2C8F9AE4E249C0A5AB1DE6E92307EC"&gt;   &lt;div class="ExternalClassB879ECC12A7641B5A328E6BD60E8D508"&gt;     &lt;ol&gt;       &lt;li&gt;Install dirms-s (&lt;a href="http://www.dirms.com/home/download/dirms_service.asp"&gt;&lt;span style="color: blue; text-decoration: underline"&gt;http://www.dirms.com/home/download/dirms_service.asp&lt;/span&gt;&lt;/a&gt;) and run the &amp;quot;Compact&amp;quot; Command (get rid of the empty spaces between your data on HDD) alternative disk defragmenting software can also be used. &lt;/li&gt;        &lt;li&gt;Backup any critical data in the guest OS. &lt;/li&gt;        &lt;li&gt;Download Eraser, (&lt;a href="http://www.tolvanen.com/eraser/"&gt;&lt;span style="color: blue; text-decoration: underline"&gt;http://www.tolvanen.com/eraser/&lt;/span&gt;&lt;/a&gt;) and install it in the guest OS. Alternative disk 'zeroing' software can also be used. &lt;/li&gt;        &lt;li&gt;Defragment the guest OS hard drive. &lt;/li&gt;        &lt;li&gt;Run Eraser in the virtual machine. &lt;/li&gt;        &lt;li&gt;Click Edit, then Preferences, then Erasing &lt;/li&gt;        &lt;li&gt;Select &lt;strong&gt;Unused Disk Space&lt;/strong&gt; &lt;/li&gt;        &lt;li&gt;Select &lt;strong&gt;New&lt;/strong&gt; &lt;/li&gt;        &lt;li&gt;Enter the &lt;strong&gt;description&lt;/strong&gt; Blank &lt;/li&gt;        &lt;li&gt;Click Add &lt;/li&gt;        &lt;li&gt;Create a 3-byte pattern of zeros &lt;/li&gt;        &lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt; &lt;/li&gt;        &lt;li&gt;Select Blank under Unused disk space &lt;/li&gt;        &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt;. &lt;/li&gt;        &lt;li&gt;Click &lt;strong&gt;File&lt;/strong&gt;, then &lt;strong&gt;New Task&lt;/strong&gt; &lt;/li&gt;        &lt;li&gt;Select &lt;strong&gt;Unused space on drive&lt;/strong&gt; &lt;/li&gt;        &lt;li&gt;Select &lt;strong&gt;Local Hard Drives&lt;/strong&gt; &lt;/li&gt;        &lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; &lt;/li&gt;        &lt;li&gt;Select &lt;strong&gt;Task&lt;/strong&gt;, then &lt;strong&gt;Run&lt;/strong&gt; on the previously created task &lt;/li&gt;        &lt;li&gt;Wait for completion &lt;/li&gt;        &lt;li&gt;Close the report &lt;/li&gt;        &lt;li&gt;Exit Eraser. &lt;/li&gt;        &lt;li&gt;From your Virtual PC window, click &lt;strong&gt;CD&lt;/strong&gt; -&amp;gt;&lt;strong&gt; Capture ISO Image&lt;/strong&gt;. &lt;/li&gt;        &lt;li&gt;In the &amp;quot;Select CD Image to Capture&amp;quot; dialog, navigate to C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions and select &amp;quot;Virtual Disk Precompactor.iso&amp;quot;. &lt;/li&gt;        &lt;li&gt;A popup window will show up asking you if you would you like to prepare the virtual hard disk(s) for compaction, select yes and let it finish. Note: if you don't see any popups, go to &amp;quot;My Computer&amp;quot; and double click your CD Drive. &lt;/li&gt;        &lt;li&gt;Wait for it to finish then Shut down your virtual machine. &lt;/li&gt;        &lt;li&gt;Open &amp;quot;Virtual PC Console (the one you use to manage all your virtual PCs). &lt;/li&gt;        &lt;li&gt;Click &lt;strong&gt;File&lt;/strong&gt;-&amp;gt; &lt;strong&gt;Virtual Disk Wizard&lt;/strong&gt;. &lt;/li&gt;        &lt;li&gt;In wizard, Click &lt;strong&gt;Next&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Edit an existing virtual disk&lt;/strong&gt; -&amp;gt; select the VHD we just compacted and click &lt;strong&gt;Next&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Compact It&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Save the File As&lt;/strong&gt; (just in case the compaction fails) and select a location for your VHD. &lt;/li&gt;        &lt;li&gt;Click &lt;strong&gt;Finish&lt;/strong&gt; and it will compact your VHD. &lt;/li&gt;        &lt;li&gt;         &lt;div&gt;After process is done, make sure your settings file is pointing to the new VHD. &lt;/div&gt;          &lt;p&gt;&amp;#160;&amp;#160; &lt;/p&gt;       &lt;/li&gt;     &lt;/ol&gt;   &lt;/div&gt; &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-1502710966147476145?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WyVaTcT_PCHG4WSKbnJO-o7-07M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WyVaTcT_PCHG4WSKbnJO-o7-07M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WyVaTcT_PCHG4WSKbnJO-o7-07M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WyVaTcT_PCHG4WSKbnJO-o7-07M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/T096iJZSWHw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/1502710966147476145/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=1502710966147476145&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/1502710966147476145?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/1502710966147476145?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/T096iJZSWHw/compact-vhd-virtual-hard-disk-of-your.html" title="Compact VHD (Virtual Hard Disk) of your Virtual PC" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2008/04/compact-vhd-virtual-hard-disk-of-your.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EHR3gzfSp7ImA9WxFSEkg.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-1395802557981491982</id><published>2008-04-18T12:40:00.000-05:00</published><updated>2010-04-14T09:33:56.685-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-14T09:33:56.685-05:00</app:edited><title>Restart/ Shutdown Command Prompt Shortcuts for Windows XP</title><content type="html">&lt;div class="ExternalClass51E80EC425134D4E85D9CDD9EAD948D0"&gt;For a shortcut to RESTART Windows XP: &lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;SHUTDOWN -r -t 01 &lt;/span&gt;&lt;br /&gt;
For a shortcut to SHUT DOWN Windows XP: &lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;SHUTDOWN -s -t 01 &lt;/span&gt;&lt;br /&gt;
Where the 01 is the number of seconds to wait before doing the action. &lt;br /&gt;
You can use those commands by typing them in the "run" or creating a shortcut for them.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-1395802557981491982?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mpzIL1fc0g7GgDv4tQIhrEpyWo4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mpzIL1fc0g7GgDv4tQIhrEpyWo4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mpzIL1fc0g7GgDv4tQIhrEpyWo4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mpzIL1fc0g7GgDv4tQIhrEpyWo4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/1FjcSjt2nRE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/1395802557981491982/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=1395802557981491982&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/1395802557981491982?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/1395802557981491982?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/1FjcSjt2nRE/restart-shutdown-command-prompt.html" title="Restart/ Shutdown Command Prompt Shortcuts for Windows XP" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/04/restart-shutdown-command-prompt.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EER3w6eyp7ImA9WxFSEkg.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-6914099420916993359</id><published>2008-04-18T09:20:00.000-05:00</published><updated>2010-04-14T09:33:26.213-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-14T09:33:26.213-05:00</app:edited><title>Return to same web page location in ASP.NET</title><content type="html">&lt;div class="ExternalClass0BDC90AB1D7C46AA95A469D18D340650"&gt;It is really annoying when you have a page that contains a lot of data and every time the page refreshes it goes back to the top of the page, to overcome that issue of the web page forgetting its previous location.&lt;br /&gt;
If it was an ASP.NET page, you can enable what is called Smart Navigation; where the page remembers the last place it was at before refreshing, to do that, place the following snippet in the page directive on the page you want to enable smart navigation on. &lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;SmartNavigation="True"&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-6914099420916993359?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pCrjzzZVuYVhYTOVfiMEF5qA8C0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pCrjzzZVuYVhYTOVfiMEF5qA8C0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pCrjzzZVuYVhYTOVfiMEF5qA8C0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pCrjzzZVuYVhYTOVfiMEF5qA8C0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/e3djynY3ZzI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/6914099420916993359/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=6914099420916993359&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/6914099420916993359?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/6914099420916993359?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/e3djynY3ZzI/return-to-same-web-page-location-in.html" title="Return to same web page location in ASP.NET" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/04/return-to-same-web-page-location-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IMRnY_fSp7ImA9WxFSEkg.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-7007300945597785314</id><published>2008-04-17T21:30:00.000-05:00</published><updated>2010-04-14T09:33:07.845-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-14T09:33:07.845-05:00</app:edited><title>How to show a detailed error instead of SharePoint’s default error page</title><content type="html">&lt;div class="ExternalClassB198262817AA427E982723E2C98935F1"&gt;&lt;div class="ExternalClass39030331ECAD498E9A53FE6ABAC3A16D"&gt;I may be the only one annoyed by generic error pages that give no meaning to what the error was, so I thought I should post this in my blog. &lt;br /&gt;
Basically if you go into your Web.Config within the WWWroot folder (or wherever your application's Web.Config file is) and near the top where you see: &lt;br /&gt;
&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;SafeMode&lt;/span&gt; &lt;span style="color: red;"&gt;MaxControls&lt;/span&gt;=&lt;span style="color: blue;"&gt;"200"&lt;/span&gt; &lt;span style="color: red;"&gt;CallStack&lt;/span&gt;=&lt;span style="color: blue;"&gt;"false"&lt;/span&gt;… &lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
change it to… &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;SafeMode&lt;/span&gt; &lt;span style="color: red;"&gt;MaxControls&lt;/span&gt;=&lt;span style="color: blue;"&gt;"200"&lt;/span&gt; &lt;span style="color: red;"&gt;CallStack&lt;/span&gt;=&lt;span style="color: blue;"&gt;"true"&lt;/span&gt;… &lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
You will also need to set custom errors to 'Off' . &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;customErrors&lt;/span&gt; &lt;span style="color: red;"&gt;mode&lt;/span&gt;=&lt;span style="color: blue;"&gt;"Off"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-7007300945597785314?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8ePtPww73ukqttHgSNzUG_CNkLg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8ePtPww73ukqttHgSNzUG_CNkLg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8ePtPww73ukqttHgSNzUG_CNkLg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8ePtPww73ukqttHgSNzUG_CNkLg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/LDKd5nEZveM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/7007300945597785314/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=7007300945597785314&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/7007300945597785314?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/7007300945597785314?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/LDKd5nEZveM/how-to-show-detailed-error-instead-of.html" title="How to show a detailed error instead of SharePoint’s default error page" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/04/how-to-show-detailed-error-instead-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IBQnc_eyp7ImA9WxFSEkg.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-631526337445605329</id><published>2008-04-17T21:25:00.000-05:00</published><updated>2010-04-14T09:32:33.943-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-14T09:32:33.943-05:00</app:edited><title>Restarting an Application Pool instead of restarting IIS</title><content type="html">&lt;div class="ExternalClass0FA7971C76A14F76A48E765D1929A25A"&gt;This is something that I read in a SharePoint book, where you can only restart the application pool that you have made changes to instead of restarting IIS. It will save you a couple of seconds every time. &lt;br /&gt;
This technique is faster than doing an IISRESET command. Please Change "DefaultAppPool" to your application pool name. &lt;br /&gt;
In the command prompt, type the following: &lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;cscript.exe c:\wondows\system32\issapp.vbs /a "DefaultAppPool"&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-631526337445605329?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dftNBKmFtikBZDiQysGLjuDy_4E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dftNBKmFtikBZDiQysGLjuDy_4E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dftNBKmFtikBZDiQysGLjuDy_4E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dftNBKmFtikBZDiQysGLjuDy_4E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/d6N2hxxYEis" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/631526337445605329/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=631526337445605329&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/631526337445605329?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/631526337445605329?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/d6N2hxxYEis/restarting-application-pool-instead-of.html" title="Restarting an Application Pool instead of restarting IIS" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/04/restarting-application-pool-instead-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IFSXY4eCp7ImA9WxFSEkg.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-1905644295091263920</id><published>2008-04-15T21:30:00.000-05:00</published><updated>2010-04-14T09:31:58.830-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-14T09:31:58.830-05:00</app:edited><title>What is not upgraded from WSS 2.0 to WSS 3.0</title><content type="html">&lt;div class="ExternalClassD094D2D7F0B6480197ADEC93F4C4B6CA"&gt;the following items cannot be upgraded: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Non-English language deployments of Windows SharePoint Services V3. You can only upgrade from English language deployments. &lt;/li&gt;
&lt;li&gt;Single-server deployments that use SQL Server 2000 Microsoft Data Engine Windows Edition (WMSDE) for data storage. You must be using SQL Server 2000, SP3 or later, to upgrade. &lt;/li&gt;
&lt;li&gt;Search configuration settings. You must reconfigure any search settings after upgrade is complete. &lt;/li&gt;
&lt;li&gt;Installations of Windows SharePoint Services V2 SP2 that have other applications, such as SharePoint Portal Server 2003, installed on them. Consult the manufacturer of the additional application for appropriate upgrade instructions. &lt;/li&gt;
&lt;li&gt;Sites created from custom site definitions. These sites will be skipped during the upgrade process. &lt;/li&gt;
&lt;li&gt;Search is not supported on Web applications that were upgraded from Windows SharePoint Services V2 SP2. &lt;/li&gt;
&lt;/ul&gt;Please Note: Upgrade will require two to three times the size of your largest Windows SharePoint Services V2 SP2 database in free hard-drive space (for example, if you have a single 100 GB database, you should have 300 GB in free hard-disk space on the SQL Server in your target farm).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-1905644295091263920?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NNbET4hvGoWo7nRIy3Sl953iKRQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NNbET4hvGoWo7nRIy3Sl953iKRQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NNbET4hvGoWo7nRIy3Sl953iKRQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NNbET4hvGoWo7nRIy3Sl953iKRQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/OO3KsZxPy-Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/1905644295091263920/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=1905644295091263920&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/1905644295091263920?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/1905644295091263920?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/OO3KsZxPy-Q/what-is-not-upgraded-from-wss-20-to-wss.html" title="What is not upgraded from WSS 2.0 to WSS 3.0" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/04/what-is-not-upgraded-from-wss-20-to-wss.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMER3Y-cCp7ImA9WhdVFkw.&quot;"><id>tag:blogger.com,1999:blog-822581201752539977.post-4795497150055577894</id><published>2008-04-09T21:28:00.000-05:00</published><updated>2011-09-21T08:40:06.858-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-21T08:40:06.858-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WSS 3.0" /><title>Allowing Code Blocks in SharePoint pages (Applies to MOSS 2007 / WSS 3.0)</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="ExternalClassB9B0662272854A1BBAB5E8D4407C2C72"&gt;
By default, code blocks are not allowed to execute on SharePoint pages (that is not including application pages).&lt;br /&gt;
In order for your user to be able to add code blocks that can run on either the server or the client, you need to make a change to the Web.Config file: &lt;br /&gt;
Under ParserPaths, add the following Code: &lt;br /&gt;
&lt;span style="font-family: courier new;"&gt;&amp;lt;ParserPath VirtualPath="/*" IncludeSubFolders="true" CompilationMode="Always" AllowServerSideScript="true" /&amp;gt; &lt;/span&gt;&lt;br /&gt;
Note: make sure you trust the path that you are enabling code blocks on&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/822581201752539977-4795497150055577894?l=www.dennispoint.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mJnFpOBUMn6s5YynGY-A75NQS8A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mJnFpOBUMn6s5YynGY-A75NQS8A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mJnFpOBUMn6s5YynGY-A75NQS8A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mJnFpOBUMn6s5YynGY-A75NQS8A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/tQXy/~4/Xh__zIUZQVo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.dennispoint.com/feeds/4795497150055577894/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=822581201752539977&amp;postID=4795497150055577894&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/4795497150055577894?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/822581201752539977/posts/default/4795497150055577894?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/tQXy/~3/Xh__zIUZQVo/allowing-code-blocks-in-sharepoint.html" title="Allowing Code Blocks in SharePoint pages (Applies to MOSS 2007 / WSS 3.0)" /><author><name>Dennis Alzoubi</name><uri>https://profiles.google.com/116679350868108706593</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-yBrE79__3zs/AAAAAAAAAAI/AAAAAAAABYE/_wl843MSOY4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.dennispoint.com/2010/04/allowing-code-blocks-in-sharepoint.html</feedburner:origLink></entry></feed>

