Friday, June 25, 2010

When you implement a solution, you test it in different situation and depending on the results, of course, you correct the little mistakes that may be present. What I found very interesting so far in software development is the way to reproduce a behaviour following a given set of steps. For the same steps, you get the same result. That is also a way to qualify a bug or a defect, most of the times.
So, what is more frustrating when the problem or the bug happens randomly ?
However, that is what happened recently on a SharePoint 2007 web site during a roll-out.

The symptoms ?
Having activated the anonymous access, pages prompted the users for credentials and when no credentials were entered, a simple message "401 Unauthorized" was displayed. Now, on that same page, simply pressing F5 to refresh was loading and displaying the page correctly.

Checks ?
Checked that all the resources were accessible by anonymous users, being CSS, images, documents, etc. Some images were referenced using absolute URLs, but apart from that, nothing special.
Checked in the Windows Event Log, absolutely nothing related to this problem.
Checked the ULS, crawled megs of text files, several "excessive number of SPRequest" messages were present, but they were here before the roll-out as well. The only clue was some "Access denied" messages, but, no reference to a resource or no stack trace.
Checked also the web.config, everything was ok. And anyway, this is normally handled by SharePoint.
Checked the IIS Directory Security permissions, verifying the identity of the user used by the application pool, but here again, everything was normal.
Custom code doing a forbidden action ? After a complete removal of the three custom controls, the problem persisted, so, it was not that.
After hours and hours of investigation, I found one thing. The Master Page and Page Layouts gallery was not accessible anonymously, so I fixed this first, but still, the 401 issue was still here. Being in the library I decided to check the content of the master pages and the page layouts and found couple of "__designer" tags referencing resources. We indeed used the SharePoint Designer to apply some changes, but never had this problem before. But, to be sure and to definitely clean these files, every "__designer" tags have been removed and pages provisionned again.

The result ?
Everything was fine. So, for some reasons, the tags added by SharePoint Designer seem to cause access issues, but not all the times.
In this particular case, what was really annoying is that nothing can lead you to the solution or where the problem is located. A lot of people wrote about 401 random issues, caused by either a hotfix applied here or load-balancer problems there, but mine was still another one.
So, before spending hours or days looking for useless (in that specific situation) logs, check your master page or your page layouts and remove "__designer" tags. Check also that they are accessible anonymously.

Saturday, June 05, 2010

Title : Mastering Your Organization's Processes

Authors : John O'Connell, Jon Pyke, Roger Whitehead

Summary :
In another post I mentioned why BPM is important today for the companies. Mastering the processes and the change is primordial for the managers in an enterprise. This book explains what is a business processes and their management, then describes the different systems of an organization. It also defines the actors involved in business processes, such as the ones outside the organization, the people and other systems. Finally, it gives some strategies for BPM and also some guidance to choose a BPM product.

Review :
I found this book difficult to read, most likely because I am not in the targeted audience for this kind of book. For me, it was too high-level and too conceptual. It seems, for me, that to apply the concept, there will be a missing pieces between the book and the reality of the field. One great positive point : every chapter ends with a case study that is very well explained.

Title : Business Process Change - A Manager's Guide to Improving, Redesigning, and Automating

Authors : Paul Harmon

Summary :
In the software industry, BPM or Business Process Management is present since the mid-90's. Even earlier according to different sources. But nothing is really new and nothing has really changed since Henry Ford in 1903 when he started Ford Motor to design and build a high-quality but easy to assemble car. What is done since ages in the manufactory industries tried to be applied to many other sectors.

Nowadays, having the best product on the market is not enough and companies have to constantly adapt themselves to changing parameters such as new competitors, suppliers, new technologies and so on. Today, it seems that the only way for a company to survive is its business processes and its ability to change them quickly (others would put the word "agile" here, but I keep myself making this shortcut).

The book starts by explaining the value chain and what is process management. A whole part is dedicated to the modelisation of the processes before going into BPM, including Six Sigma. In the middle of the book, some technologies are explored, such as XML and some ERP systems without forgetting UML.

Review :
Really good book, with excellent explanation. What I liked was also the level of details and the numerous examples and case studies. Nevertheless, if requires a little knowledge of what is BPM and is definitely not a technical book (I knew this before reading it, but it is more for clarification as most of the posts I do on this blog are technical). In addition, there are a lot of diagrams that help to understand the concepts explained throughout the book.

In a first post, the process of setup a managed metadata store has been explained, and it is now time to use the enterprise term store in the different list and document libraries. This post will review the following steps :

  • Site Column creation
  • Site Content Type creation
  • Document Library creation
  • Metadata navigation setup

As a best practice, every time a custom column is needed, a new content type should be created, and this has not changed since WSS 3.0 and MOSS 2007. To create a content type with a managed keyword column, you first start by creating a site column.
In your site, go into the Site Actions menu and select Site Settings. Under the Galleries section, select Site Columns to display all the existing columns that have been defined (see below).

 (Click for a larger view)

Click the Create button leads you to the Create Column screen (see below).

 (Click for a larger view)

At the end of the column type list, a new Managed Metadata type can be selected enabling you to select the needed term set to this column. The other settings are the same as in MOSS 2007, except the last one that proposes the selection of the term set. It is even possible to select a sub-set of the term set, by going deeper in the tree. Just above the term set selection box, it is also possible to look for a specific term. Finally, as for the other kinds of column types, you can select a default value from the term set tree that will be assigned to the column (see below).

(Click for a larger view)

Now, the column is ready to be used in a content type. Again, in the Site Actions menu, select Site Settings and then Site content types under the Galleries section (see below).

(Click for a larger view)

Click on the Create button sends you to the New Site Content Type screen (see below).

(Click for a larger view)

Just enter a name for the content type, a parent one and a group under which the content type should appear in the list. This screen has not changed since WSS 3.0 After the confirmation, click on the newly created content type in order to edit it (see below).

(Click for a larger view)

Under the Columns section, click the Add from existing site columns link. Remember the group in which the created column has been stored and select it in the Available columns and click the Add button. Once the column is in the Columns to add list, click OK to save the content type (see below).

(Click for a larger view)

The content type is now available for any document library or list.
Clicking on the Libraries link, all the document libraries for the site will be listed. To create a new one, click on the Create button, select Document Library under the Library group, enter a name and click the Create button (see below).

(Click for a larger view)

You will be redirected to the library. What you need to do now is to add the content type to the library. In the Ribbon, select the Library tab and click the Library Settings. In the Advanced Settings, you have to Allow management of content types and confirm the new setting to enable the addition of content types to the library (see below).

(Click for a larger view)

The Content Type to add to the library is the one you created few minutes ago. In the Library Settings, under the Content Types section, click Add from existing site content types. From the Available Site Content Types, click on the one you created and click the Add button (or directly double-click on the content type), then click the OK button (see below)

(Click for a larger view)

The new content type will be displayed under the Content Types section.
Now, if you want to restrict the available content types, it is possible to remove the unwanted ones from the list using the same configuration screen.
To be able to use the metadata for the navigation and the filtering in the different lists and libraries, the Metadata Navigation and Filtering site feature has to be activated. This can be done by going in the Site Actions menu, Site Settings then Manage Site Features under the Site Actions section (see below).

(Click for a larger view)

When you come back to your Library Settings, a new option named Metadata navigation settings will appear (see below).

Click on the link and for both Configure Navigation Hierarchies and Configure Key Filters, select the column that will store the metadata (see below).

It is time now to upload a new document. Once the document is selected, the next screen will prompt for a file name and to associate a metadata (see below).

Clicking on the button on the right of the field allows to select the value directly from the taxonomy picker (see below).

Do this for several documents.
On the left of the document library, a panel where some filtering can be done based on the metadata or keywords is displayed, but it is also possible to select in the tree the items we are interested in. On the fly, the list of documents or items is filtered offering a nice way to find the material we are interested (see below).

In this post we saw how to apply the metadata to a content type then to a document library to enable us to filter the data more easily (see below).

(Click for a larger view)

The Managed Metadata Service is not only responsible of the management of the enterprise taxonomy, but it also provides the content type syndication, which is something that will be covered in another post, so, stay tuned....

Side note : This is the first time I used docs.com to edit and prepare a post with the combination of skydrive for the images. It was quite interesting, really amazing and useful. No need to store any file on a local drive, everything was online. Really great ! This post is then also available on docs.com : http://docs.com/15K0