Category Archives: SharePoint

Update a List Item Without Anyone Looking

So lets say you want to change a list item but you don’t want to impact any versioning or having to deal with check-in or check-out, and you don’t want to change the last modified or modified by values. You can do this with the bit of code shown below. Grab the item reference and update the item just as you normally would however rather than calling SPItem.Update() you want to call SPItem.SystemUpdate(). You can check out the TechNet reference if you want to see additional code samples.

Continue reading Update a List Item Without Anyone Looking

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

We Don’t Need No Stinking Patches

Keeping up with WSS, MOSS, SharePoint Foundation, and SharePoint patches can be a challenge. The guys on my team work with many different clients whom typically run at different SharePoint versions and patch levels. Its often we have only version numbers rather than the specific patch or KB which documents an installed patch. In addition, we sometimes have the need to build out lab environments at the same patch level as the client.

Continue reading We Don’t Need No Stinking Patches

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Yuletide ULS

blog-diagnostics0In this season of giving why not consider adding ULS logging to your customizations for your SharePoint administrators. When troubleshooting a critical issue around the holidays nothing goes better with the old Eggnog and Jack Daniels than some good old fashion, the way your mama did it, diagnostic logging. In this post I will show you a pattern that I use which not only provides an easy way to add that logging to your SharePoint customizations, e.g.. one method call, but also allows the SharePoint Administrator, tat has to keep your code up and running, the ability to customize and manage the Tracing and Event levels from within Central Administrator just like any other logging component within SharePoint Server 2010.

Continue reading Yuletide ULS

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

How Many Versions Do You Have?

Seems like a simple question however for SharePoint 2007 and 2010 it may be harder than you think to get a solid answer. What is really behind the question is how much space is my versions taking up or to put it another way if I trim my versions how much space will I get back. Unfortunately we have hit upon two shortcomings with SharePoint, 1) there is no out of the box reporting mechanism to give a SharePoint administrator any insight into number of versions or storage and 2) there is no out of the box trimming policy or mechanism which can be applied. For the most part we are left with implementing storage quota and either increasing quota when requested or asking users to do a self trim of documents and/or versions manually.

Continue reading How Many Versions Do You Have?

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Don’t Tell SharePoint The Name of Your SQL Server

SQL Aliases have been around for a while however I am amazed at how many folks either don’t know about them or don’t use them. A SQL Alias is just a really easy way to do a string substitution of a connection string just before a connection is made to a SQL server. The SQL Alias configuration is stored in the registry and the anywhere the server name portion of the connection string matches the server alias the substation is made.

Continue reading Don’t Tell SharePoint The Name of Your SQL Server

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Transform Your Search Results

In a previous blog post I talked about how you can use XSLT to display additional Managed properties returned from Search. In this post I want to talk about the method I went about to create the XSLT in the hopes that you find it an interesting enough pattern to use should you find yourself creating some of the same visualizations for Search, the CQWP, Lists, or the BCS WebParts which all use XSL to transform XML into HTML.

Continue reading Transform Your Search Results

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Pimp Document Ratings within SharePoint Search Results

A good friend of mine Steve Peschka did a blog post during the SharePoint 2010 Beta which shows how to include a document’s rating within search results without writing any code. Well its been almost a year since that post and allot of things have changed. Since we RTM’ed SharePoint 2010 there are several key components to that blog that no longer work and this post is an attempt to update and hopefully add a little to the effort he started.

Continue reading Pimp Document Ratings within SharePoint Search Results

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Why I don’t Dev SharePoint 2010 on Windows 7

Recently some of the MCM SharePoint masters were kicking around different development environments and setups for SharePoint 2010. This was an interesting conversation because of SharePoint 2010’s support for Windows 7 and Windows Vista as an OS for development and test purposes. For more information on how to set this up check out this MSDN article. In some circles SharePoint development on Windows 7 has become the platform of choice due to Microsoft’s lack of an offering for x64 virtualization on Windows 7. For me personally however running Windows 7 as a SharePoint development environment was not ever that compelling for a number of reasons:

Continue reading Why I don’t Dev SharePoint 2010 on Windows 7

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Must Have: Visual Studio 2010 Power Tools

So for those that have not already done so installing the Visual Studio 2010 Power Tools is well worth your time, especially if you do any SharePoint development. Today I created a console application to test SharePoint 2010. One of the more annoying tasks when creating such an application is adding all the necessary references to the project — mainly because this is very taxing for my brain to try to remember the various assemblies. One of my favorite features of the VS 2010 Power tools is the new Add Reference dialog (see below).

Continue reading Must Have: Visual Studio 2010 Power Tools

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Sasquatch Out!

In my previous post I documented a bug in SharePoint where a memory leak can greatly impact that amount of memory you SharePoint WFE will use during the normal processing of web request. The SharePoint PG just recently released the 2010 April CU for WSS 3.0 and MOSS 2007. It requires you have Service Pack 2 before installing these cumulative updates but I can tell you that is something you want to invest in.

Continue reading Sasquatch Out!

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Searching For An Error?

So lets say you create a new site based on the Team template and you would like to create a search center site under that same site collection. So you navigate to Site Actions – New Site and maybe you choose the Enterprise Search Center template and provide a name for your new site and hit “Create”. Well you may be presented with an error like this one…The dreaded unexpected error has occurred error, yuk (failure #1).

Continue reading Searching For An Error?

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Yet Another Possible User Profile Sync Error You May See

I Have had the great honor of hitting a good number of errors while setting up the User Profile Sync service. I documented one error here but when setting up another environment today I hit yet another. The environment in question was a two server setup with one server being the DC and the other SharePoint + SQL Server. I use the farm account CONTOSO\FarmAccount. I setup all Service Applications using the PowerShell script found here and started the services I wanted to run. When I got to starting the User Profile Synchronization Service I would eventually see the following error in the event log.

Continue reading Yet Another Possible User Profile Sync Error You May See

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg

Stick With What Got You Here

I think its safe to assume most SharePoint developers which have been working with the product for any length of time have seen code similar to the code below below. Its a common problem, disposable objects which are not disposed. There has been a ton written on this problem and Roger Lamb wrote a great tool called SPDisposeCheck which you run against your assemblies to determine if they may be failing to call Dispose.

Continue reading Stick With What Got You Here

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Digg