Tuesday, March 31, 2009

Custom publishing site definition and MCMS 2002 migration to SharePoint 2007

Last week I developed a custom minimal publishing site definition based on the Andrew
Connell’s one
. All the tests went just fine. After that we wanted to use it for the
conversion of our portal from MCMS 2002 to SharePoint 2007. We created a site collection
based on this custom site definition as the destination of the conversion and launched
the operation. Few minutes later the content migration failed with the following
error :

MCMS 2002 migration to SharePoint 2007 Exception

Migration throws exception: An item with the same key has already been added.

Stacktrace:
At System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean
add) at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at Microsoft.SharePoint.SPFeaturePropertyCollection.Add(SPFeatureProperty
property) at Microsoft.SharePoint.Publishing.Administration.ContentMigration.<>c__DisplayClass4.b__3()
at Microsoft.SharePoint.Publishing.CmsSecurityUtilities.RunWithWebCulture(SPWeb
web, CodeToRun webCultureDependentCode) at Microsoft.SharePoint.Publishing.Administration.ContentMigration.ConvertToComplexPublishing(SPWeb
web)
....

After hours of debugging and thanks to Reflector, we found out that the content migration method “ConvertToComplexPublishing” was looking for a property called “SimplePublishing” and expecting the value “false” for it. In my Onet.xml the property value was set to “true”.

FYI, if the “SimplePublishing” property is set to “false”, that means that the approval workflow is required for every publishing page. We changed our custom publishing site definition to have this property set to “false” :

< Property key="SimplePublishing" value="false"/>

After this, the content migration went just as we have expected.


Saturday, February 28, 2009

STSADM : A tool I can't live with out!

STSADM is a command-line tool that comes with SharePoint to help performing many administration tasks. I said administration tasks! What’s the use of the Central administration interface then? Certainly, almost all the SharePoint administration is done via the this interface but still there are some few tasks that only STSADM can perform. That’s why it’s very important to learn how to use this tool.

Furthermore, what is interesting about STSADM, and since it is a command-line tool, is that we can group many commands in a batch file to execute them all together. We can even schedule the execution to run at a specific time.

STSADM default location is in the BIN directory under the 12 hive: “c:\program files\common files\microsoft shared\web server extensions\12\bin”. To make things easier for your self, add this location to your path variable, so you can execute stsadm.exe anywhere on your command prompt.

As an example (a very simple one), here is a sample of a batch file to perform a backup of a SharePoint site:

Use Notepad or your favorite texte editor and write in the line below:

stsadm.exe -o backup -url %1 -filename c:\backups\%2.bkp

Save this to sitebackup.cmd for example.

As you see, this command file accepts two parameters: %1 and %2. The first parameter is the url of the site to backup and the second is the name you want to give to your backup file.

On the command prompt, enter the following:

sitebackup.cmd http://yoursharepointsiteurl yourbackupfilename

As a result, you will have a backup of your site http://yoursharepointsiteurl.com stored in c:\backups\yourbackupfilename.bkp.

If you want this backup to be performed periodically, just create a scheduled task to execute at any time you want, the command file you have created.

One last thing : STSADM comes with about a hundred of commands that cover many administration tasks. However, if you find that none of these commands can achieve that task you want and of course, this task cannot be done via the central admin, you can develop your own STSADM command and add it to SharePoint. It is very easy and I will show you that in my next post. Until then, try to get acquainted with STSADM commands and enjoy this powerful tool.


Extending STSADM...Develop your own commands : Part 1


Saturday, January 31, 2009

Microsoft Office SharePoint Server 2007 (MOSS) : Features and CALs.

Many of us, the SharePoint users, were surprised to find out that to use some SharePoint
features such as Excel services and electronic forms, we need to purchase per user
licenses called CALs, Client Access Licenses. So, here is what you should know about
MOSS licensing:

  • Windows SharePoint Services 3.0 (WSS) are server components, same as IIS among other server components. All you have to acquire is a license to use Windows server 2003 or 2008.

  • Watch out! Depending on what features you need and the number of users you have,
    MOSS may be very expensive. There are to versions: Standard end Enterprise and each
    version has its own CALs. To use Enterprise features, both Standard and Enterprise
    CALs must be purchased.

  • To use MOSS enterprise features such as “Business intelligence” and “Enterprise
    search”, you have to pay for per user licenses.

For more information:

- Microsoft Office SharePoint Server 2007 and Related Technologies pricing
- Microsoft Office SharePoint Server 2007 frequently asked questions
- Microsoft Office SharePoint Server: How to Buy

Tuesday, January 13, 2009

SharePoint : The need for a governance plan

According to Microsoft : "Governance is the set of policies, roles, responsibilities, and processes that you establish in your enterprise to guide, direct, and control how it uses technologies to accomplish business goals."

Governance plan is critical step for any successful SharePoint deployment. The absence of such a plan may even lead to a total chaos. Since no organization wants to loose control over her information, a plan to structure this information and establish the responsibilities between users and IT professionals is unavoidable.

This has been said, the governance plan is neither meant to very limit the end-user nor to overload administrators and developers.

Where to start then?

- Plan governance (Technet)
- Microsoft SharePoint Team Blog
- Mark Schneider's SharePoint Taxonomy and Governance Blog

Tuesday, December 30, 2008

Introducing SharePoint

When we talk about SharePoint, even to people who are in the IT field, the first thing that comes to their minds is collaboration. That’s true. SharePoint offers many tools that make things easier for a team to collaborate and share information. But, SharePoint is not only collaboration. In this post, I will try to highlight in brief some of other features where SharePoint also excels:

Business intelligence:

For BI, SharePoint offers easy and smart ways to bring, consolidate and display key management indicators for decision-makers. For this, SharePoint uses:
- Excel Services to access and share Excel spreadsheets via a web browser.
- Dashboard and reports, a combined power, to create and display vital business information in a built-in interface made of Web Parts such as KPI (Key Performance Indicators), Excel spreadsheets and Microsoft SQL reporting services reports.
- Business Date Catalog (BDC) to access external line-of-business applications data such as Oracle, IBM DB2 and SAP.
For more: http://www.microsoft.com/sharepoint/capabilities/bi/features.mspx


Enterprise content management (ECM):

The SharePoint ECM capabilities allow enterprises to manage their content by offering them integrated solutions that come out-of –the-box such as:
- Documents management: SharePoint provides many features to publish documents to a specific space to be shared and where users can collaborate. SharePoint also offers out-of-the-box workflows to facilitate the approval/review processes of documents.
- Records management: To be in compliance with the law, enterprises need to implement procedures and plans to keep track of information (documents, pictures, media files, etc.) as records that we can refer to when needed for audit or legal requests for example. SharePoint records management capabilities allow records managers to specify metadata, workflows and policies necessary for a good records management.
- Web content management (WCM): Many organisations are now moving from MCMS
2002 to Sharepoint WCM for a better way to author and publish web content.
- Forms management : With Microsoft Office InfoPath 2007, organisations are able now automate business process and gather vital information using electronic forms. SharePoint make this even practical by deploying these forms to the web via web sites thanks to its forms services.
For more : http://www.microsoft.com/sharepoint/capabilities/ecm/features.mspx
http://office.microsoft.com/en-us/sharepointserver/HA102063591033.aspx

Enterprise search:
Enterprise search is may be the greatest functionality in SharePoint. This strong feature is aimed to facilitate the way people look for relevant information and improve the way the results are presented.
For more : http://www.microsoft.com/sharepoint/capabilities/es/features.mspx

This post is just a summing up introduction to SharePoint for people who want to know what this product is for.

Another SharePoint blog. Why not?

SharePoint has become for the last years one of the biggest monuments in the IT landscape. Every one, especially IT specialists, should, at least, know a little bit about this great and huge product from Microsoft. I have been using SharePoint for the past tree years and, in this blog, I will share with you every thing I know (and will know) about SharePoint.