2007-03-27

Using a feature to simulate a WebCreated / SiteCreated events

In Sharepoint there is no SiteCreated or Web Created events. You therefor have to use other means to execute logic after the web or the site has been created.

Article that put me on the right track
http://blogs.msdn.com/angus_logan/archive/2006/11/12/chargeback-for-all-sites-created-using-feature-stapling-very-feasible.aspx

This type of feature stapling is also used when branding the private view of My Site. Feature Stapling has become THE way to do branding and customization in SharePoint.

2007-03-23

ASP.NET Ajax articles and sources

Some very good sources to help you, me, everybody to become a better Ajax developer:

More to come.

2007-03-22

Working with EPiServer also?

Yes, I do. Great product as well - the number one web publising tool. Check it out:

2007-03-21

For my Norwegian readers - funny words in the Norwegian release

Jeg har hatt den glede av å kunne jobbet både med den engelske og den norske versjonen av SharePoint - og det er ikke enkelt! Ikke alltid godt innarbeidede utrykk har sin like opplagte norske utgave:

Crawle = Kravle
Crawler Search = Kravlesøk
AD Forest = AD skog
Name (presence) = Navn (presentasjon)

Du kan jo da tenke deg hva "Perform a crawler search in the complete AD forest" vil bli oversatt til - "Utføre et kravlesøk i den komplette AD skogen". Minner jo mest om en beskrivelse av å være litt for full, på tur gjennom skogen en sen kveld, og lete etter en halvfull spritflaske som man har mistet. :-)

2007-03-16

Need to deploy your SharePoint 2007 solutions quickly?

Then follow the following steps:

  1. Create your solution (that has to be done by you completely :-))
  2. Download and use the VS 2005 Solution Deployment template from TheKid. Download it from here.
  3. Then download and use the great solution installation tool from Lars Fastrup, Ontolica. Get it from here.

I think this will save you a lot of time (and possible troubles).

Non Microsoft SharePoint 2007 Products

Here are a list of products that I (and collegues) have tested and found very exciting and promising, and that are worthwile digging deeper into:

Search Enhancements
Offline work

Updates will follow.

2007-03-15

How to develop custom code in SharePoint 2007

There are several ways you can extend and customize SharePoint with your own code. Chris Johnsen has in his article described the pros and cons for some of these methods.


  • Custom built web parts
  • An application in the _layout folder
  • User controls and the Son of Smart Part
  • ASPX pages added to a SharePoint Site

Read his article here.

The Kide have added some pros and cons for different ways on how to develop sites in SharePoint 2007 and WSS 3.0:

  • Use the SharePoint Solution Deployment
  • Develop on one farm and use Site Export/Import or Content Deployment

Full article here.

SharePoint 2007 licensing

Finally, I've found some official Microsoft information on SharePoint 2007 licensing. They are estimates, but they give a hint on what the cost will be.

For some background information and licenses tips&tricks:

  • Product features and comparison - which SharePoint version contains what - Microsoft Article: Read more...
  • How to buy SharePoint - product and license overview: Read more...
  • Which licenses do you need in different scenarios: Read more...
  • Critical view on SharePoint for internet facing sites: Read more...

Complete article
ServersEstimated Price
Office SharePoint Server 2007$4424
Office Forms Server 2007$4424
Office SharePoint Server 2007 for Search Enterprise$57,670




Client Access LicensesEstimated Price
Office SharePoint Server 2007 Standard CAL$94
Office SharePoint Server 2007 Enterprise CAL$75
Office SharePoint Designer 2007$187





Internt facing sitesEstimated Price
Office SharePoint Server 2007 for Internet sites$40,943

2007-03-14

Problems installing Windows Sharepoint Search services ?

If you get the following error:

The call to SearchServiceInstance.Provision (server 'YourServerName') failed. Setting back to previous status 'Disabled'. System.ComponentModel.Win32Exception: OSearch ('YourSearchAcct') at Microsoft.SharePoint.Win32.SPAdvApi32.ChangeServiceConfiguration(String strServiceName, String strAccountName, SecureString sstrPassword, IdentityType identityType, Boolean bDontRestartService) ....

Then YOU MUST CHECK that you have provided the user name in the format [domain]\[username]

2007-03-13

Installing Office 2007 Enterprise, but not able to remove all Beta stuff?

Then download and run MyUninstaller from http://www.nirsoft.net/. Why? Because you will NOT be able to remove all the 2007 Beta things from Add/remove programs. Go for it!

And if that doesn't work , then run the "cleaner" (even it states that do not use this tool to remove Office 2007 component):

http://support.microsoft.com/default.aspx/kb/290301

Controlling Site Navigation in Site Templates

The following properties may be added to the feature "
541F5F57-C847-4e16-B59A-B31E90E6F9EA" to control the sites navigation controls (global and current):


  • InheritGlobalNavigation. Use the same globa main menu navigation as the parent.
  • InheritCurrentNavigation. Use the same current navigation (i.e. the left quick lanucn menu) as the parent.
  • IncludePages. Set to true to show pages in the site the navigation tree.
  • ShowSiblings. Set to true if you want sub sites to be displayed in the navigation tree.
  • OrderingMethod. 'Automatic' - Sort all node types automatically, and group pages after other types. 'Manual' - Sort all types manually. 'ManualWithAutomaticPageSorting' - Sort all types except pages manually. If pages are included, sort them automatically and group them after all other types.
  • AutomaticSortingMathod. CHECK THE SPELLING!!! 'CreatedDate' - Sort items by time of creation. 'LastModifiedDate' - Sort items by time of last modification. 'Title' - Sort items alphabetically by title.
  • IncludeInCurrentNavigation.
  • IncludeSubSites.
  • IncludePagesOrderingMethod.
  • SortAscending.

Again - check how method i spessled in AutomaticSortingMathod :-) Again Luts Roeder's .NET Reflector was of great help to identify this SharePoint error.

Check the code in the class Microsoft.Sharepoint.Publishing.NavigationFeatureHandler, method ApplyNavigationProperties, and the code lines where the internal dictionary is created.

2007-03-12

Common errors when working with Site Templates

Below is a list of errors that I've gotten when I've been working with creating custom site and portal site templates. The errors are sometimes VERY hard to find!

It is important to remember that the sites are created on the fly so if the portal site template is provisioning multiple site you can check the tree structure to se where the provsioning failed.

"The file or folder name contains characters that are not permitted."

  • Most often this error has been casued by incomplete resource statements in the Url-field in List statement in the site configuration or,
  • when a list view is used in a modul definition, e.g. missing ';',
  • or misspelled resource names,
  • referencing the wrong resource file/library, etc.

"Cannot complete the operation".

  • Confllict between the module name in the configuration section and the named used in the module definition
  • xml errors - missing end tags,
  • when you provision a new list there is a mismatch between the list type and the feature id, and it looks like the 3 last digits in the feature id should match the list type!

Speed up development and testing

Following tips & tricks can be useful in speeding up the development process when customizing SharePoint 2007:

  • Recycle the application pool instead of making an iisreset. Works in most cases. Download tool/application.
  • Adding the right schema definitions when working with the different xml-files. They are located under [12]\template\xml and are added to the xml-file by setting the Schema attribute of the xml-file which you are editing, and thereafter selecting the same schema in th xmlns attribute.

If you just want to test ot some simple code - maybe on a server without Visual Studio installed - try the Snippet Compiler tool. A "mini visual studio" to write and test code snippets "on the fly".

Creating Complex Portal Site Templates

Creating large portal site templates that are involving provisioning of many differente webs, sites and custom lists are a challenging task - not how to do it but managing all those details in the onet.xml files. I've done it for one of mye customers, and below is a descripion of the steps that are involved, which files to customize and possible pitfalls or errors that should be avoided.

First, the following files are a part of a Portal Site Template:

  • [12]\templates\1033\xml\webtemp_myportalsite.xml - all the site templates that are used and pointers to where they configurations my be found
  • [12]\templates\sitetemplates\myportalsite\*.* - the site configurations. I've collected all my custom templates in on directory.
  • [12]\templates\sitetemplates\mywebmanifests\myportalsite.xml - the portal site definition with all the webs and sub webs which it contains and which sould be provisioned.
  • [12]\resources\myportalsite.resx - resources used in the portal site and the site defintions. It's a good idea to use a resource file beacause you then can change titles, descriotions, names, locations, etc without entering the onet.xml file which becomes very large.

Suggested process

  • Design the portal site template with all its contents in SharePoint. Build the structure, the web part zones, page layout, master pages, etc. that will be needed. The result of this process is what you then will bring into the Portal Site template. If the structure and content is not well defined when you start it will be more time consuming to do make changes in the onet.xml file.
  • Create a "dummy" team site which includes ALL the web part types that you have used in your portal site.
  • Run SharePoint Solution Generator on the "dummy" team site to create a site template. The content of this template you can then cut and paste in all the site templates that are included in you owen portal site template. Saves you a lot of time and uneccessary cursing :-)
  • Identify all the different site templates that will be needed and enter these into the webtemp_myportalsite.xml file
  • Build the portal site structure in the mywebmanifest\myportalsite.xml file
  • Build the site templates in the sitetemplates\myportalsite\* catalog and the corresponding onet.xml file
  • Adding web parts to the definition. Export the web part from the site and cut and paste the web part data/definition into the onet.xml file.

2007-03-08

Dou you want to create great applications without any code?

Then SharePoint Designer is the answer. Looked through some great demos from Microsoft yesterday and they made my head spin - a lot of ideas on how to create new applications quick and easy. You can imagine creating the applications while the business persons are sitting in the same room telling you how they want the application to work - that's an agile process!. Combining lists as sata storage, data view, custom input views, web parts with (including connections), workflows, etc. makes it possible to create pretty cool and useable applications.

Examples to come:

Application Profiling - finding the code lines that consumes alle the CPU power

is not an easy task if there were no tools around to help us, but there is an answer: JetBrains' dotTrace 2.0. It took me only 2-3 ours to download, install, run , and pin point why our CMS site used all the CPU for 4-7 s per request! I did this on a live site - right out of the box.

Instead of guesswork dotTrace gave me an direct asnwer to where the "power leakage" was. And when you know exactly what the problem is - a quick an easy solution is just around the corner :-)

So check it out: www.jetbrains.com

2007-03-04

SharePoint 2007 MUST HAVE Tools

Below is a list off tools and applications (with or wotuout source, freeware, shareware, applications with licenses,etc.) that I've found very helpful in my SharePoint projects.

SharePoint Solution Administration

  • Todd Baginski's Feature Manager. Great tool for browsing and installing/removing features on your SharePoint installation.
  • SharePoint 2007 Explorer. Great tool to investigate your site and see all the parameters that is set. More or less the whole object model is made visible in a click and browse manner.
  • SharePoint Feature Pack (Scott Hillier). Print Liste, Theme Changer, PlaceHolder Master, Presence Contact List, Content Type Hierachy, Log Viewer, etc.
  • IEWatch. To check what's going on in IE when a page is being loaded; files being loaded, from where the files are loaded, time it takes, etc.

Mini tools

Business Data Catalog (BDC)


  • BDC Meta Man (license). THE tool for making external data available in SharPoint lists and applications.
File Management