<?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>Alex Angas &#187; SharePoint</title>
	<atom:link href="http://www.alexangas.com/blog/category/sharepoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alexangas.com/blog</link>
	<description>SharePoint</description>
	<lastBuildDate>Mon, 31 Oct 2011 19:05:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Developing for a load balanced SharePoint environment</title>
		<link>http://www.alexangas.com/blog/2011/09/developing-for-a-load-balanced-sharepoint-environment/</link>
		<comments>http://www.alexangas.com/blog/2011/09/developing-for-a-load-balanced-sharepoint-environment/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 20:15:19 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[multithreading]]></category>

		<guid isPermaLink="false">http://alexangas.wordpress.com/?p=4</guid>
		<description><![CDATA[If you are going to deploy to a load balanced environment, a big plus is being able to develop in one. Unfortunately a lot of us don&#8217;t have that luxury! Here are some key points to help out. Managing state &#8230; <a href="http://www.alexangas.com/blog/2011/09/developing-for-a-load-balanced-sharepoint-environment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are going to deploy to a load balanced environment, a big plus is being able to develop in one. Unfortunately a lot of us don&#8217;t have that luxury! Here are some key points to help out.</p>
<h1>Managing state</h1>
<p>Always rely on SharePoint&#8217;s central store &#8211; the database. Don&#8217;t try and store data on the file system as you will never be sure which server has what copy. Use lists for data that should be exposed to administrators and users. Use SPPersistedObject or the patterns &#038; practices <a href="http://msdn.microsoft.com/en-us/library/ff798488.aspx">Application Setting Manager</a> for application configuration.</p>
<h1>Caching</h1>
<p>This is just another method of storing state, albeit one that&#8217;s faster (yet limited in resources)! Be aware when using ASP.NET caching that every server will cache your data separately in its own copy of RAM. These will get out of sync resulting in inconsistencies that you will need to handle. You may find AppFabric Caching as <a href="http://www.wictorwilen.se/Post/Improve-performance-of-your-SharePoint-2010-applications-using-Windows-Server-AppFabric-caching.aspx">described by Wictor Wilén</a> a good solution to this problem.</p>
<h1>Thread safety</h1>
<p>Never store rich objects that aren&#8217;t thread safe such as SPListItem in the cache or any other form of state. Aside from potentially taking up unnecessary space, these objects won&#8217;t work properly once deserialized. Introducing caching also opens up your application to potential threading issues, as explained in &#8220;Understanding the Potential Pitfalls of Thread Synchronization&#8221; <a href="http://msdn2.microsoft.com/en-us/library/bb687949.aspx">in this best practices article</a>. You don&#8217;t need to use <a href="http://msdn.microsoft.com/en-us/library/system.threading.aspx">System.Threading</a> to be multithreading!</p>
<h1>Testing</h1>
<p>Even if you can&#8217;t develop in a load balanced environment, it really pays to test in one. A lot of situations just can&#8217;t be reproduced otherwise! I strongly recommend to ensure your production environment always closely matches test in configuration (even if number of servers is unreasonable).</p>
<h1>Conclusion</h1>
<p>In summary: always store data in the database to avoid problems with different servers accessing the same content and keep any caching simple and stateless. Oh, and be sure to thoroughly test!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2011/09/developing-for-a-load-balanced-sharepoint-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tailoring SP2010 p&amp;p logging to your application</title>
		<link>http://www.alexangas.com/blog/2011/09/tailoring-sp2010-pp-logging-to-your-application/</link>
		<comments>http://www.alexangas.com/blog/2011/09/tailoring-sp2010-pp-logging-to-your-application/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 20:02:41 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[patterns-and-practices]]></category>

		<guid isPermaLink="false">http://alexangas.com/blog/?p=297</guid>
		<description><![CDATA[Back in our last post, we saw an intro to the logging power found in the SP 2010 patterns &#038; practices library. Now, let&#8217;s make it our own. Defining your own areas and categories The out-of-the-box behaviour is fine, but &#8230; <a href="http://www.alexangas.com/blog/2011/09/tailoring-sp2010-pp-logging-to-your-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Back in our <a href="http://www.alexangas.com/blog/?p=289">last post</a>, we saw an intro to the logging power found in the SP 2010 patterns &#038; practices library. Now, let&#8217;s make it our own.</p>
<p><strong>Defining your own areas and categories</strong></p>
<p>The out-of-the-box behaviour is fine, but it&#8217;s much nicer for both end user and developer to see the actual application name causing the exception, rather than the generic &#8220;Patterns and Practices&#8221;. No problem, you can define your own areas and categories! What does this mean? Examine a ULS log file and you&#8217;ll see at the top a series of column headers. &#8220;Area&#8221; is typically used for the a major piece of functionality or application name. &#8220;Category&#8221; is some component of that functionality. For logging to the Event Viewer, the Source column is used for &#8220;Area&#8221;, and &#8220;Category&#8221; is the first line of the log entry.</p>
<p><strong>The many ILogger methods</strong></p>
<p>Before continuing, let&#8217;s examine how we use a custom area and category when calling the ILogger. If you have a look at its interface, you&#8217;ll find several variations of two methods. <strong>LogToOperations</strong> writes to both the ULS trace log and the Event Viewer. <strong>TraceToDeveloper</strong> writes to the trace log only. Some variations allow you to specify a category and others don&#8217;t. At this point, you really want to look at the many options and narrow down the list to one or two that are going to be most useful to you. I generally only use the following depending on whether I&#8217;m logging exceptions or information:</p>
<pre>
void LogToOperations(Exception exception, int eventId, EventSeverity severity, string category);
void LogToOperations(string message, string category);
</pre>
<p>Notice the <strong>category</strong> parameter which is where we set both the area <em>and</em> category to use. The supplied string here needs to be of the format &#8220;<em>Area</em>/<em>Category</em>&#8220;. This is fairly distasteful in design and much like a &#8220;<a href="http://en.wikipedia.org/wiki/Magic_number_(programming)">magic number</a>&#8220;, but that&#8217;s the way the API has been written. I recommend creating a LoggingHelper class that abstracts this away and reduces the risk of making a mistake.</p>
<p><strong>Registering the areas and categories</strong></p>
<p>There is one last trick to perform before using these custom areas and categories. They must be provisioned as part of a farm level feature. This is primarily because updates are made to the SharePoint configuration database which requires execution by an account with farm level permissions. It&#8217;s also because registering new sources for the Event Viewer to use must be done by a user with permissions to write to the Windows registry. Executing this registration as a farm-level event receiver should alleviate these issues (unless you&#8217;re deploying to a locked down environment where you may have some problems).</p>
<p>There is sample code on how to register areas and categories in the <a href="http://msdn.microsoft.com/en-us/library/ff798462.aspx">SharePoint Guidance documentation</a>. (There&#8217;s also plenty of other great stuff there about how the logger works and I recommend taking a few minutes to read it.) One extra thing to take note of if you plan on logging to the Event Viewer in a <strong>multi-server farm</strong> is that this registration needs to take place on each server in the farm. There are <a href="http://blogs.msdn.com/b/chriskeyser/archive/2010/12/20/using-a-sharepoint-timer-job-to-deploy-settings-in-a-farm-for-registering-event-sources.aspx">instructions on how to do this</a> by lead SharePoint p&#038;p developer Chris Keyser.</p>
<p><strong>Segue &#8211; suggestions</strong></p>
<p>As you would have gathered, this library is not perfect. Here&#8217;s some thoughts on gotchas and what I feel could be improved:</p>
<ul>
<li>The ILogger interface contains too many method signatures which causes confusion. Most developers will only settle on their chosen one or two. I&#8217;d like to see a simple entity-style class used for specifying logging parameters instead of the many options given.</li>
<li>Using a &#8216;magic number&#8217; style string format to select an area and category is error prone. Area and category should be separated, and preferably strongly typed.</li>
<li>It&#8217;s clear to see the ILogger interface has been designed around logging to the ULS and Event Log. This makes it not as adaptable to other scenarios. Again, using an entity-style class for parameters would help make it more generic.</li>
<li>To register your own custom areas and categories, a farm feature is required so that enough permissions are available to write to the Windows registry. In multi-server farms there is added complexity.</li>
</ul>
<p>On the plus side, a lot of these issues only need to be resolved once.</p>
<p><strong>Conclusion</strong></p>
<p>I really like the logging functionality provided with the patterns &#038; practices library. It&#8217;s generally easy to use and certainly powerful. There are some issues, but it&#8217;s a great way to get exposure to the benefits of this library and immediately reap rewards!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2011/09/tailoring-sp2010-pp-logging-to-your-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intro to SharePoint 2010 patterns &amp; practices &#8211; Logging</title>
		<link>http://www.alexangas.com/blog/2011/09/intro-to-sharepoint-2010-patterns-practices-logging/</link>
		<comments>http://www.alexangas.com/blog/2011/09/intro-to-sharepoint-2010-patterns-practices-logging/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 20:06:49 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[patterns-and-practices]]></category>

		<guid isPermaLink="false">http://alexangas.com/blog/?p=289</guid>
		<description><![CDATA[Microsoft&#8217;s patterns &#38; practices library for SharePoint 2010 contains plenty of useful information and tools. One of the simplest things you can start using right now is its logging functionality. Check out these handy features: Log to both the ULS &#8230; <a href="http://www.alexangas.com/blog/2011/09/intro-to-sharepoint-2010-patterns-practices-logging/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Microsoft&#8217;s patterns &amp; practices library for SharePoint 2010 contains plenty of useful information and tools. One of the simplest things you can start using right now is its logging functionality. Check out these handy features:</p>
<ul>
<li>Log to both the ULS trace logs and the Windows Event Viewer</li>
<li>Define your own logging categories so they appear under <strong>your</strong> application&#8217;s name everywhere</li>
<li>Support for logging from the sandbox via a provided proxy</li>
<li>Configure log event throttling using the out-of-the-box Diagnostic Logging page in Central Administration</li>
<li>Contextual information such as current URL and logged in user is automatically added to log entries</li>
<li>Don&#8217;t worry about logging long messages or correlation IDs, it&#8217;s all handled for you</li>
<li>Use the provided logging interface to easily write your own logger</li>
<li>Service locator provided means almost no code changes when changing to a different logger (for a future blog post)</li>
</ul>
<p>If you&#8217;re a developer that&#8217;s never used the library before, this post helps you dip your toes in the water and harness this logging power!</p>
<p><strong>Getting started</strong></p>
<p>The p&amp;p release is a little confusing. There&#8217;s the <a href="http://spg.codeplex.com/">CodePlex project</a>, which links to various components and where you should ask for help or log any bugs you find. However the code is not kept there &#8211; download that from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=64b55569-2168-4545-8b7c-f185b2cf967d">MS Downloads</a>. You&#8217;ll want to keep an eye on this page for updates as they aren&#8217;t announced anywhere that I&#8217;ve found.</p>
<p>Once extracted to your development server, you need to build the library. Everything is open source apart from the service locator (for a later blog post). The solution to build can be found at <code>Source\SharePoint 2010\Microsoft.Practices.SharePoint.sln</code>.</p>
<p><a href="http://alexangas.com/blog/wp-content/uploads/2010/09/pandp_solution.png"><img src="http://alexangas.com/blog/wp-content/uploads/2010/09/pandp_solution.png" alt="" title="SharePoint 2010 Patterns and Practices Solution Files" width="442" height="372" class="aligncenter size-full wp-image-290" /></a></p>
<p>Build this project, then copy the output <code>Microsoft.Practices.ServiceLocation.dll</code> and <code>Microsoft.Practices.SharePoint.Common.dll</code> to your project and reference them.</p>
<p><strong>Log away!</strong></p>
<p>Using the logger is pretty easy. First, add these using statements everywhere you wish to log:</p>
<pre>
using Microsoft.Practices.SharePoint.Common.Logging;
using Microsoft.Practices.SharePoint.Common.ServiceLocation;
</pre>
<p>Then declare the logger as a field and obtain a reference to it:</p>
<pre>
ILogger _logger = SharePointServiceLocator.GetCurrent().GetInstance&lt;ILogger&gt;();
</pre>
<p>Now let&#8217;s log an exception&#8230;</p>
<pre>
Exception ex = new ApplicationException(&quot;This is my test exception&quot;);
_logger.LogToOperations(ex);
</pre>
<p>&#8230;and see what appears in the ULS log&#8230;</p>
<blockquote><p>
09/08/2010 20:15:34.66 	w3wp.exe (0x15D8)                       	0x0EF0	Patterns and Practices        	SharePoint Guidance           	0000	Information	Category: SharePoint Guidance: An exception has occurred.   ExceptionType: &#8216;ApplicationException&#8217;   ExceptionMessage: &#8216;This is my test exception&#8217;   StackTrace: &#8221;   Source: &#8221;   TargetSite: &#8221;   Additional Information:  Request TimeStamp: &#8217;2010-09-08T20:15:33.2171690+09:30&#8242;  UserName: &#8216;AA\Administrator&#8217;  Request URL: &#8216;http://aasp2010dev:31000/default.aspx?PageView=Shared&#038;InitialTabId=Ribbon.WebPartPage&#038;VisibilityContext=WSSWebPartPage&#8217;  User Agent: &#8216;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; InfoPath.3; .NET CLR 3.5.30729; .NET CLR 3.0.30729)&#8217;  Originating IP address: &#8217;127.0.0.1&#8242;	2cc97a55-1c4d-4e22-b145-4de9a3fdf6e1
</p></blockquote>
<p>&#8230;and Event Viewer:</p>
<p><code><br />
Log Name:      Application<br />
Source:        Patterns and Practices<br />
Date:          8/09/2010 8:15:34 PM<br />
Event ID:      0<br />
Task Category: None<br />
Level:         Information<br />
Keywords:      Classic<br />
User:          N/A<br />
Computer:      aasp2010dev.aa.com<br />
Description:<br />
Category: SharePoint Guidance: An exception has occurred.<br />
	ExceptionType: 'ApplicationException'<br />
	ExceptionMessage: 'This is my test exception'<br />
	StackTrace: ''<br />
	Source: ''<br />
	TargetSite: ''</p>
<p><em>(many other details removed for brevity)</em><br />
</code></p>
<p>Here you can see the benefits these simple steps have already given &#8211; lots of context relating to exception to help diagnose the problem!</p>
<p><strong>Logging &#8211; make it happen!</strong></p>
<p>That&#8217;s it for now, but we&#8217;ll be exploring a lot more about this library in the next blog post. Remember &#8211; you owe it to yourself and your users to log appropriately. Ease the pain of bugs found in production code!</p>
<p><strong>Download and references:</strong></p>
<ul>
<li><a href="http://spg.codeplex.com/">SharePoint Guidance CodePlex Project</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=64b55569-2168-4545-8b7c-f185b2cf967d">SharePoint Guidance 2010 Download</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2011/09/intro-to-sharepoint-2010-patterns-practices-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analysis of the Oracle Hyperion Web Part</title>
		<link>http://www.alexangas.com/blog/2011/09/analysis-of-the-oracle-hyperion-web-part/</link>
		<comments>http://www.alexangas.com/blog/2011/09/analysis-of-the-oracle-hyperion-web-part/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 12:10:56 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[web part]]></category>

		<guid isPermaLink="false">http://alexangas.com/blog/?p=168</guid>
		<description><![CDATA[This is a post I originally wrote in July 2009 and never got around to properly completing. Because of its age I considered binning it altogether however a quick web search seems to turn up that nothing has changed for &#8230; <a href="http://www.alexangas.com/blog/2011/09/analysis-of-the-oracle-hyperion-web-part/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is a post I originally wrote in July 2009 and never got around to properly completing. Because of its age I considered binning it altogether however a quick web search seems to turn up that nothing has changed for this humble web part. This is more of a rant about vendors that can&#8217;t be bothered to integrate their products with SharePoint using best practices. The person that ends up suffering is &#8220;the SharePoint guy/gal&#8221; who is lumped with deploying this rubbish. Hopefully it helps someone else out there that&#8217;s stuck in the same boat I once was.</p>
<h1>Rewind to July 2009</h1>
<p>I was recently given the task of deploying the Oracle Hyperion web part for testing in one of our SharePoint sites. There was no formal requirement for this, it was simply requested because there appears to be no documentation or information available on what functionality this mysterious web part can provide. What better way to find out than to deploy it for testing, right? There are even quite <a href="http://download.oracle.com/docs/cd/E12825_01/epm.111/pit_setup.pdf">detailed instructions</a> available!</p>
<p>Well stop right there, folks. In fact before you read any further, my recommendation is to run far, far away from this unusual piece of technology. Why? Well let&#8217;s start with the high-level changes you&#8217;ll need to make to your SharePoint environment:</p>
<ul>
<li>Add the web part itself</li>
<li>Configure single sign-on (SSO) &#8211; makes sense as Oracle is an external product</li>
<li>Create a &#8216;proxy page&#8217; &#8211; a virtual IIS application inside your SharePoint application</li>
<li>Install a custom HTTP handler</li>
<li>Create a custom database</li>
</ul>
<p>Hmmm&#8230; seems rather unusual so far (particularly that custom database &#8211; don&#8217;t we already have data stores in both SharePoint <strong>and</strong> Oracle?). But then read the fine print as it describes three best practice no-nos all on one page (that&#8217;s page 71 if you&#8217;re following along readers) without even so much as to explain what effect the changes will have.</p>
<ol>
<li><strong>Set the trust level to Full.</strong><br />
Say goodbye to security in your SharePoint farm right here. With trust level set to Full, <a href="http://blog.tylerholmes.com/2008/10/don-set-your-sharepoint-app-to-full.html">custom code can run without restriction</a> and do whatever it likes. <strong>Really Bad Idea.</strong> Oracle, please look into Code Access Security.</li>
<li><strong>Replace the default SQL Server session state provider for SharePoint.</strong><br />
I&#8217;ll be honest. I have no idea what they are doing here or why. All I know is that the chances of support from Microsoft on such a fundamental change to how session state works in SharePoint has to be zero.</li>
<li><strong>Comment out the PublishingHttpModule.</strong><br />
Say goodbye to one of the best features in SharePoint &#8211; publishing pages. For yet another strange and unexplained reason, this has to go. Not sure if they put it back somewhere with their custom code, this isn&#8217;t mentioned.</li>
</ol>
<p>Now follow through almost twenty pages, some with screenshots, to configure this nightmare, and that doesn&#8217;t included setting up SSO. I like to think I&#8217;m pretty good at puzzling out this sort of thing, but this baby has got me beat.</p>
<p>Things I found that might help others&#8230; Add the server hosting SharePoint to the Local Intranet zone in Internet Explorer security settings. Otherwise, you might encounter an &#8220;Invalid index&#8221; message while browsing the repository in Internet Explorer. Also, uninstall the Enhanced Security Configuration from Windows Server to prevent logon issues.</p>
<p>I wonder if anyone, anywhere has been able to successfully deploy this thing? More to the point, why did Oracle bother to even develop it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2011/09/analysis-of-the-oracle-hyperion-web-part/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why it&#8217;s an exciting time to be part of SharePoint Overflow!</title>
		<link>http://www.alexangas.com/blog/2011/03/why-its-an-exciting-time-to-be-part-of-sharepoint-overflow/</link>
		<comments>http://www.alexangas.com/blog/2011/03/why-its-an-exciting-time-to-be-part-of-sharepoint-overflow/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 19:00:13 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[community]]></category>

		<guid isPermaLink="false">http://www.alexangas.com/blog/?p=308</guid>
		<description><![CDATA[SharePoint Overflow started as one of the first Stack Exchange sites (running version 1.0). It&#8217;s also been one of the most successful. We&#8217;ve been able to attract some fantastic contributors including several MVPs and our traffic stats have continuously increased. &#8230; <a href="http://www.alexangas.com/blog/2011/03/why-its-an-exciting-time-to-be-part-of-sharepoint-overflow/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sharepointoverflow.com">SharePoint Overflow</a> started as one of the first <a href="http://www.stackexchange.com">Stack Exchange</a> sites (running version 1.0). It&#8217;s also been one of the most successful. We&#8217;ve been able to attract some fantastic contributors including several MVPs and our traffic stats have continuously increased.</p>
<p>When the discontinuation of the original Stack Exchange business model <a href="http://blog.stackoverflow.com/2010/04/changes-to-stack-exchange/">was announced</a>, I felt plunged into the wilderness and lost motivation in the site for a little while. Suddenly, calling this community our own while running it on the awesome platform that powered sites such as Stack Overflow appeared impossible come April 13 2011. Stack Exchange 2.0 would be owned by the <a href="http://stackoverflow.com">Stack Overflow</a> team with input from the community (instead of owned by members of the community) and the <a href="http://www.osqa.net/">closest alternative platform</a> was (and still is) a long way behind in functionality and general awesomeness.</p>
<p>But in the interests of the fantastic community and content I wanted to see continue, I got over myself! I arranged with <a href="http://twitter.com/nickswan">Nick Swan</a>, the original SharePoint Overflow mastermind that we look at moving the platform to Stack Exchange 2.0. After eventually being able to contact the very busy Stack Exchange team, things were put into motion and <a href="http://area51.stackexchange.com/proposals/28921/sharepoint-overflow?referrer=UhOiV0ReN8IdOf0kzJX7fA2">here we are</a> (87% committed at time of writing).</p>
<p><strong>So what&#8217;s going to make SharePoint Overflow 2.0 so exciting?</strong></p>
<p>Our site started using a copy of how Stack Overflow functioned back in mid-late 2009. Now, if you&#8217;ve ever read <a href="http://blog.stackexchange.com/">the Stack Exchange team blog</a>, you&#8217;ll know they&#8217;ve added many new features since then. Some of these will be great for us! Here are my picks.</p>
<p><em>We&#8217;ll be exposed to a greater audience</em></p>
<p>Stack Exchange sites are promoted across the network. You can see this in ads for questions on other sites, Twitter feeds, the listings of <a href="http://stackexchange.com/sites">Stack Exchange sites</a>, they&#8217;re everywhere! One of the great things is that a single login to the Stack Exchange network associates accounts across sites. This boils down to it being easy for people to come and join us.</p>
<p><em>We </em>could<em> be the keepers of all existing SharePoint questions from the trilogy sites</em></p>
<p>As a community in association with Stack Exchange, we may decide that SharePoint Overflow is where all SharePoint questions should live. That means many questions from across the trilogy sites will be migrated, as well as any new questions. It also gives those questions about SharePoint that don&#8217;t seem to quite &#8220;fit&#8221; in one of the existing trilogy sites a home (great <a href="http://blog.pentalogic.net/2011/03/your-sharepoint-community-needs-you/">explanation by Stuart Pegg</a>). This should make us the largest SharePoint community Q&#038;A site outside of MSDN and TechNet!</p>
<p>Note: &#8220;trilogy&#8221; here means the sites <a href="http://stackoverflow.com">Stack Overflow</a> (programming), <a href="http://serverfault.com">Server Fault</a> (systems administration), and <a href="http://superuser.com">Super User</a> (computer enthusiasts).</p>
<p><em>We&#8217;ll have more encouragement to accept answers</em></p>
<p>Something that&#8217;s always been a problem in our site has been encouraging people to accept answers (and vote generally). Complete speculation from me is that this isn&#8217;t a nice experience or have any obvious benefits on MSDN/TechNet, which is the platform most of our users are previously familiar with.</p>
<p>Reason aside, users will have an &#8220;accept rate&#8221; shown underneath their reputation on questions they ask, just like on <a href="http://stackoverflow.com/q/214714/6651">my Stack Overflow question here</a>. This feature made a big difference when it was introduced on the trilogy sites! Sadly we just missed out on it with Stack Exchange 1.0.</p>
<p><em>We&#8217;ll have our own meta site to discuss how the site should be run</em></p>
<p>I&#8217;ve really felt a bit in the dark with how to administer the site, and haven&#8217;t wanted to clutter it up with a lot of meta questions. (We used the <a href="http://www.sharepointoverflow.com/questions/tagged/sharepoint-overflow">sharepoint-overflow</a> tag for this.) With our own meta site (<a href="http://meta.wordpress.stackexchange.com">example</a>), it will be much easier for us all to discuss the future and do the best thing in the interests of our community.</p>
<p><em>We&#8217;ll have several interesting possibilities of support</em></p>
<p>The Stack Exchange team really actually care about supporting communities and making the Internet a better place. For example, they&#8217;ve recently announced <a href="http://blog.stackoverflow.com/2011/02/community-conference-sponsorships/">community conference sponsorships</a> to help people share knowledge and experiences. If they can do that, I think we might at least be able to get some stickers?!</p>
<p><strong>The future is bright</strong></p>
<p>So that&#8217;s my feelings on the exciting future of our site! These are exciting times, so please, <a href="http://area51.stackexchange.com/proposals/28921/sharepoint-overflow?referrer=UhOiV0ReN8IdOf0kzJX7fA2">come and join us</a>! Here&#8217;s how to <a href="http://www.sharepointoverflow.com/questions/9270/how-can-i-help-sharepoint-overflow-move-to-stack-exchange-2-0-definition-phase">spread the word</a>. (As <a href="http://tomresing.com/blog/Lists/Posts/Post.aspx?ID=27">explained by Tom Resing</a> we most need committers to have at least 200 reputation on other Stack Exchange sites.)</p>
<p>Finally, a very sincere <strong>thank you</strong> to the fantastic members of the community that have helped us become so successful (notably moderators <a href="http://twitter.com/sympmarc">Marc Anderson</a> and <a href="http://twitter.com/charlesdlee">Charlie Lee</a>)!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2011/03/why-its-an-exciting-time-to-be-part-of-sharepoint-overflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Administrators! Stop before deploying that custom code!</title>
		<link>http://www.alexangas.com/blog/2009/11/administrators-stop-before-deploying-that-custom-code/</link>
		<comments>http://www.alexangas.com/blog/2009/11/administrators-stop-before-deploying-that-custom-code/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 18:53:56 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://alexangas.com/blog/?p=271</guid>
		<description><![CDATA[Even with no development knowledge, there&#8217;s a simple and quick tool that SharePoint administrators can run before deploying a solution package or web part to get some idea on whether it could cause instability your farm! It&#8217;s SPDisposeCheck and is &#8230; <a href="http://www.alexangas.com/blog/2009/11/administrators-stop-before-deploying-that-custom-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Even with no development knowledge, there&#8217;s a simple and quick tool that SharePoint administrators can run before deploying a solution package or web part to get some idea on whether it could cause instability your farm! It&#8217;s <a href="http://code.msdn.microsoft.com/SPDisposeCheck">SPDisposeCheck</a> and is particularly useful to keep an eye on the work done by a third party or even internally, with no developer knowledge whatsoever.</p>
<p>The tool was released by Microsoft in early 2009 to help developers check for memory leaks in their code. However there&#8217;s no reason why an administrator can&#8217;t do the same. Memory leaks can cause <a href="http://msdn.microsoft.com/en-us/library/aa973248.aspx">performance problems and general instability</a> in your SharePoint farm. This tool tells you of any potential problems, and here&#8217;s how to use it:</p>
<ol>
<li>Download <a href="http://download.microsoft.com/download/B/4/D/B4D279A0-E159-40BF-A5E8-F49ABDBE95C7/SPDisposeCheck.msi">SPDisposeCheck</a> and install. By default this will copy SPDisposeCheck.exe to <code>C:\Program Files\Microsoft\SharePoint Dispose Check</code>.</li>
<li>Examine the deployment file you have been given. If this is a WSP file, rename its extension to CAB and extract all DLL files. SPDisposeCheck also works on EXE files if you&#8217;ve been asked to run a console application.</li>
<li>For each DLL or EXE, run SPDisposeCheck using the filename as a parameter. To be assured of no SharePoint memory leaks, check that the &#8220;Total Found&#8221; line is 0.</li>
</ol>
<p>Here&#8217;s an example that shows a potential leak:</p>
<p><a href="http://alexangas.com/blog/wp-content/uploads/2009/11/SPDisposeCheckOutput.png"><img src="http://alexangas.com/blog/wp-content/uploads/2009/11/SPDisposeCheckOutput-300x253.png" alt="SPDisposeCheckOutput" title="SPDisposeCheckOutput" width="300" height="253" class="aligncenter size-medium wp-image-274" /></a></p>
<p>If the tool finds some issues then you should query this with the developers. However as the tool itself states, this doesn&#8217;t necessarily mean there is a leak! Unfortunately it can report false positives depending on how the code has been written. Regardless, make sure you have an assurance that the tool is run as part of their release process and any flagged issues have been checked. The tool will never miss a problem with a false negative.</p>
<p>It&#8217;s as simple as that. Be sure to add SPDisposeCheck to your admin toolkit and don&#8217;t let those developers get away with dodgy code!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2009/11/administrators-stop-before-deploying-that-custom-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Query Demo Web Part</title>
		<link>http://www.alexangas.com/blog/2009/09/query-demo-web-part/</link>
		<comments>http://www.alexangas.com/blog/2009/09/query-demo-web-part/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 21:36:53 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[web part]]></category>

		<guid isPermaLink="false">http://alexangas.com/blog/?p=254</guid>
		<description><![CDATA[A question recently came up on Stack Overflow about querying data from multiple SharePoint lists and binding the results to a GridView control. I realised there were some types of SharePoint queries I hadn&#8217;t explored, and that it would be &#8230; <a href="http://www.alexangas.com/blog/2009/09/query-demo-web-part/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://stackoverflow.com/questions/1374137/how-to-query-data-in-sharepoint-from-multiple-lists/">question recently came up on Stack Overflow</a> about querying data from multiple SharePoint lists and binding the results to a GridView control. I realised there were some types of SharePoint queries I hadn&#8217;t explored, and that it would be interesting to compare them and see how they work in a web part.</p>
<p>Hence, <a href="http://stackoverflow.com/questions/1374137/how-to-query-data-in-sharepoint-from-multiple-lists/1444416#1444416">I created the SPQueryDemo web part!</a> It tests and displays results from the following types of queries:</p>
<ul>
<li>For loop</li>
<li>GetListItems from Lists web service</li>
<li>SPQuery for SPList objects</li>
<li>SPSiteDataQuery for cross-site list queries</li>
<li>CrossListQueryInfo for cached cross-site list queries</li>
<li>PortalSiteMapProvider for SharePoint Server publishing sites only</li>
</ul>
<p><a href="http://spquerydemo.codeplex.com/">Download it from CodePlex.</a></p>
<p>I&#8217;ve also used this project to try out using user controls for output rather than the traditional dynamic creation of controls in a SharePoint web part. This has been attempted with an MVP-style pattern which I&#8217;d really appreciate any feedback on.</p>
<p>In the future I&#8217;d like to <a href="http://spquerydemo.codeplex.com/WorkItem/List.aspx">add more functionality</a>, particularly for different query options and types of queries. There is also an annoying bug when changing the query type where the page needs to be refreshed before changes take affect. If anyone would like to help or just check out the code, please <a href="http://spquerydemo.codeplex.com/SourceControl/ListDownloadableCommits.aspx">download the source</a> and hack away! You can also contact me via this blog post or <a href="http://twitter.com/alexangas">via Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2009/09/query-demo-web-part/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When alerts don&#8217;t work &#8216;by design&#8217;</title>
		<link>http://www.alexangas.com/blog/2009/08/when-alerts-dont-work-by-design/</link>
		<comments>http://www.alexangas.com/blog/2009/08/when-alerts-dont-work-by-design/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 18:20:18 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[alerts]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://alexangas.com/blog/?p=226</guid>
		<description><![CDATA[I&#8217;ve just spent many fruitless hours trying to find a bug in my code that has been causing minor but visible pain for a number of users &#8211; and it was never even there. You would think after spending several &#8230; <a href="http://www.alexangas.com/blog/2009/08/when-alerts-dont-work-by-design/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just spent many fruitless hours trying to find a bug in my code that has been causing minor but visible pain for a number of users &#8211; and it was never even there. You would think after spending several years working with SharePoint I would know all of the ins-and-outs of alerts but not this one!</p>
<p><strong>Scenario</strong></p>
<ul>
<li>&#8220;Require Check Out&#8221; is set to Yes (toggle the screenshot below in your mind, please!)<br />
<a href="http://alexangas.com/blog/wp-content/uploads/2009/08/requireco.png"><img src="http://alexangas.com/blog/wp-content/uploads/2009/08/requireco.png" alt="Require Check Out" title="Require Check Out" width="541" height="83" class="alignnone size-full wp-image-227" /></a></li>
<li>Alert created to only send when new items are added<br />
<a href="http://alexangas.com/blog/wp-content/uploads/2009/08/alertnew.png"><img src="http://alexangas.com/blog/wp-content/uploads/2009/08/alertnew.png" alt="Send alerts when new items are added" title="Send alerts when new items are added" width="184" height="153" class="alignnone size-full wp-image-228" /></a></li>
</ul>
<p><strong>Problem</strong></p>
<p>User does not receive alerts on new items.</p>
<p><strong>What&#8217;s happening?</strong></p>
<p>When &#8220;Require Check Out&#8221; is enabled, alerts for a new document are only processed when it is checked in, and <em>only the most recent alert event is kept</em>. Here&#8217;s a simplified version of what SharePoint is doing behind the scenes when a user sets an alert for new items only:</p>
<table border="1">
<tr>
<th align="left" width="20%">Action</th>
<th align="left" width="40%">Alert-related behaviour</th>
<th align="left" width="40%">Response to user</th>
</tr>
<tr>
<td valign="top">User uploads a document</td>
<td valign="top">&#8220;New item&#8221; event registered</td>
<td valign="top">&#8220;Fill in properties and check in&#8221; page displays</td>
<tr>
<tr>
<td valign="top">User clicks &#8220;Check In&#8221;</td>
<td valign="top">&#8220;Changed item&#8221; event registered and alert functionality triggered &#8211; most recent event is processed, sending a &#8220;Changed item&#8221; alert (&#8220;New item&#8221; event is discarded)</td>
<td valign="top">Document checked in and user receives no alert</td>
</tr>
</table>
<p>This is also an issue for users opting to receive alerts with the &#8220;All changes&#8221; or &#8220;Existing items are modified&#8221; options set. Their alerts will read the item has changed when actually it is new.</p>
<p>I asked about this on the SharePoint forums and received a good <a href="http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/948a168d-22f3-4a09-92d7-2e6558b0f0fb">response from Lu Zou-MSFT</a> confirming this behaviour. Unfortunately it&#8217;s unknown if this behaviour will change for SharePoint 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2009/08/when-alerts-dont-work-by-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Showing the bulleted links list view</title>
		<link>http://www.alexangas.com/blog/2009/08/showing-the-bulleted-links-list-view/</link>
		<comments>http://www.alexangas.com/blog/2009/08/showing-the-bulleted-links-list-view/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 17:45:02 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[web part]]></category>

		<guid isPermaLink="false">http://alexangas.com/blog/?p=203</guid>
		<description><![CDATA[A user recently took quite a shine to this lovely bulleted view of links in the list view web part: They wanted all of their existing links list to be changed over to use this view. What makes this case &#8230; <a href="http://www.alexangas.com/blog/2009/08/showing-the-bulleted-links-list-view/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A user recently took quite a shine to this lovely bulleted view of links in the list view web part:</p>
<p><a href="http://alexangas.com/blog/wp-content/uploads/2009/08/usefullinks.png"><img class="aligncenter size-full wp-image-204" title="Bulleted link list view" src="http://alexangas.com/blog/wp-content/uploads/2009/08/usefullinks.png" alt="Bulleted link list view" width="175" height="111" /></a></p>
<p>They wanted all of their existing links list to be changed over to use this view. What makes this case more unusual is that this is actually the view displayed as &#8220;&lt;Summary view&gt;&#8221; in the web UI:</p>
<p><a href="http://alexangas.com/blog/wp-content/uploads/2009/08/usefultp.png"><img class="aligncenter size-full wp-image-205" title="Links toolpart" src="http://alexangas.com/blog/wp-content/uploads/2009/08/usefultp.png" alt="Links toolpart" width="242" height="199" /></a></p>
<p>After much fighting with the SPViewCollection on the list, I discovered <a href="http://ketulpatel.wordpress.com/2008/06/25/programatically-working-with-listviewwebpart-using-non-default-view/">this post</a> on Ketul Patel&#8217;s blog. He showed that to get a reference to this &#8216;hidden&#8217; view, it is necessary to use the mouthy method <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.getuncustomizedviewbybaseviewid.aspx">SPList.GetUncustomizedViewFromBaseViewId()</a>. The list view web part can then be changed to use the markup for the summary view. (Note that the web part needs to be re-added to the page so that the changes take effect correctly.) Here is a method that does this all this:</p>
<pre>
public static ListViewWebPart ReplaceWithBaseView(
	ListViewWebPart listViewWebPart, SPList list,
	int baseViewId, SPLimitedWebPartManager limitedWebPartManager)
{
	string zoneID = listViewWebPart.ZoneID;
	int zoneIndex = listViewWebPart.ZoneIndex;

	SPView view = list.GetUncustomizedViewByBaseViewId(baseViewId);

	ListViewWebPart replacementWebPart = new ListViewWebPart
	{
		Title = listViewWebPart.Title,
		ListName = listViewWebPart.ListName,
		Hidden = false,
		FilterString = listViewWebPart.FilterString,
		SuppressWebPartChrome = listViewWebPart.SuppressWebPartChrome,
		ViewContentTypeId = listViewWebPart.ViewContentTypeId,
		ListViewXml = view.HtmlSchemaXml,
		ExportMode = listViewWebPart.ExportMode
	};

	limitedWebPartManager.DeleteWebPart(listViewWebPart);
	limitedWebPartManager.AddWebPart(replacementWebPart, zoneID, zoneIndex);

	return replacementWebPart;
}
</pre>
<p>In order to call the above method, it&#8217;s simply a matter of getting a reference to the web part page and the web part. The magic number for <strong>&#8220;&lt;Summary view&gt;&#8221; is 0</strong>. Here is the calling code:</p>
<pre>
SPList usefulLinksList = web.Lists[&quot;Useful Links&quot;];
using (SPLimitedWebPartManager webPartManager =
		web.GetLimitedWebPartManager(&quot;default.aspx&quot;, PersonalizationScope.Shared))
{
	try
	{
		foreach (WebPart webPart in webPartManager.WebParts)
		{
			if (webPart.Title == &quot;Useful Links&quot;)
			{
				ListViewWebPart listViewWebPart = (ListViewWebPart)webPart;
				ReplaceWithBaseView(listViewWebPart, usefulLinksList, 0, webPartManager);
				break;
			}
		}
	}
	finally
	{
		webPartManager.Web.Dispose();
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2009/08/showing-the-bulleted-links-list-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Explorer View breaks after IE8 install on Windows 2003</title>
		<link>http://www.alexangas.com/blog/2009/07/explorer-view-breaks-after-ie8-install-on-windows-2003/</link>
		<comments>http://www.alexangas.com/blog/2009/07/explorer-view-breaks-after-ie8-install-on-windows-2003/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 06:35:11 +0000</pubDate>
		<dc:creator>Alex Angas</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://alexangas.com/blog/?p=198</guid>
		<description><![CDATA[Since installing Internet Explorer 8 on my Windows Server 2003 development machine I&#8217;ve been unable to use Explorer View, with the error: Please wait while Explorer View is loaded. If Explorer View does not appear, your browser may not support &#8230; <a href="http://www.alexangas.com/blog/2009/07/explorer-view-breaks-after-ie8-install-on-windows-2003/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since installing Internet Explorer 8 on my Windows Server 2003 development machine I&#8217;ve been unable to use Explorer View, with the error:</p>
<blockquote><p>Please wait while Explorer View is loaded. If Explorer View does not appear, your browser may not support it.</p></blockquote>
<p>Searching around, the main reasons seem to be:</p>
<ol>
<li>SharePoint site behind SSL &#8211; no fix at time of writing</li>
<li>IE security level changes &#8211; fixable by adjusting security levels or adding SharePoint site to Trusted Sites zone</li>
<li>WebClient service not running &#8211; fixable by starting this Windows service and ensure it is set to start automatically</li>
</ol>
<p>For me the problem was #3, however attempts to start WebClient resulted in &#8220;File not found&#8221;-type errors. The following error was logged in the Event Viewer:</p>
<blockquote><p>The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID<br />
{BA126AD1-2166-11D1-B1D0-00805FC1270E}<br />
to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20).  This security permission can be modified using the Component Services administrative tool.</p></blockquote>
<p>This familiar problem usually occursin SharePoint installations with the <strong>IIS WAMREG admin Service</strong> in Component Services. However this time searching the registry for the GUID in the error I had came up with the &#8220;Network Connection Manager Class&#8221;. Then searching for the GUID in its AppID key of {27AF75ED-20D9-11D1-B1CE-00805FC1270E} resulted in the <strong>netman </strong>component.</p>
<p>I then configured the security as described by the error in Component Services:</p>
<p><a href="http://alexangas.com/blog/wp-content/uploads/2009/07/nslp.png"><img class="aligncenter size-medium wp-image-199" title="netman Launch Permission" src="http://alexangas.com/blog/wp-content/uploads/2009/07/nslp-248x300.png" alt="netman Launch Permission" width="248" height="300" /></a></p>
<p>After stopping and restarting MS DTC I was able to start WebClient successfully and Explorer View worked again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexangas.com/blog/2009/07/explorer-view-breaks-after-ie8-install-on-windows-2003/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.alexangas.com @ 2012-02-07 11:39:09 -->
