CompleteSharePoint.NET v2.0 was released today by Tommy Segoro, another local Perth SharePoint Developer. This open source project provides functionality to Windows SharePoint Server (WSS) 3.0 similar to the Publishing Feature within Microsoft Office SharePoint Server (MOSS) 2007.
Right now I’m sitting on a plane on the way to Sydney and figured this was a great time to deploy the source to a Windows Server 2008 VM and give it a run for its money. Especially as I’m currently looking at building a Web Content Management System in WSS for my fathers Spanish Magazine (lots of posts/webcasts to come on WSS3.0 + WCM).
First Impressions
Licensing
The CompleteSharePoint.NET web site does not mention anything about licensing and does not link to the CodePlex.com project which I found when v1.0 was released. I have already emailed Tommy to ask about this…the v2.0 source is currently not in CodePlex either, but available to download as a zip from the web site.
CodePlex Developers
So I’d really like to help grow this solution, but based on the CodePlex project not being promoted I’m not sure what the go is here. Especially as v2.0 isn’t in there.
v1.0 stability
I actually downloaded v1.0 and tried to get it running in a VM but there were no installation instructions and the source was not using one of the commonly used productivity tools (VSeWSS etc). This made it hard to see how this was all hanging together. I managed to get the wsps deploying, but when creating a page I got a blank screen. Anyway, after seeing the installation instructions for this one…there are two mods to the web.config that would’ve fixed it.
Feature Set
The web site does not really say what you actually get by installing this product other than a page editing toolbar. It really needs a full run down of what you get and how it is hanging together architecturally.
The Installation Process
So, I decided to go for broke and just install the wsp’s into the farm. The installation instructions were a bit odd:
“Install and deploy CompleteSharepoint.NET.Web.Site.wsp (only if you want to run CompleteSharepoint.NET website on your machine).”
Why else would you deploy the wsp unless you wanted it running? I think what he means is only deploy it to the Web Applications where you want to use this functionality. The other WSP is mandatory on the farm and shared by each Web Application instance that uses it.
No Installation Script
Anyway, noticed there was no installation script so quickly threw together the STSADM commands to add and deploy it:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "CompleteSharepoint.NET.wsp"
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "CompleteSharepoint.NET.wsp" -immediate -url "http://win-0XQBNQW37UF:8116" -allowGacDeployment -allowCasPolicies -force
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "CompleteSharepoint.NET.Web.Site.wsp"
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "CompleteSharepoint.NET.Web.Site.wsp" -immediate -url "http://win-0XQBNQW37UF:8116" -allowGacDeployment -allowCasPolicies -force
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs
pause
Some assumptions were made that there was no order in which the wsp’s had to be deployed. Obviously an installation script would have made this self explanatory.
Web Config Modifications
v2.0 has a support page where it explains the modifications required to the web.config. Again, this got me worried as these modifications can be done as part of the deployment process by leveraging the SPWebConfigModification class in the API.
Site Definition
It wasn’t very clear whether you had to use your own Site Definition or a specific CompleteSharePoint.NET one:
“You will need your custom site definition.”
In v1.0 you had to use the one provided and it appears you do in v2.0 also.
ERROR
So when I actually created the site definition I got this error:
“The given key was not present in the dictionary.”
Looking in the ULS logs gave me:
0x07DC Windows SharePoint Services General 88jb Medium Feature Activation: Activating Feature 'CompleteSharepointNETContentTypeBinding' (ID: '49870641-bd3c-4042-8703-0aff88ad4b71') at URL http://win-0xqbnqw37uf:8116.
05/18/2009 18:27:16.94 w3wp.exe (0x0BC8) 0x07DC Windows SharePoint Services General 72bf Medium SPContentTypeBindingElement.ElementActivated(). Applying ContentType '0x0101006FEE00D312DD41D58E8D3D104FC0595F' to list 'Pages' on web 'http://win-0xqbnqw37uf:8116'
05/18/2009 18:27:17.07 w3wp.exe (0x0BC8) 0x07DC Windows SharePoint Services Feature Infrastructure 889x High The element of type 'ContentTypeBinding' for feature 'CompleteSharepointNETContentTypeBinding' (id: 49870641-bd3c-4042-8703-0aff88ad4b71) threw an exception during activation: The given key was not present in the dictionary.
05/18/2009 18:27:17.09 w3wp.exe (0x0BC8) 0x07DC Windows SharePoint Services General 72by High Feature Activation: Threw an exception, attempting to roll back. Feature 'CompleteSharepointNETContentTypeBinding' (ID: '49870641-bd3c-4042-8703-0aff88ad4b71'). Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Microsoft.SharePoint.SPFieldCollection.CreateSPField(Int32 index) at Microsoft.SharePoint.SPFieldCollection.EnsureSPField(Int32 index) at Microsoft.SharePoint.SPFieldCollection.get_Item(Int32 iIndex) at Microsoft.SharePoint.SPFieldCollection.ItemAtIndex(Int32 iIndex) at Microsoft.SharePoint.SPBaseCollection.SPEnumerator.System.Collections.IEnumerator.get_Current() at Microsoft.S...
05/18/2009 18:27:17.09* w3wp.exe (0x0BC8) 0x07DC Windows SharePoint Services General 72by High ...harePoint.SPContentType.get_Fields() at Microsoft.SharePoint.SPContentType.DeriveContentType(SPContentTypeCollection cts, SPContentType& ctNew) at Microsoft.SharePoint.SPContentTypeCollection.DeriveContentType(SPContentType ct, SPContentType& ctNew) at Microsoft.SharePoint.SPContentTypeCollection.AddContentTypeToList(SPContentType contentType) at Microsoft.SharePoint.SPContentTypeCollection.AddContentType(SPContentType contentType, Boolean checkName, Boolean updateResourceFileProperty) at Microsoft.SharePoint.SPContentTypeCollection.Add(SPContentType contentType) at Microsoft.SharePoint.SPContentTypeBindingElement.EnsureContentTypeExists(SPWeb web) at Microsoft.SharePoint.SPContentTypeBindingElement.ElementActivated(SPFeaturePropertyCollection props, SPSqlComman...
05/18/2009 18:27:17.09* w3wp.exe (0x0BC8) 0x07DC Windows SharePoint Services General 72by High ...d sqlcmdAppendOnly, SPWebApplication webApp, SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionContentTypeAndEventReceiverBindings(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.SPFeature.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)
05/18/2009 18:27:17.11 w3wp.exe (0x0BC8) 0x07DC Windows SharePoint Services General 8l36 High Failed to activate site-scoped features for template 'COMPLETESHAREPOINT20#0' in site 'http://win-0xqbnqw37uf:8116'.
05/18/2009 18:27:17.11 w3wp.exe (0x0BC8) 0x07DC Windows SharePoint Services General 72h9 High Failed to apply template "COMPLETESHAREPOINT20#0" to web at URL "http://win-0xqbnqw37uf:8116".
05/18/2009 18:27:17.11 w3wp.exe (0x0BC8) 0x07DC Windows SharePoint Services General 72k2 High Failed to apply template "COMPLETESHAREPOINT20#0" to web at URL "http://win-0xqbnqw37uf:8116", error The given key was not present in the dictionary. 0x8107058a
05/18/2009 18:27:23.52 OWSTIMER.EXE (0x0900)
At this stage I was tempted to throw the headphones on and watch Mr Bean for the millionth time, but persistence and Heineken for fuel kept me going!
So I followed the flow of the onet.xml to make sure the Content Type being binded ‘Article Page’ was being provisioned before in the process which is was…and no errors occured. SharePoint Manager 2007 also helped me see it within the Site Collection also.
Further poking in the logs and I found a bit earlier on in the provisioning process:
edium Feature Activation: Activating Feature 'CompleteSharepointNETRootLists' (ID: 'dbac423b-f07e-44ba-b230-f718c22ce4d1') at URL http://win-0xqbnqw37uf:8116.
05/18/2009 18:47:35.67 w3wp.exe (0x0BC8) 0x0FA0 Windows SharePoint Services Fields 88yf Medium Creating list "Application Settings" in web "http://win-0xqbnqw37uf:8116" at URL "Lists/ApplicationSettings", (setuppath: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\CompleteSharepointNETRootLists\KeyValueList")
05/18/2009 18:47:35.70 w3wp.exe (0x0BC8) 0x0FA0 1388 8e2x High Failed to find the content type schema for ct-1033-0x0162d9afca87664c8e83cf6a63ff35 while caching feature data.
05/18/2009 18:47:35.72 w3wp.exe (0x0BC8) 0x0FA0 1388 8e2x High Failed to find the content type schema for ct-1033-0x0162d9afca87664c8e83cf6a63ff while caching feature data.
05/18/2009 18:47:35.74 w3wp.exe (0x0BC8) 0x0FA0 1388 8e2x High Failed to find the content type schema for ct-1033-0x0162d9afca87664c8e83cf6a63 while caching feature data.
So it wasn’t provisioning the ApplicationSettings list properly and this had a key field, which I’m assuming the error came from.
Basically it was trying to find the content type schema ‘ct-1033-0x0162d9afca87664c8e83cf6a63ff’ or one of it’s parents. A reference to this id couldn’t be found in the source which was odd, I hadn’t seen the ‘ct-1033-‘ prefix, when I removed this I found the reference. Having a look at the KeyValueList ListTemplate I noticed it had an embedded ContentType called the ‘NNTT Key Value List’ with id ‘0x0162d9afca87664c8e83cf6a63ff’…good to see reuse going on here from previous projects (NNTT) ;-)
It didn’t look like it actually needed that ContentType, but the ListTemplate looked too empty for my liking. I’ve spent the last few months inside ListTemplates writing SPSource tool…so I know a dodgy ListTemplate when I see one!
Anyways, I commented out the Content Type and the Site Provisioning worked! Yipeeee….oh shit, I’m on a plane, now everyone is looking at me!?!
So now I get the screen shot above….great, ok so it hasn’t got the corny picture of the two geeky looking people pointing on the desk (you know which one I mean!)…but the error is pretty obscure!
“You have no default page specified. To specify a default page please create a new page.”
OK, so I click on Site Actions and see:
Cool, so if I want to create a new page, I’m guessing I go ‘Create Publishing Page’. For uniformity sake, I would recommend that naming be the same e.g. use ‘Publishing Page’ in error message. I’d also recommend moving all the Site Actions that are custom for CompleteSharePoint.NET into it’s own sub group, just like the MOSS one does…except you don’t pay $000’s for it ;-)
Creating my first Publishing Page
So I click ‘Create Publishing Page’ and get this.
First impressions…the Date Picker is not what SharePoint UI uses…people are used to custom fields with a nicer date picker than that…changing months causes a full post back on the page…AJAX anyone?!?
So filling in the form:
Content Type:
Another bug, the content types didn’t appear in the drop down
Page layout
A few options here:
Then there are a heap of check boxes with no explanation of what they do…could really do with some help text here! So I leave the rest as default and click submit. Drum roll…
So, first impressions…for an open source project…I wasn’t that impressed with Tommy’s company logo being on the page! Based on these ‘Our partner links’…I can see that some of my questions around licensing and joining the CodePlex team may already be answered ;-)
I chopped the url to just the server and port and it still gave me that error…creating a new page with ‘Welcome Page’ checked made that the default page for that site.
When I click Site Actions now I’m presented with the following:
Edit Page
So this is where the proof in the pudding really comes in…nothing much has been apparently different from an end user perspective until now, unfortunately no screen on the planet will display the screenshot in one hit…the “page toolbar” looks like this:
Compared with the MOSS one…I can see trying to pitch this at anyone is going to get a …OK OK we’ll pay for MOSS WCM!
Further down the page there is:
but interestingly at the top…the content is still there and not including in rich text editor?!?
I added some content into the rich text editor and click the Publish button and now get:
So I can click Hide button to hide the toolbar…but the hide/show still exists…need to test anonymous users don’t see that at later stage.
Also noticed this
So it’s doing site hits too which is nice, again, a feature list on the product site would have been useful to mention this. At this I decided to stop checking out features for this post (more to come though).
The Source
Build
So the first thing I did was try and build the solutions. The CompleteSharePoint.NET solution built fine, but the CompleteSharePoint.NET.Site.Web was dependent on the other solution and the references were going to the GAC. I’m also not entirely sure of the logical split between the two solutions as the second is dependent on the first anyway.
It also relied on FreeTextBox dll, fortunately I didn’t do a clean before I built (as I wouldn’t have been able to download it at 30,000 ft), as the dll was sitting in the bin directory – even though there is a DLLs folder within each project.
Proprietory Solution Package generation
Again, I noticed the CreateCabDDF.vbs files and CreateManifest.vbs files like v1.0. The use of proprietary scripts to generate a wsp, when there are tools commonly used such as VSeWSS, WSPBuilder and STSDev out there loomed on my mind a bit…but I got over it…and the VBScript (yuk)!
The scripts were hooked up in the Visual Studio project, much like STSDev does with a targets file, but it was part of the actual csproj msbuild file instead. Changing the build target to CreateSolution and building entire solution kicked off the process to create the manifest and then the wsp file itself.
Lessons Learnt
Continuous Integration Script
I would recommend having a script to create a web app, site collection with the site defintion and also a uninstall one too. It could also include firing off the process to build the solution each time and also build the wsp etc.
This way you have a Continuous Integration process. It makes it extremely easy with this approach to pull the source into a fresh VM and fire off the script and see whether it works or not. It also gets new developers to a project up and running quickly!
In the long run, it also saves the developer who’s making changes from doing manual steps and he can tweak the site definitions, run the script and see his work…either working…or breaking ;-)
Conclusions
As with any Solution you deploy in your farm, it is always good to do some homework on its foundations…what it is actually doing…rather than just deploying the wsp to the farm.
Most Organisations have a policy to bring the source code in-house and control it internally once deployed. Typically a senior developer/architect will do a review of the Solution before allowing it in production. Again, with the troubleshooting I was doing above, it really needs someone with SharePoint Development experience to do this review.
This is fine for open source products…the question that I have got looming now is…what about all those ISV’s out there developing their Solutions. They will not release their source, so how do you know it’s any better. More and more little ISVs are appearing developing web parts and Site Defintions…be extremely careful with this! I would recommend looking at SharePointReviews.com to get an indication of whether the product is any good or not from that stand point.
As for CompleteSharePoint.net v2.0, I’d wait for v3.0 before taking this seriously unless you have a lot of time on your hands to get to grip with what the solution is doing and fixing it up. This is by no means dissing Tommy’s efforts,some serious time has been put into getting this where it is at. I would just suggest that it needs to be reviewed before releasing it as v2.0 as I still think this is an alpha release.
In terms of the open source projects that I have contributed to…I am now more aware of putting the hat on where “I haven’t seen this before”. I have provided various web casts for SPSource to show how it works, but even then I have realised that people like to see instructions in a Word/PDF Document which I wrote last week and have currently got being reviewed.