26 FebSecurity Exception

Gonna try and post some more troubleshooting articles, just like my colleague Michaël. This time an article about a problem in Microsoft Office SharePoint Server 2007.

The problem
A customer came across a security exception error. But it didn’t always show up. Turned out it only showed when she was routed to a certain Web Front End, WFE02. You can see the error below in a screenshot.
SecurityException

The cause
The application wanted to write an event in the event log of WFE02 but wasn’t able to because the event source doens’t exist. It also doesn’t have rights to create the event source. That is why it is throwing an exception.

The solution
Temporarely give the application pool account that is used as identity of the web application local administrator rights on the WFE02.

1. Find out what the application pool identity is from your SharePoint web application. Go to IIS manager in administrative tools or type the command inetmgr in the run box.
IISmanagerapplicationpoolidentity
2. Go to Server Manager in administrative tools. Open the Configuration tab and go to Local Users and Groups and go to the Administrators Group.
AddApplicationPoolIDtoLocalAdmins
3. IISreset the web front end by typing the command iisreset in the run box.
IISreset
4. Remove the application pool identity from the administrators group.

Now the event source can be created and the items will be posted in the event log. The customer will see the .aspx page again.

In this case it turned out to be that the application wanted to write information events in the event log. Can be really annoying if your application won’t run right because of some information logs.

31 DecIncident management: Creating an incident

Since a while I’ve been working with a new Microsoft product from the System Center family called Service Manager 2010. I’ve been putting a lot of time and effort in using it and I wanted to share this with you. So from now on I’m gonna write some blogposts about it. I’m gonna try to do this in a persona-scenario kind of way. But one step back, what the heck is Service Manager 2010 anyway? I can write a whole definition about it but Microsoft also has a clear one:

System Center Service Manager 2010
Microsoft System Center Service Manager is an integrated platform for automating and adapting your organization’s IT service management best practices, such as those found in Microsoft Operations Framework (MOF) and Information Technology Infrastructure Library (ITIL). It provides built-in processes for incident and problem resolution, change control, and asset lifecycle management. Through its configuration management database (CMDB) and process integration, Service Manager automatically connects knowledge and information from System Center Operations Manager, System Center Configuration Manager and Active Directory.

Source: Microsoft

First of all what I want to do is show you part of SCSM 2010 and what it does out of the box. My first focus will be on working with incidents in SCSM 2010. In SCSM 2010 they have delivered an incident management pack based on best practices like MOF and ITIL. A high level overview about incident management is written by Ketan Ghelani overhere.

I’m using the following personas and scenario for this. I have used the Microsoft Dynamics Customer model for this.

Personas
Lisa – Customer Service Representative
Charlie – Customer

Scenario #001 – Lisa creates an incident
Lisa gets a call from Charlie at the Helpdesk number. Charlie tells Lisa that he isn’t able to use his e-mail. This is already the second time this happened. Last time a colleague from Lisa helped him with that incident. Charlie also tells Lisa that he is away for the next few days and that he is only available via landline number +1 123 456 789

Like you see above, this is not the most interesting scenario. But it does give you a first idea of what kind of interface we are dealing with. So this is the main reason why I’m posting this, showing you the User experience of SCSM 2010.

Lisa executes the following steps in this scenario:
1. Log on to the SCSM 2010 console
2. Create an incident & fill in the details
3. Relate an older incident
4. Activate the incident & watch it in the incident overview

1. Log on to the SCSM 2010 console
This is of course the most basic step. I added this one to still give you an idea what you will experience when first opening the console.
Connect to Service Manager ServerLisa connects with her credentialsThis is the landing page after you log on. First look on the interface, very similar to other products in the System Center family like SCOM or SCCM

2. Create an incident & fill in the details
Most important part of this step is to view the interface. There are a few important parts in the interface of creating a work item, in this case an incident. You have a status part on top of your screen, tabs with information about your work item and a tasks pane on the right to do something with the work item.
Lisa is gonna add a new incident. This is a work item, click the work item menu bar, or wunderbar as they like to call itLisa selects the Incident Management folder. You see on the right a create incident option in the task paneIt is also possible to create an incident from within the folder, via a right mouse actionA form opens in which Lisa can fill in the incident details. This is the template for a standard incident delivered out of the box in the SCSM 2010 incident management pack. Notice a few areas like the status bar on top, task pane on right & the tabs
Lisa can fill in the affected user, this can be someone from an Active Directory imported with a connector or CSV or just created manuallyLisa can also use dropdown lists in a template, out of the box it is user for fields like category, source, etc.Lisa can also add the affected service, in this case probably an exchange accountAfter Lisa filled in all the information of the incident notice how the top bar is filled with information Incident number, Status, Affected user, Main contact info, Created on, Resolved by & Time worked

3. Relate an older incident
One of the features in this management pack and the product itself is that you can relate a lot of stuff to a work item. In this scenario I’m showing you how to relate another incident to this current incident.
The second tab is the activities tab, you can add activities which are related to this incident. This can be a custom one, or base on pre-defined templated. We are not gonna use this in this scenarioLisa adds a related work item, in this case Lisa adds the previous incident with user e-mail which was created for CharlieResolution tab, is primarily used by the persona who is gonna solve this case, so Lisa doesn't use this tab in this scenarioHistory tab, nice overview of what has happened with this work item. In this scenario we also not using it.

4. Activate the incident & watch it in the incident overview
Like I stated in one the previous screenshots SCSM 2010 is working with folders and views to show work items. I wanted to show the end result to also give you an overview of this interface.
If you now go to all incidents view you will see the new created incident by LisaThe my incidents view, which shows all the incidents of the current logged on user, in this case Lisa

So this is a quick overview of how to register a incident and in general a work item in System Center Service Manager 2010. If you have some questions or feedback feel free to comment in the section below. I will post some new scenarios soon.

Sources:
Microsoft Service Manager product page
High level overview incident management written by Ketan Ghelani on the Microsoft Service Manager 2010 team blog
Microsoft Dynamics Customer model poster
Microsoft Opeations Framework

27 OktReference to ListTemplate ID’s MOSS

Lately I’m building different kind of features, which can be very easy and interesting, but more on that later on. When I tried to bind some of those features to different kind of lists I came across the subject of ListTemplate ID’s.

ListTemplate ID’s
Every ListTemplate is associated with a different kind of ID, a value which can be used within a feature. For instance, a announcements list template is associated with the value 104. This can be very useful if you want to bind your feature to just document libraries.

	
		
			DeletingEventHandler
			ItemDeleting
			10000
			DeletingEventHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f5cce5f062aa189d
			DeletingEventHandler.DeletingAction
			
			
		
	

The example above shows how to use a event receiver in your elements.xml file of a feature. In this case my event handler feature registers receiver for the ItemDeleting event of a Announcements list template. It uses my custom code described in the DeletingAction class (.cs).

Reference ListTemplate ID’s.
It can be useful to know the different kind of ListTemplate ID’s when you create features. When googling I came across some reference posts on ListTemplate ID’s. I decided to put them together into one table and added two Listtemplate ID’s I discovered myself. I found 1300 Translation Management library & 1301 Languages & Translations. For all the others ID’s the credits go to MSDN library, Mike Smith & Alex from Phase 2.

# TemplateName TemplateDescription
-1 InvalidType  
100 Generic List  
101 Document Library  
102 Survey  
103 Links  
104 Announcements  
105 Contacts  
106 Calendar  
107 Tasks  
108 Discussion Board  
109 Picture Library  
110 Data Sources  
111 Web Template Catalog  
112 User Information  
113 Web Part Catalog  
114 List Template Catalog  
115 Form Library  
116 Master Page Catalog  
117 No Code Workflows  
118 Workflow Process  
119 Wikipage Library  
120 Custom List in dataview  
130 Data Connection library  
140 Workflow history  
150 Project tasks  
200 Meetings  
201 Agenda  
202 Meeting User  
204 Decision  
207 Meeting Objective  
210 Textbox  
211 Things to bring  
212 Home Page library  
301 Posts  
302 Comments  
303 Categories  
432 KPI list  
433 Report library  
850 Pages  
1100 Issue tracking  
1200 Admin Tasks  
1300 Translation Management library  
1301 Languages & Translations  
2002 Personal Document library  
2003 Private Document library  
2100 Slide library  


If there are any errors in the table above or you have new ID’s please let me know.

17 SepHow to create & deploy a custom theme in MOSS?

About 3 years ago this was one of the first questions I got when I started my first internship. Back then I was working with Sharepoint Portal Server 2003 & WSS v2. Soon I discovered it wasn’t as easy as it looked, but I got the basic idea. Every modification was by hand, but has something changed since then?

Classic 2003 way to create a custom theme
Create a custom theme the ‘2003 way’ was mainly copying, pasting & editing files on the sharepoint web server. Especially the editing of the theme stylesheet, which contains a enormous amount of elements & classes, was a hell of a job. Fortunately tools like Color cop & Internet Explorer developer toolbar made it a bit manageable. Also resources like Heather Solomon’s CSS reference guide were pretty useful.

The basic steps were:
1. Copy a existing theme on the MOSS web server
2. Renaming setup file (.inf)
3. Modifying the stylesheets, images
4. Adding the theme to the TEMPLATE\LAYOUTS\1033\SPTHEMES.XML file

If you are searching for howto’s I can recommend articles from: Sharepoint End User Content Team, Tigirry’s Sharepoint Blog & Dan Lewis

Creating a custom theme MOSS style
Since then a lot has changed in the world of Sharepoint. Cool things like solutions, timer jobs & features were introduced with the release of MOSS. But googling on “create custom theme moss” still gives the same result. Copying & editing theme files on the web server.

Has nothing really changed since then? No, some things have changed, thanks to the wonderfull MOSS community.

That is also the main reason of this post. Two days ago I came across a this post from Keith Dahlby from Solutionizing.net about his STSDev Theme solution generator. He wrote that he added this option to the codeplex project STSDEV. It automates all step 1,2 & 4 described in the 2003 way and adds it to a Visual Studio project. And instead of manually copying it to the web server it creates a solution!

Adding import technique to Theme solution project in VST
One of the drawbacks of this was that if you upgrade the theme solution you still had to re-apply it by hand to the sites that are already using it. In some scenario’s this can be a problem. At this point the @import technique described by Heather Solomon comes around the corner. Keith Dahlby was already talking about implementing this in his generator, so looking forward to it.

In the meantime I manually added the import technique to my Visual Studio project, this is how I did it.

1. Follow Keiths steps described in this post to develop a theme solution project with STSDEV found on Codeplex

2. Create a new folders in the ROOTFILES directory for your theme.css file, I use the LAYOUTS/1033/STYLES/ location, as described in Heather’s @import technique post.
How to create a custom theme in MOSS? #07

3. Copy your theme.css file from the THEMES folder in ROOTFILES into the newly created folder in step 2
How to create a custom theme in MOSS? #02

4. Edit the theme.css file in the THEMES folder by removing al styles and replacing it by the single line:
[sourcecode language=css]@import “/_layouts/1033/styles/ExpiscornovusTheme/theme.css”;[/sourcecode]
How to create a custom theme in MOSS? #03

5. That’s it, if you build the project you get a solution file (.wsp). Next time you upgrade your theme solution you don’t have to re-apply the theme to every individual site that uses it, just press (ctrl + ) F5!

Customizing
Although this solution makes the creation and deployment of custom themes a lot easier it is still a good idea to think about customizing. Customizing a theme is still basicly editing a extensive CSS file. If you want it to look completely different from the basic MOSS look be aware this could be a hell of a job with all those elements. If you want to read more about theme customization I can recommend one resource in general: Heather Solomon’s blog. She has a lot of great articles on customizing, so definitely visit that blog.

Update 07-10-2008
Removed step 5 because the ddf & manifest files are modified during the rebuild process.

26 JulLove/hate affair

I have love/hate affairs with a lot of things. One of them is Microsoft Office Sharepoint Server. Another one is blogging. A while ago I did both. Time to give it another try.