<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Team Eli&#039;s blog</title>
	<atom:link href="http://vspug.com/teameli/feed/" rel="self" type="application/rss+xml" />
	<link>http://vspug.com/teameli</link>
	<description>Just another VSPUG - Virtual SharePoint User Group weblog</description>
	<lastBuildDate>Thu, 13 Aug 2009 12:50:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dealing with the &quot;No parameterless constructor defined for this object&quot; on &#039;changed&#039; Page Layout</title>
		<link>http://vspug.com/teameli/2009/08/13/dealing-with-the-quot-no-parameterless-constructor-defined-for-this-object-quot-on-changed-page-layout/</link>
		<comments>http://vspug.com/teameli/2009/08/13/dealing-with-the-quot-no-parameterless-constructor-defined-for-this-object-quot-on-changed-page-layout/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 12:50:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[When we initially launched one of our publishing page layouts, we had a Page Layout that contained a third party web part. After launch, we realized that this web part either needed to be updated or ripped out, so for the time being, we ripped out the web part (uninstall, the whole nine yards). However, [...]]]></description>
			<content:encoded><![CDATA[<p>When we initially launched one of our publishing page layouts, we had a Page Layout that contained a third party web part. After launch, we realized that this web part either needed to be updated or ripped out, so for the time being, we ripped out the web part (uninstall, the whole nine yards). However, we still needed to use the Page Layout, just without the web parts pre-defaulted on the page. Low and behold, the first time we try to create the Page Layout, we get the &quot;No parameterless constructor defined for this object&quot;. </p>
<p>It appears that a few people have been having this issue and some people were saying that they could resolve the issue by deleting the Page Layout from the Master Page library but this wouldn&#39;t work for me because I still had some pages that inherited from the layout. After some additional research, I discovered that you can go into Web Part Maintenance mode on a Page Layout by typing in the following URL. </p>
<p>http://&lt;server&gt;/_catalogs/masterpage/&lt;page layout name&gt;.aspx?contents=1 </p>
<p>&nbsp;<a href="/oldweblogfiles/teameli/webparts.jpg"><img src="/oldweblogfiles/teameli/webparts.jpg" border="0" alt="  " /></a></p>
<p>Once on this page, I was able to successfully remove the ErrorWebPart from the template/page layout and could create new Pages from my Page Layout. </p>
<p>Nothing too exciting but thought it was worth noting. </p>
<p>Eli </p>
<p><strong>Full stack trace:</strong><br />No parameterless constructor defined for this object. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandle&amp; ctor, Boolean&amp; bNeedSecurityCheck) </p>
<p>at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) </p>
<p>at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) </p>
<p>at System.Activator.CreateInstance(Type type, Boolean nonPublic) </p>
<p>at System.Activator.CreateInstance(Type type) </p>
<p>at Microsoft.SharePoint.WebPartPages.SPWebPartSerializer.get_DefaultControl() </p>
<p>at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(PersonalizationScope scope) </p>
<p>at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.get_Links() </p>
<p>at Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddWebPartToStore(WebPart webPart, Int32 viewId, String viewGuid) </p>
<p>at Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddWebPartInternal(SPSupersetWebPart superset, Boolean throwIfLocked) </p>
<p>at Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager.AddWebPartInternal(WebPart webPart, String zoneId, Int32 zoneIndex, Boolean throwIfLocked) </p>
<p>at Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager.AddWebPart(WebPart webPart, String zoneId, Int32 zoneIndex) </p>
<p>at Microsoft.SharePoint.Publishing.PublishingPage.CopyAllWebParts(String destinationPageUrlServerRelative, SPWeb destinationPageWeb, String sourcePageUrlServerRelative, SPWeb sourcePageWeb, Boolean shouldOverwriteDestinationWebParts) </p>
<p>at Microsoft.SharePoint.Publishing.PublishingPageCollection.&lt;&gt;c__DisplayClass5.&lt;Add&gt;b__0() </p>
<p>at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) </p>
<p>at Microsoft.Office.Server.Diagnostics.ULS.SendWatsonOnExceptionTag(ULSTagID tagID, ULSCat categoryID, String output, Boolean fRethrowException, TryBlock tryBlock, CatchBlock catchBlock, FinallyBlock finallyBlock) </p>
<p>at Microsoft.SharePoint.Publishing.PublishingPageCollection.Add(String name, PageLayout layout) </p>
<p>at Microsoft.SharePoint.Publishing.Internal.CodeBehind.CreatePagePage.NewPageItemSave(String pageName, PageLayout pageLayout) </p>
<p>at Microsoft.SharePoint.Publishing.Internal.CodeBehind.CreatePagePage.CreateStandardPage(String pageName) </p>
<p>at Microsoft.SharePoint.Publishing.Internal.CodeBehind.CreatePagePage.ButtonCreatePage_Click(Object sender, EventArgs e) </p>
<p>at System.Web.UI.WebControls.Button.OnClick(EventArgs e) </p>
<p>at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) </p>
<p>at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) </p>
<p>at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) </p>
<p>at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) </p>
<p>at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2009/08/13/dealing-with-the-quot-no-parameterless-constructor-defined-for-this-object-quot-on-changed-page-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MOSS 2007 &#8211; SP2 / April CU Publishing Bug</title>
		<link>http://vspug.com/teameli/2009/07/28/moss-2007-sp2-april-cu-publishing-bug/</link>
		<comments>http://vspug.com/teameli/2009/07/28/moss-2007-sp2-april-cu-publishing-bug/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 14:45:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[
Overview of Bug 

When editing a Content Editor Web Part Rich Text on a publishing page that is based off an page layout that contains User fields / people picker, such as the Contact field,&#160; after saving the Rich Text changes the page refreshes and all of the user fields are &#34;messed&#34; up.&#160;&#160;&#160;



Steps to reproduce

&#183;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<div style="BORDER-BOTTOM:#6f8dba 1pt solid;BORDER-LEFT:medium none;PADDING-BOTTOM:1pt;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:medium none;BORDER-RIGHT:medium none;PADDING-TOP:0in;mso-element:para-border-div;mso-border-bottom-themecolor:accent3;mso-border-bottom-alt:solid #6F8DBA .5pt;">
<p class="MsoSubtitle"><em><span style="color:#203a6d;font-size:small;">Overview of Bug </span></em></p>
</div>
<p><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">When editing a Content Editor Web Part Rich Text on a publishing page that is based off an page layout that contains User fields / people picker, such as the Contact field,<span style="">&nbsp; </span>after saving the Rich Text changes the page refreshes and all of the user fields are &quot;messed&quot; up.<span style="">&nbsp;&nbsp;</span></span>&nbsp;</p>
<p><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;"><span style=""></span></span></p>
<div style="BORDER-BOTTOM:#6f8dba 1pt solid;BORDER-LEFT:medium none;PADDING-BOTTOM:1pt;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:medium none;BORDER-RIGHT:medium none;PADDING-TOP:0in;mso-element:para-border-div;mso-border-bottom-themecolor:accent3;mso-border-bottom-alt:solid #6F8DBA .5pt;">
<p class="MsoSubtitle"><span style="FONT-SIZE:11pt;mso-bidi-font-size:12.0pt;"><em><span style="color:#203a6d;"><a href="/oldweblogfiles/teameli/PersonField.jpg"><img src="/oldweblogfiles/teameli/PersonField.jpg" border="0" alt="  " /></a></span></em></span></p>
<p class="MsoSubtitle"><span style="FONT-SIZE:11pt;mso-bidi-font-size:12.0pt;"><em><span style="color:#203a6d;">Steps to reproduce</span></em></span></p>
</div>
<p class="MsoListParagraphCxSpFirst"><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Ensure environment is April CU.<span style="">&nbsp; </span>(We are not sure at this point if it is a bug introduced in SP2 or April CU since we did both upgrades at the same time.<span style="">&nbsp; </span>April CU is version 12.0.0.6504<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="FONT-FAMILY:&#39;Courier New&#39;;FONT-SIZE:10pt;mso-fareast-font-family:&#39;Courier New&#39;;mso-bidi-font-size:11.0pt;"><span style="mso-list:Ignore;">o<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Central Admin &#8211;&gt; Operations &#8211;&gt; Servers in farm&nbsp;</span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">&nbsp;<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">To keep it clean, I created a new Web Application to test this on.<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">I also created a new site collection based on the collaboration (Publishing tab) template.<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Add a User / Person field control to the home page<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="FONT-FAMILY:&#39;Courier New&#39;;FONT-SIZE:10pt;mso-fareast-font-family:&#39;Courier New&#39;;mso-bidi-font-size:11.0pt;"><span style="mso-list:Ignore;">o<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Open up the new site collection with SharePoint Designer 2007<br /></span><span style="FONT-FAMILY:&#39;Courier New&#39;;FONT-SIZE:10pt;mso-fareast-font-family:&#39;Courier New&#39;;mso-bidi-font-size:11.0pt;"><span style="mso-list:Ignore;">&nbsp;&nbsp; o<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Open the DefaultLayout.aspx page layout (which is the one used for the home page).<span style="">&nbsp; </span>Check out if required. ( _catalogs/masterpage/defaultlayout.aspx )<br /></span><span style="FONT-FAMILY:&#39;Courier New&#39;;FONT-SIZE:10pt;mso-fareast-font-family:&#39;Courier New&#39;;mso-bidi-font-size:11.0pt;"><span style="mso-list:Ignore;">&nbsp;&nbsp; o<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">From the Toolbox, select SharePoint Controls &#8211;&gt; Page fields</span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">&nbsp;<br /></span><span style="FONT-FAMILY:&#39;Courier New&#39;;FONT-SIZE:10pt;mso-fareast-font-family:&#39;Courier New&#39;;mso-bidi-font-size:11.0pt;"><span style="mso-list:Ignore;">&nbsp;&nbsp; o<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Then drag and drop the Contact control to somewhere on the page layout</span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">&nbsp;<br /></span><span style="FONT-FAMILY:&#39;Courier New&#39;;FONT-SIZE:10pt;mso-fareast-font-family:&#39;Courier New&#39;;mso-bidi-font-size:11.0pt;"><span style="mso-list:Ignore;">&nbsp;&nbsp; o<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Save and Publish / Approve page layout<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Close SharePoint Designer 2007 and open the site collection home page<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Edit the page and fill in a Contact<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Save the page and check it in.<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Edit the page again and add a Content Editor Web Part to one of the zones.</span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">&nbsp;<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Click the Open the Tool part link to get the web part editor panel<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Click the Rich Text Editor button and add some simple text.<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">Click Ok to save and close the popup for the rich text editor<br /></span><span style="FONT-FAMILY:Symbol;FONT-SIZE:10pt;mso-fareast-font-family:Symbol;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Symbol;"><span style="mso-list:Ignore;">&middot;<span style="FONT:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;">And VOLIA!</span></p>
<p class="MsoSubtitle"><em><span style="color:#203a6d;font-size:small;">Next steps&#8230;</span></em></p>
<p class="MsoSubtitle">
<p><span style="color:#203a6d;font-size:small;"><span style="color:#000000;font-size:x-small;"></p>
<p style="margin:0in 0in 6pt;"><span style="font-size:10pt;mso-bidi-font-size:11.0pt;">We&#39;ll be opening a ticket with Microsoft on this to see if they have heard of this (and maybe just maybe have a hotfix for it already).<span style="">&nbsp; </span>We also applied June CU update and that did NOT fix the issue.</span></p>
<p style="margin:0in 0in 6pt;"><span style="font-size:10pt;mso-bidi-font-size:11.0pt;">&nbsp;</span></p>
<p style="margin:0in 0in 6pt;"><span style="font-size:10pt;mso-bidi-font-size:11.0pt;">I wanted to get this out there to see if anybody else have had a similar issue and if anybody besides me and 4 different environments can reproduce the issue in their environment.</span></p>
<p class="MsoSubtitle">&nbsp;</p>
<p><span style="color:#203a6d;font-size:small;">Thanks!</span></span></span></p>
</p>
<p class="MsoSubtitle"><span style="color:#203a6d;font-size:small;"><span style="color:#000000;font-size:x-small;"></span></span></p>
<p class="MsoListParagraphCxSpFirst"><span style="FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2009/07/28/moss-2007-sp2-april-cu-publishing-bug/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to get Central Admin Link from API</title>
		<link>http://vspug.com/teameli/2009/03/26/how-to-get-central-admin-link-from-api/</link>
		<comments>http://vspug.com/teameli/2009/03/26/how-to-get-central-admin-link-from-api/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 11:53:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[There are some applications that I use that reference lists in Central Administration and I needed a way to do a dynamic lookup of the URL for Central Administration. Here is the code that will return the URL&#8230; 
public static string GetCentralAdminUrl() { &#160;&#160;&#160; // Grab the SPWebService for the administration site &#160;&#160;&#160; SPWebService service [...]]]></description>
			<content:encoded><![CDATA[<p>There are some applications that I use that reference lists in Central Administration and I needed a way to do a dynamic lookup of the URL for Central Administration. Here is the code that will return the URL&#8230; </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:blue;">string</span> GetCentralAdminUrl() <br /></span><span style="font-family:Courier New;font-size:10pt;">{ <br />&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:green;">// Grab the SPWebService for the administration site <br />&nbsp;&nbsp;&nbsp; </span></span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">SPWebService</span> service = <span style="color:#2b91af;">SPFarm</span>.Local.Services.GetValue&lt;<span style="color:#2b91af;">SPWebService</span>&gt;(<span style="color:#a31515;">&quot;WSS_Administration&quot;</span>); <br />&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">if</span> (service != <span style="color:blue;">null</span>) <br />&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;">{ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:green;">// Grabs the actual web application and reports the URL&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">SPAdministrationWebApplication</span> application = service.WebApplications.GetValue&lt;<span style="color:#2b91af;">SPAdministrationWebApplication</span>&gt;(); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">if</span> (application != <span style="color:blue;">null</span>) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;">{ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">return</span> application.GetResponseUri(<span style="color:#2b91af;">SPUrlZone</span>.Default).ToString(); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;">}&nbsp;<br />&nbsp;&nbsp;&nbsp;</span><span style="font-family:Courier New;font-size:10pt;">} <br />&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">return</span> <span style="color:blue;">null</span>; <br /></span><span style="font-family:Courier New;font-size:10pt;">}</span> </p>
<p>Hope it helps others so that they aren&#39;t hardcoding this link in their application. </p>
<p>Eli</p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2009/03/26/how-to-get-central-admin-link-from-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the SPChangeQuery to detect Group Membership Changes</title>
		<link>http://vspug.com/teameli/2009/03/17/using-the-spchangequery-to-detect-group-membership-changes/</link>
		<comments>http://vspug.com/teameli/2009/03/17/using-the-spchangequery-to-detect-group-membership-changes/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 02:48:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[I don&#39;t know how many people use the SPChangeQuery API but I find it to be extremely useful for a number of different options. You can use it to track sites/webs that are created, lists that are created and a number of other things. One thing that I thought was interesting was that someone wanted [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#39;t know how many people use the SPChangeQuery API but I find it to be extremely useful for a number of different options. You can use it to track sites/webs that are created, lists that are created and a number of other things. One thing that I thought was interesting was that someone wanted to monitor when a SharePoint group membership changed. As it turns out, you can use the SPChangeQuery to do this too. Check out the code sample. </p>
<p><span style="color:green;font-family:Courier New;font-size:10pt;">// Connect to the Site collection you wish to monitor </span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">using</span> (<span style="color:#2b91af;">SPSite</span> site = <span style="color:blue;">new</span> <span style="color:#2b91af;">SPSite</span>(<span style="color:#a31515;"><a href="http://localhost">http://localhost</a></span>)) <br /></span><span style="font-family:Courier New;font-size:10pt;">{ </span></p>
<p>In this sample, I only want to get the last 15 minutes worth of changes from one particular site collection. I can scope it to a content database, web or list if I wanted to. Notice that you want to make sure that you cast your DateTime to UniversalTime otherwise if you are like me, living in EST, the change logs are 5 hours ahead which messes up the time token a little bit.<span style="font-family:Courier New;font-size:10pt;"> </span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">SPChangeToken</span> myToken = <span style="color:blue;">new</span> <span style="color:#2b91af;">SPChangeToken</span>(<span style="color:#2b91af;">SPChangeCollection</span>.<span style="color:#2b91af;">CollectionScope</span>.Site, site.ID, <span style="color:#2b91af;">DateTime</span>.Now.AddMinutes(-15).ToUniversalTime()); </span></p>
<p>To avoid returning too much data, it is better to select what type of changes you want returned. I chose to only get changes made to the Group and it&#39;s membership. This way, I am not wasting time looping through changes such as list creation that I don&#39;t care about. </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">SPChangeQuery</span> oQuery = <span style="color:blue;">new</span> <span style="color:#2b91af;">SPChangeQuery</span>(<span style="color:blue;">false</span>, <span style="color:blue;">false</span>); <br /></span><span style="font-family:Courier New;font-size:10pt;">oQuery.ChangeTokenStart = myToken; <br /></span><span style="font-family:Courier New;font-size:10pt;">oQuery.Group = <span style="color:blue;">true</span>; <br /></span><span style="font-family:Courier New;font-size:10pt;">oQuery.GroupMembershipDelete = <span style="color:blue;">true</span>; <br /></span><span style="font-family:Courier New;font-size:10pt;">oQuery.GroupMembershipAdd = <span style="color:blue;">true</span>; </span></p>
<p>Now it&#39;s time to get the data. Grab the changes from the site collection with your query and then begin looping through each SPChange object. </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">SPChangeCollection</span> changes = site.GetChanges(oQuery); <br /></span><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">foreach</span> (<span style="color:#2b91af;">SPChange</span> change <span style="color:blue;">in</span> changes) <br /></span><span style="font-family:Courier New;font-size:10pt;">{ <br />&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">if</span> (change.GetType() == <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">SPChangeGroup</span>)) <br />&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;">{ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">if</span> (change.ChangeType == <span style="color:#2b91af;">SPChangeType</span>.MemberAdd || change.ChangeType == <span style="color:#2b91af;">SPChangeType</span>.MemberDelete) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;">{ </span></p>
<p>&nbsp;<span style="font-family:Courier New;font-size:10pt;">I</span> cast it to an SPChangeGroup now so that I can get the additional metadata of userid and the group id. </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">SPChangeGroup</span> cGroup = change <span style="color:blue;">as</span> <span style="color:#2b91af;">SPChangeGroup</span>; <br /></span><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">using</span> (<span style="color:#2b91af;">SPWeb</span> web = site.OpenWeb()) <br /></span><span style="font-family:Courier New;font-size:10pt;">{ </span></p>
<p><span style="font-family:Courier New;font-size:10pt;"></span>Be careful here, I&#39;m not testing to make sure the user still exists in the AllUser list or that the group still exists. </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">SPUser</span> changedUser = web.AllUsers[cGroup.UserId]; <br /></span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">SPGroup</span> changedGroup = web.Groups[cGroup.Id]; </span></p>
<p>&nbsp;Last but not least, do whatever you want to do for membership deletion (email?) and membership addition. </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">if</span> (change.ChangeType == <span style="color:#2b91af;">SPChangeType</span>.MemberDelete) <br /></span><span style="font-family:Courier New;font-size:10pt;">{ <br />&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">&quot;{0} deleted from {1}&quot;</span>, changedUser.Name, changedGroup.Name); <br /></span><span style="font-family:Courier New;font-size:10pt;">} <br /></span><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">else</span> <span style="color:blue;">if</span> (change.ChangeType == <span style="color:#2b91af;">SPChangeType</span>.MemberAdd) <br /></span><span style="font-family:Courier New;font-size:10pt;">{ <br />&nbsp;&nbsp; </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">&quot;{0} addded to {1}&quot;</span>, changedUser.Name, changedGroup.Name); <br /></span><span style="font-family:Courier New;font-size:10pt;">} </span><span style="font-family:Courier New;font-size:10pt;">} </span><span style="font-family:Courier New;font-size:10pt;">} </span><span style="font-family:Courier New;font-size:10pt;">} </span><span style="font-family:Courier New;font-size:10pt;">} </span><span style="font-family:Courier New;font-size:10pt;">} </span></p>
<p>I hope this code sample helps.<br />Eli</p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2009/03/17/using-the-spchangequery-to-detect-group-membership-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom SharePoint Applications Logging Framework</title>
		<link>http://vspug.com/teameli/2009/03/12/custom-sharepoint-applications-logging-framework/</link>
		<comments>http://vspug.com/teameli/2009/03/12/custom-sharepoint-applications-logging-framework/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 22:04:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[One of the things that I could never quite figure out about the SharePoint API is that they expose just about everything under the sun but when it comes to using their diagnostics / logging framework, it&#39;s all hands off. Granted, if you have the MOSS version, you can use PortalLog.LogString() method to write entries [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that I could never quite figure out about the SharePoint API is that they expose just about everything under the sun but when it comes to using their diagnostics / logging framework, it&#39;s all hands off. Granted, if you have the MOSS version, you can use PortalLog.LogString() method to write entries to the SharePoint ULS but for me that wasn&#39;t good enough. I wanted more control, control similar to what SharePoint does with their applications. Basically, I wanted the ability to set thresholds for my own diagnostics categories so that I could send anything that I wanted to the logs and depending on the threshold (verbose vs. unexpected) the system would determine whether to write it to the ULS and/or Windows Event Viewer. </p>
<p>Interesting enough, there isn&#39;t much information out there on how to do this so I had to start from scratch with the help of this <a href="http://msdn.microsoft.com/en-us/library/aa979522.aspx">article</a> and Reflector. After much research, I think I am getting closer (if not almost done) to providing a way to log to SharePoint logs (and as an added bonus to the Event Viewer). </p>
<p>At a high level, there are four different aspects: </p>
<ol>
<li><strong>DiagnosticsManager </strong>- In charge of performing the following: </li>
</ol>
<ul style="margin-left:72pt;">
<li>Adding new Categories to the Diagnostics Logging page (Operations in Central Admin) </li>
<li>Controlling the thresholds (Event Severity &amp; Trace Severity) for the new categories </li>
<li>Returning the values of the thresholds (severity levels) for the requested category &#8212; used on the Diagnostics Logging page and when your application needs to know whether to log it or not. </li>
</ul>
<ol>
<li><strong>DiagnosticsLevel </strong>- Basically just a data structure class to hold information about the category defined above such as Category Name, Id, Event Severity and Trace Severity </li>
<li><strong>TraceProvider</strong> &#8211; This is the basically the class that you create when you following the MSDN article mentioned above (<a href="http://msdn.microsoft.com/en-us/library/aa979522.aspx">http://msdn.microsoft.com/en-us/library/aa979522.aspx</a>). </li>
<li><strong>Logging (static class)</strong> &#8211; Static methods that you, the developer, would be calling when you want to log to the SharePoint ULS or Event Viewer. In this class, we check to make sure that the WriteEntry request that you want to log falls within the threshold of the category that you define. Example would be something like this&#8230; </li>
</ol>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPLogger</span>.RegisterApplication(<span style="color:#2b91af;">LogCategory</span>.MyCategory, <span style="color:#a31515;">&quot;My SharePoint App&quot;</span>, <span style="color:#a31515;">&quot;Provosioning new Site&quot;</span>, 1091);&nbsp;</p>
<p></span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SPLogger</span>.WriteEntry(<span style="color:#2b91af;">TraceSeverity</span>.Verbose, <span style="color:#a31515;">&quot;Stupid error message goes here&quot;</span>); <br /></span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPLogger</span>.WriteEntry(<span style="color:#2b91af;">TraceSeverity</span>.Unexpected, <span style="color:#2b91af;">EventSeverity</span>.Error, <span style="color:#a31515;">&quot;Unexpected&quot;</span>);&nbsp;</span>&nbsp;</p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPLogger</span>.UnRegisterApplication(); </span></p>
<p>&nbsp;<span style="font-family:Courier New;font-size:10pt;">&nbsp;&nbsp;&nbsp;&nbsp;Sample output:&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp;&nbsp;&nbsp;&nbsp;<span>03/12/2009 17:53:22.11 &nbsp;&nbsp;&nbsp;&nbsp;My SharePoint App (0&#215;0CC8) &nbsp;&nbsp;&nbsp;&nbsp;0&#215;0B10&nbsp;&nbsp;&nbsp;&nbsp;My Category &nbsp;&nbsp;&nbsp;&nbsp;Provosioning new Site &nbsp;&nbsp;&nbsp;&nbsp;1091&nbsp;&nbsp;&nbsp;&nbsp;Verbose &nbsp;&nbsp;&nbsp;&nbsp;Stupid error message goes here&nbsp;<br /></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 03/12/2009 17:53:22.11 &nbsp;&nbsp;&nbsp;&nbsp;My SharePoint App (0&#215;0CC8) &nbsp;&nbsp;&nbsp;&nbsp;0&#215;0B10&nbsp;&nbsp;&nbsp;&nbsp;My Category &nbsp;&nbsp;&nbsp;&nbsp;Provosioning new Site &nbsp;&nbsp;&nbsp;&nbsp;1091&nbsp;&nbsp;&nbsp;&nbsp;Unexpected&nbsp;&nbsp;&nbsp;&nbsp;Unexpected error&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /></span></p>
<p>This post is completely a high level overview because there isn&#39;t much sense going into details if nobody, aside from this insanely SharePoint obsessed developer, thinks it is useful <img src='http://vspug.com/teameli/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If you want more details, leave a comment and I&#39;ll follow up with additional posts. </p>
<p>UPDATE: I posted the wrong link for the MSDN article.&nbsp; AuditEntries are quite the same but I&#39;ve my share of them too!</p>
<p>Eli </p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2009/03/12/custom-sharepoint-applications-logging-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install directories are imporant for Project Server 2007 and MOSS 2007</title>
		<link>http://vspug.com/teameli/2009/03/04/install-directories-are-imporant-for-project-server-2007-and-moss-2007/</link>
		<comments>http://vspug.com/teameli/2009/03/04/install-directories-are-imporant-for-project-server-2007-and-moss-2007/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 11:22:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[I was recently working at a clients that had begun installing (on their own)&#160;Project Server 2007 into their MOSS environment.&#160; However they were having all sorts of issues provisioning the PWA site.&#160; Once we finally managed to get PWA provisioned, we began receiving an error that the language could not be determine.&#160; This was Project&#39;s [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently working at a clients that had begun installing (on their own)&nbsp;Project Server 2007 into their MOSS environment.&nbsp; However they were having all sorts of issues provisioning the PWA site.&nbsp; Once we finally managed to get PWA provisioned, we began receiving an error that the language could not be determine.&nbsp; This was Project&#39;s strange way of telling us that it can&#39;t find the Project Server web services.&nbsp; As it turns out, the PSI web services files (which are suppose to be part of the Office Server Web Services web application), were missing.&nbsp; After researching the properties in IIS, I realized that they installed MOSS onto the D:Project Fileslah blah blah instead of the default install location but when they installed Project Server, they used the default location (C:Program Files).&nbsp; After copying the files for the PSI web services, (yeah yeah&#8230;probably should have reinstalled), the error message went away and FINALLY Project Server was up and running.&nbsp; </p>
<p>On a side note, this also caused the databases from not being provisioning because the SQL scripts that it uses couldn&#39;t be found on the D: drive.</p>
<p>Go figures&#8230;.lol.&nbsp; Hopefully this will help some others from pulling their hairs out.</p>
<p>Eli</p>
<p>Some of the errors we were getting&#8230;</p>
<p>Failed to get language information for Project Server (Event ID 6058) &#8212; Event Log<br />System.IO.FileNotFoundException: PWA site not found<br />System.Net.WebExeption: the request failed with HTTP status 404: Not found at at Microsoft.Office.Project.Server.PSIAuth.Authentication.GetUserByName<br />Failed to provision database ProjectServer_Published as Published because directory D:Program filesMIcrosoft Office Servers12.0sqlproject servercore don&#39;t exist</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2009/03/04/install-directories-are-imporant-for-project-server-2007-and-moss-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SPDisposeCheck in Visual Studio</title>
		<link>http://vspug.com/teameli/2009/02/20/using-spdisposecheck-in-visual-studio/</link>
		<comments>http://vspug.com/teameli/2009/02/20/using-spdisposecheck-in-visual-studio/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 16:17:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[One of the things that I like to use in Visual Studio 05 &#38; 08 is the external tools.&#160; After the much anticipated release of the SPDisposeCheck from Microsoft via codeplex (http://blogs.msdn.com/sharepoint/archive/2009/01/29/spdisposecheck-released.aspx), I thought&#8230;this would make a pretty cool External Tool.&#160; Here is how I set it up&#8230;
1 )&#160; In Visual Studio, select Tools &#8211;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that I like to use in Visual Studio 05 &amp; 08 is the external tools.&nbsp; After the much <span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:&#39;Arial&#39;,&#39;sans-serif&#39;;mso-fareast-font-family:Arial;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;">anticipated </span>release of the SPDisposeCheck from Microsoft via codeplex (<a href="http://blogs.msdn.com/sharepoint/archive/2009/01/29/spdisposecheck-released.aspx">http://blogs.msdn.com/sharepoint/archive/2009/01/29/spdisposecheck-released.aspx</a>), I thought&#8230;this would make a pretty cool External Tool.&nbsp; Here is how I set it up&#8230;</p>
<p>1 )&nbsp; In Visual Studio, select Tools &#8211;&gt; External Tools<br />2)&nbsp; Click Add and fill out the required fields&#8230;here is what I put</p>
<p><strong>Title</strong>:&nbsp; SPDispose Check<br /><strong>Command</strong>: C:Program FilesMicrosoftSharePoint Dispose CheckSPDisposeCheck.exe&nbsp; (Path to executable)<br /><strong>Arguements</strong>: $(TargetName)$(TargetExt)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Note: I don&#39;t believe you can copy and paste this&#8230;you have to select them from the side button)<br /><strong>Initial Directory</strong>: $(TargetDir)<br /><strong>Use Output Window</strong>: Checked</p>
<p>When running it on my compiled DLL, here is what I got to my Output window.&nbsp;&nbsp;&nbsp; Looks like it works pretty good&#8230;now to go see what it is complaining about <img src='http://vspug.com/teameli/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span style="font-size:xx-small;">Note: This tool may report errors which are not actually memory leaks, otherwise known as false positives.<br />Further investigation should be done to identify and correct real errors.<br />It is designed to assist developers in making sure their code adheres to best practices for memory allocation when using SharePoint APIs.<br />Please see the following for more information:<br /><a href="http://blogs.msdn.com/rogerla/">http://blogs.msdn.com/rogerla/</a><br /><a href="http://msdn2.microsoft.com/en-us/library/aa973248.aspx">http://msdn2.microsoft.com/en-us/library/aa973248.aspx</a><br /><a href="http://msdn2.microsoft.com/en-us/library/bb687949.aspx">http://msdn2.microsoft.com/en-us/library/bb687949.aspx</a><br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />ID: SPDisposeCheckID_160<br />Module: Praxair.SharePoint.TemplateCustomizations.dll<br />Method: Praxair.SharePoint.TemplateCustomizations.Framework.PraxairProvisioner.Provision(Microsoft.SharePoint.SPWeb,System.String)<br />Statement: manager := web.{Microsoft.SharePoint.SPWeb}GetLimitedWebPartManager(&quot;default.aspx&quot;, 1)<br />Source: C:NetprojectsTeamEli.BlahBlahBlahTeamEli.BlahBlahBlahFrameworkProvisioner.cs<br />Line: 204<br />Notes: Dispose/Close was not called on SPLimitedWebPartManager.Web<br />More Information: <a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_160">http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_160</a><br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />Total Found: 1<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>&nbsp;</p>
<p>Modules Checked: 1<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />TeamEli.BlahBlahBlah.dll<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Modules Ignored: 0<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Methods Ignored: 0<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2009/02/20/using-spdisposecheck-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Record Center / Information Management Policy Jobs Not Running</title>
		<link>http://vspug.com/teameli/2008/10/13/record-center-information-management-policy-jobs-not-running/</link>
		<comments>http://vspug.com/teameli/2008/10/13/record-center-information-management-policy-jobs-not-running/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 02:53:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[Interesting enough, we noticed after installing &#8220;something&#8221; (it could have been Project Server, Service Pack 1 or even the Infrastructure Update) that none of the time jobs managed by the PolicyConfig service were running. &#160;&#160;If fact, they were all list as have never run, which I knew is a lie since they used to work [...]]]></description>
			<content:encoded><![CDATA[<p style="MARGIN:0in 0in 10pt;"><font>Interesting enough, we noticed after installing &#8220;something&#8221; (it could have been Project Server, Service Pack 1 or even the Infrastructure Update) that none of the time jobs managed by the PolicyConfig service were running. <span style="">&nbsp;&nbsp;</span>If fact, they were all list as have never run, which I knew is a lie since they used to work at some point in time.<span style="">&nbsp; </span>These jobs include:</font></p>
<p style="MARGIN:0in 0in 10pt;"><font>Expiration Policy<br />Hold Processing and Reporting<br />Information Management Policy<br />Records Center Processing</font></p>
<p style="MARGIN:0in 0in 10pt;"><font>In trying to troubleshoot this issue, I was messing around with one of the stsadm commands that can be used to set the when these four polices run.<span style="">&nbsp; </span>However, when I tried to run the following command:</font></p>
<p style="MARGIN:0in 0in 10pt;"><font>Stsadm -o setpolicyschedule -schedule &#8220;daily at 23:50:00&#8243;</font></p>
<p style="MARGIN:0in 0in 10pt;"><font><font><span style="">&nbsp;</span>I would get an error saying &#8220;The Information Management Policy feature is not active.&#8221;<span style="">&nbsp; </span>After a little bit more research, I found out that the &#8220;feature&#8221; that it is complaining about is the RecordsManagment feature.<span style="">&nbsp; </span>Granted, this feature is scope at the Farm level and thereby is automatically activate, I took the liberty and ran</font></font></p>
<p style="MARGIN:0in 0in 10pt;"><font><font><span style="">&nbsp;</span>stsadm -o activatefeature -name RecordsManagement -force.<span style="">&nbsp; </span></font></font></p>
<p style="MARGIN:0in 0in 10pt;"><font>After running the re-activate command, I was then able to run the setpolicyschedule command (which I didn&#39;t need to do to resolve the issue) and volia my Information Management Policy&#39;s timer jobs are running again!</font></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2008/10/13/record-center-information-management-policy-jobs-not-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use Powershell to get a new GUID</title>
		<link>http://vspug.com/teameli/2008/10/08/use-powershell-to-get-a-new-guid/</link>
		<comments>http://vspug.com/teameli/2008/10/08/use-powershell-to-get-a-new-guid/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 02:39:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[In SharePoint development, you are always in need of&#160;generating a&#160;unique id (aka GUID)&#160;for your features and solutions.&#160; While&#160;most developers have a GUID generator setup in Visual Studio, here is a quick alternative if you don&#39;t want to&#160;open Visual Studio but have Powershell open.
[System.Guid]::NewGuid().ToString()
&#160;And volia&#8230;you have a new GUID that you can use in your application.
Eli
&#160;
]]></description>
			<content:encoded><![CDATA[<p>In SharePoint development, you are always in need of&nbsp;generating a&nbsp;unique id (aka GUID)&nbsp;for your features and solutions.&nbsp; While&nbsp;most developers have a GUID generator setup in Visual Studio, here is a quick alternative if you don&#39;t want to&nbsp;open Visual Studio but have Powershell open.</p>
<p>[System.Guid]::NewGuid().ToString()</p>
<p>&nbsp;And volia&#8230;you have a new GUID that you can use in your application.</p>
<p>Eli</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2008/10/08/use-powershell-to-get-a-new-guid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TeamEli&#039;s first CodePlex Project &#8212; GUI to Add Solutions to SharePoint Solution Store</title>
		<link>http://vspug.com/teameli/2008/10/08/teameli-s-first-codeplex-project-gui-to-add-solutions-to-sharepoint-solution-store/</link>
		<comments>http://vspug.com/teameli/2008/10/08/teameli-s-first-codeplex-project-gui-to-add-solutions-to-sharepoint-solution-store/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 02:03:00 +0000</pubDate>
		<dc:creator>undercoverlaptop</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[Well, I finally took the time to sit down and put together a CodePlex project for some of the application pages (ok&#8230;only one so far&#8230;)&#160;that I am building for SharePoint admins.&#160; So far, I have an application page that allows SharePoint admins to upload SharePoint solutions into the solution store.&#160; This gets rid of the [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I finally took the time to sit down and put together a CodePlex project for some of the application pages (ok&#8230;only one so far&#8230;)&nbsp;that I am building for SharePoint admins.&nbsp; So far, I have an application page that allows SharePoint admins to upload SharePoint solutions into the solution store.&nbsp; This gets rid of the need to have to log into the server to run that one pesty stsadm command (addsolution).&nbsp; I am not sure if anybody will find this useful but I figured it would be a nice start for my presence on CodePlex.</p>
<p><a title="TeamEli SharePoint (2007) Tools" href="http://codeplex.com/teameli" target="_blank">TeamEli SharePoint (2007) Tools</a> </p>
<p>&nbsp;As far as the application goes, it&#39;s fairly straight forward.&nbsp; A custom application page that resides in the ADMIN folder with a custom action on the operations page right underneath the Solutions Management link.&nbsp; Turns out it is pretty easy to add new solution files to the store.&nbsp; First, I have to save a copy of the file locally so that the API can access the file then I check to see if the solution already exists.&nbsp; If it does, it upgrades the solution.&nbsp; Otherwise, it just adds the solution to the store.</p>
<p><font color="#008000" size="2"><font color="#008000" size="2">// Saves file to local system so that sharepoint can upload it<br /></font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">string</font></font><font size="2"> path = </font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;C:\Packages\&quot;</font></font><font size="2"> + upload_Solution.FileName;<br />upload_Solution.SaveAs(path);</font></font></font><font size="2"> </p>
<p></font><font color="#008000" size="2"><font color="#008000" size="2">// Gets current solution (if present)<br /></font></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">SPSolution</font></font><font size="2"> solution = </font><font color="#2b91af" size="2"><font color="#2b91af" size="2">SPFarm</font></font><font size="2">.Local.Solutions[upload_Solution.FileName];</p>
<p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2"> (solution == </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">null</font></font><font size="2">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#008000" size="2"><font color="#008000" size="2">// Adds new solution to farm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></font><font size="2">solution = </font><font color="#2b91af" size="2"><font color="#2b91af" size="2">SPFarm</font></font><font size="2">.Local.Solutions.Add(path);<br />}<br /></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">else<br /></font></font><font size="2">{<br />&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2"> (solution.Deployed)<br />&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#008000" size="2"><font color="#008000" size="2">// Upgrades the solution now.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></font><font size="2">solution.Upgrade(path, </font><font color="#2b91af" size="2"><font color="#2b91af" size="2">DateTime</font></font><font size="2">.Now);<br />&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">else<br />&nbsp;&nbsp;&nbsp;&nbsp; </font></font><font size="2">{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#008000" size="2"><font color="#008000" size="2">// Removes solution and re-adds it<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></font><font size="2">solution.Delete();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; solution = </font><font color="#2b91af" size="2"><font color="#2b91af" size="2">SPFarm</font></font><font size="2">.Local.Solutions.Add(path);<br />&nbsp;&nbsp;&nbsp;&nbsp; }<br /></font><font size="2">}</font></p>
<p><font size="2">Please feel free to give it awhirl and let me know what your thoughts are and if you have any problems.</font></p>
<p><font size="2">Eli</p>
<p></font></p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/teameli/2008/10/08/teameli-s-first-codeplex-project-gui-to-add-solutions-to-sharepoint-solution-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
