Monthly Archives: June 2009

SharePoint Application Development the Free and Easy Way

These resources accompany a presentation at the Western New York Dot Net Users Group (WNYDNUG):

So what does the title of this presentation really mean?

By SharePoint, I mean Windows SharePoint Services 3.0 (WSS 3.0) not to be confused with MOSS2007 which adds features on top of WSS 3.0 and requires licenses.

By Application Development, I don’t mean canned features that work right out of the box, but additional web parts, web pages, and functionality that require the skill of an intermediate ASP.Net web developer.

By Free I mean that in addition to the free WSS 3.0 platform, all the development tools used in the presentation are also completely without cost.

And by Easy I mean ‘easier’ than the way I used to develop SharePoint solutions years ago. Unfortunately, developing SharePoint using the standard, documented methods and templates is really, really, really, really, really, really (so glad I got that thesaurus), really, really, hard. And when I began to settle on a set of tools and techniques that relieved my pain, I got kind of excited and decided to do a presentation. Enjoy.


Windows SharePoint Services 3.0 SP1 Developer Evaluation VPC Image

…Windows Server 2003, WSS 3.0, Visual Studio 2008 Pro with extensions for SharePoint, Silverlight, and Ajax, SharePoint Designer 2007, Office 2007, and… (I’m seriously impressed they did this) a shortcut to Notepad already added to windows’ right-click ‘Send To’ menu!!!!!


This turns the nightmare of Web Part development into a dream. 

ASP.Net apps in the _layouts folder

You’re an ASP.Net developer. Now act like one! Using this technique, you can just deploy your standard web apps right to SharePoint.

MVC apps in SharePoint

Similar approach to in _layouts, but with the magic of MVC.

U2U CAML Query Builder

When CAML makes you cry, CAML Query Builder will dry your tears.


Sometimes all you really want is for SharePoint lists to have a teensy bit more functionality (hide columns, move column descriptions around). Here ‘ya go.

SharePoint Features

Added features (list printing, user management, turn stuff off on List Toolbars, and much more) from a community on codeplex. Woah! Scot Hillier put these together; that’s a name you can trust in SharePoint development.

Tool Basket

Another Codeplex community project. The easy Form Designer alone is worth the expense (what! it’s free??)

 Roger Lamb – Common Coding Issues When Using the SharePoint Object Model

As soon as you’ve written enough code with SharePoint Object Model to be dangerous, you owe it to yourself to review it against this set of guidelines

Jan Tielens

Jan was the first one to nudge me in the right direction with SmarPart. He continues to provide lots of fresh ideas; JQuery techniques as of late.


In addition to SmartPart, Jan also made these numerous additions to SharePoint features available on CodePlex (check out the slick charts!)

Manage large SharePoint lists for better performance

Eventually you may end up with a lot of data (items in lists). It’s possible to have a list with millions of items, but it’s best not to exceed 2,000 items per ‘container’ (root or folder). It’s also advised not to select more than 2,000 items at a time. If you’re handling 5,000+ items at a time, you’re really asking for trouble, as MS SQLServer may lock the whole table. That’s THE TABLE; the one and only table that holds every item for every list in every site of your SharePoint collection. Youch!

SharePoint development the “right” way

Finally, if you’re producing apps commercially, or deploying to environments that enforce stricter standards, you may be forced to develop SharePoint the “Right” way. You’ll need to learn the intricacies of web part plumbing and architecture, you won’t have drag-n-drop controls, and to properly deploy all this, you’ll need to build WSP Solution Packages which contain numerous files which must be configured properly and end up in all the right nooks and crannies of the web server (12 hive, GAC, bin, etc.). Deployment typically forces a restart of your site, too.

To get a full picture of what’s involved in building and deploying a WSP Package WITHOUT the ease of the short-cuts and tools provided above see this example project:  I like this example because it perfectly illustrates the complexity involved, but also provides a guide to building your own UserControl wrapper (like SmartPart).

The following tools from Microsoft and Codeplex will help with developing and deploying applications as WSP Solution Packages.


…hey, how’s that for a bunch of letters and numbers thrown together (the lower case ‘e’ is a nice touch, too)! These are Microsoft’s extensions for Visual Studio 2008 to help with developing and deploying SharePoint Web Parts and such. And it only took me like 3 hours to install and configure correctly *sigh*.

These screencast demos might help too (they make it look sooooo easy)

…but over the years, developer communities weren’t waiting around for Microsoft, and these two tools have become the de-facto standard for SharePoint development and deployment.




Technical Notes: 

  • Smart Part User Controls are kept in:
  • Custom ASP.Net web applications are kept in:
    C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATELAYOUTS
  • If you have supporting libraries in your layouts web projects, you should set their build output to go to:
  • Another gotcha I experienced. Once, when I deployed SmartPart, some of the samples didn’t run for a couple reasons. 1. if you’re using ajax enabled controls, you have to make sure you’ve got all that stuff configured and that there’s a script manager somewhere in the page or master page. 2. The windows permissions on the sample ascx files, themselves got messed up when I was copying the samples, and I got Access Denied errors. ‘Touch’ the permission on those files, or maybe copy and paste the contents into new file and those errors should clear up.
  • If you plan on inserting updating deleting list items, you’ll probably run into security errors. The file to adjust is:
    12CONFIGwss_mediumtrust.configFor details on this and MANY OTHER ‘tips and tricks’ see:
  • In the custom web applications you add to the layouts folder, the app will barf if your web.config has this line:
    <authentication mode=”Windows” />, so comment that out.
  • Also, regarding web.config, keep in mind that to take advantage of LINQ and new c# 3.5 language features, the default web.config may not up to snuff, so you’ll probably have to add a few settings to get that working. Here are settings I added recently to a ‘new’ setup of a VPC to get my code examples running….<compilation><assemblies>
     <add assembly=”System.Core, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089″/>
     <add assembly=”System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35″/>
     <add assembly=”System.Data.DataSetExtensions, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089″/>
     <add assembly=”System.Xml.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089″/>
     <add assembly=”Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71E9BCE111E9429C”/>
       <compiler language=”c#;cs;csharp” extension=”.cs” warningLevel=”4″ type=”Microsoft.CSharp.CSharpCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089″>
        <providerOption name=”CompilerVersion” value=”v3.5″/>
        <providerOption name=”WarnAsError” value=”false”/>
       <compiler language=”vb;vbs;visualbasic;vbscript” extension=”.vb” warningLevel=”4″ type=”Microsoft.VisualBasic.VBCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089″>
        <providerOption name=”CompilerVersion” value=”v3.5″/>
        <providerOption name=”OptionInfer” value=”true”/>
        <providerOption name=”WarnAsError” value=”false”/>
      <assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
        <assemblyIdentity name=”System.Web.Extensions” publicKeyToken=”31bf3856ad364e35″/>
        <bindingRedirect oldVersion=”″ newVersion=”″/>
        <assemblyIdentity name=”System.Web.Extensions.Design” publicKeyToken=”31bf3856ad364e35″/>
        <bindingRedirect oldVersion=”″ newVersion=”″/>




Hope this all helps.