Thursday, December 27, 2007

A tip!

User > Robin, would you mind deleting that site for me?
Robin > No problem! What's the url again?
User > http://asdfkljasldfkj/sites/asldkfjasldkfj
Robin > Ah right! Will do!

Simple task eh on a quite day like this? I just open up the site and want to click on Site Actions > Site Settings > Delete this Site, but to my suprise.. I couldn't find the Site Actions link.. hmmmm! So I did some url hacking and placed /_layouts/settings.aspx behind the http://asdfkljasldfkj/sites/asldkfjasldkfj url, et voila I had my Site Settings page ;) Next thing to do was ofcourse..  Click on "Delete this site"..  I got prompted with a Access Denied error! Aaargh, what is going on here? I tried to logon with the service account which has (as I do) Full Control rights and I got the same Access Denied error.  Then I remembered that I locked the site using Central Admin this morning :

So I unlocked the site and got back to the site and all of a sudden there was my Site Actions button again.. needless to say that I was able to delete the site :)

Conclusion, when you are confronted with a "Reader" style view of a site where you administrative rights and get confronted with Access Denied errors, check if the site is being locked using Central Admin!


Technorati Tags:

Wednesday, December 19, 2007

Create custom site definitions which include CEWPS and using resource files for their content

Maybe my longest title for a post ever but I think it covers everything what I wanted to share with you..  In a previous post I mentioned a solution for a problem when a site template was being used with activated features that didn't provision very well. This post is about that solution ;)

It's not really difficult to create a new site definition (a lot of bloggers already paved the way for me there) but I had some difficulties adding a Content Editor WebPart (CEWP) with HTML into my definition. Since you have to replace the < and > symbols with &tl; and &gt; and you will have to put CDATA brackets around the whole thing as well. After several attempts to encode my HTML the proper way (and failing miserably), I decided to check how Microsoft put CEWP's in their site templates.. and this is how it looks:

<WebPart xmlns:xsi="" xmlns:xsd="" xmlns=""> <Title>$Resources:spscore,ReportCenterOnet_CEWP_Title;</Title> <FrameType>TitleBarOnly</FrameType> .. <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly> <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName> <ContentLink xmlns="" /> <Content xmlns="">$Resources:spscore,ReportCenterOnet_CEWP_Content;</Content> <PartStorage xmlns="" /> </WebPart>

"$Resources:spcore, ReportCenterOnet_CEWP_Content", that's all the content they put in there! No encoded HTML with CDATA brackets at all! So what does it mean then? Well.. i'll tell you!

  • $Resources : here they are referring to the fact that the content is placed in the Resources folder (/12 hive/Resources)
  • spcore : here they are referring to which file the content is placed in
  • ReportCenterOnet_CEWP_Content : here they are referring to which value in the file must be used

So when we open up the spcore.xml file and find look for the "ReportCenterOnet_CEWP_Content" value, it looks like this :

<Data Name="ReportCenterOnet_CEWP_Content"> <Value>&lt;DIV class="ms-vb"&gt; &lt;SPAN class="ms-announcementtitle"&gt;Report Center features include:&lt;/SPAN&gt; &lt;UL&gt; &lt;LI&gt;&lt;A title="" href="../Lists/Sample KPIs/KPIListViewPage.aspx" target=""&gt;Key Performance Indicators&lt;/A&gt; (KPIs) enable you to communicate goals, trends and track progress.&lt;/LI&gt; &lt;LI&gt;&lt;A title="" href="../ReportsLibrary/sample dashboard.aspx" target=""&gt;Dashboards&lt;/A&gt; enable you to give a more detailed explanation of your information using Excel workbooks and KPIs. Dashboard filters make it easy to select a range of information to view. To create your own dashboard go to the &lt;A title="" href="../ReportsLibrary/Forms/scsummpg.aspx" target=""&gt;Dashboards&lt;/A&gt; view of the Reports library and click 'New'.&lt;/LI&gt; &lt;LI&gt;The &lt;A title="" href="../ReportsLibrary/forms/current.aspx" target=""&gt;Reports&lt;/A&gt; library is designed to store files containing reports and dashboards and allow easy access to information from previous time periods.&lt;/LI&gt; &lt;/UL&gt; &lt;SPAN class="ms-announcementtitle"&gt;To prepare this Report Center for use, the following actions are suggested:&lt;/SPAN&gt; &lt;UL&gt; &lt;LI&gt;View the sample &lt;A href="../ReportsLibrary/sample dashboard.aspx"&gt;dashboard&lt;/A&gt; and &lt;A title="" href="../ReportsLibrary/sampleworkbook.xlsx" target=""&gt;workbook&lt;/A&gt; to understand some of the capabilities of this Report Center&lt;/LI&gt; &lt;LI&gt;If the samples do not work correctly ask an administrator to ensure that Excel Services are enabled and that this Report Center is a Trusted Location&lt;/LI&gt; &lt;LI&gt;If you plan to use Excel to analyze information from existing data servers, create and upload data connection (ODC) files to the &lt;A title="" href="../Data Connections" target=""&gt;Data Connection Library&lt;/A&gt;. If you want users to create new KPI Lists then add them to the "Owners" group. Users in the "Members" group can edit pages but can not create KPI Lists.&lt;/LI&gt; &lt;LI&gt;Update or remove sample content&lt;/LI&gt; &lt;/UL&gt; &lt;/DIV&gt;</Value> </Data>

So it seems you still have to encode your HTML but you don't have to worry about CDATA stuff :) The question is, why should you use the same technique as Microsoft does ?

  • Makes the ONET.XML more 'readible' and thus easier to maintain
  • No more messing around where to put the CDATA stuff
  • One place to maintain the content of your CEWPs

Hope this gives you more insight about creating and defining site definitions as it did to me ;)


Technorati Tags:

SharePoint Perfomance tuning using IIS Overlapped Recycling

In case you didn't notice there is a new blogger in town called Steve Sheppard (an Escalation Engineer at MS (he also wrote the whitepaper about Understanding the Explorer View about a year ago)) and he covers some pretty serious topic and that is the feature of IIS 6.0 called "Overlapped Recycling' and why you should use it! So go out and check the following posts :

Overlapped Recycling And SharePoint

Overlapped Recycling And SharePoint- The Generic Value Of Overlapped Recycling

Overlapped Recycling And SharePoint- Why SharePoint Requires It

Overlapped Recycling And SharePoint- Memory Based Recycling

Overlapped Recycling And SharePoint- Scheduled Recycling

I really love this stuff! :) So thanks Steve!


Technorati Tags: ,

Thursday, December 13, 2007

The workflow failed to start due to an internal error

I got that error emailed to me from a customer who just had his new site and was playing around with the new workflow functionality. Needless to say that he was quite disappointed :) So I went to check it out.. First thing I did was to reproduce the problem and funnily enough I also experienced the same error as he did (don't you just love the errors that are reproducible!). Next thing was to create a new custom workflow on that list to see if the error still occurred.. and it did. Next thing to do was to create a new workflow on a new list.. same result.. Then I deactivated (all of) the workflow features.. reactivated them again.. error solved!

In order to really identify and solve the problem I created a new site, based on the same site template and added a workflow to a document library.. started off an approval workflow and guess what.. I experienced the same error. So I created another site, based on another site template and there I noticed it didn't have any workflows activated. So as you might have guessed.. no problems at all when I activated them and created a new workflow.

Now to explain some things about our custom site templates. These are created using the old trick 'Save as template" and then making them available using STSADM. Now the site template is causing the problems had already, during the creation, the workflow features activated. So it seems that during the creation of new a site using that template, the features are not provisioned as they should and therefore are not working properly. That would explain the deactivating and reactivating of the feature to make it work again..


  • Create them by copying the STS folder and modify the ONET.XML file and activate the (workflow) features
  • Use the "Save as template" thing with all the (workflow) features deactivated and create a custom event handler to activate them during the creation of a new site


Please note that this error occurred on a pre-SP1 environment.

Technorati tags: ,

Thursday, December 06, 2007

Our worries are over!

I think I've lost count how many times I asked myself or let other people ask themselves.. "Is it possible to migrate content from a list to another list while maintaining the metadata in an easy way without using the "Manage content structure link" because I can't/don't want to use the publishing feature.." Ok, ok.. not exactly that question but you get the point ;) Well fortunately Chris O Brien has released a tool on codeplex that does exactly that ! Introducing the SharePoint Content Deployment Wizard. Chris says the following about it :

".. The tool provides a wizard-like approach to deploying content between SharePoint sites. The selected content is exported using the Content Migration API (PRIME), giving a .cmp file (Content Migration Package) which can be copied to other servers.."

I tested it by exporting a list from site A and then importing it on site B and it worked perfectly! All the custom metada, versions and more importantly the 'modified by', 'created by' , 'modified' and 'created' columns were still intact! So I'm very impressed! :)


Technorati tags: , ,

Tuesday, December 04, 2007

Very interesting book!

Clicking through links on my favorite blogs (yes.. once a time I actually visit the blogs I read in my RSS reader) I stumbled upon the blog of Richard Taylor who is a SharePoint engineer at Microsoft. In his second post he writes about an upcoming book which working title is "Microsoft Office SharePoint Server 2007 Engineering and Architecture Resource Kit".

Here is a snippet of his post that really captured my attention and explains why this book makes it to my personal no1 'must-read/have' ;)

...a text that will be the prescriptive guide to architecting and engineering a successful, large-scale implementation of MOSS 2007--written by Microsoft Architects and Engineers.  There are a number of books out there that speak to both WSS and MOSS.  All of them are for *Administrators*, the emphasis being on Administration.  This book will be a 'nuts-and-bolts' text of the "why" more than "how".  The book will be similar to a "Notes from the Field" but from an Engineer's perspective, not an administrator; a book on “How Microsoft does IT...


Technorati tags: