Koen’s Weblog

SharePoint developer with a life!

Posts Tagged ‘Moss 2007’

HOWTO : Create a Site with a custom template through code and assign specific user security (User has no rights to create a site).

Posted by koenvosters on September 7, 2009

Imagine the following scenario. In your site collections visitors need to be able to create 1 type of sites. When they create that type of site (with a custom template) they need to become the administrator of that site, as well as the people maintaining the site collection.

How do we do that in SharePoint? We create a site while running with Elevated Privileges, let it inherit the rights of the Site Collection. Once the site is created, we break the inheritance and add specific user rights for that user.

First of all we will be creating a function that accepts a few strings that we need to create the site.

Code Snippet
  1. public string CreateSite(string parentSiteUrl, string siteUrlRequested, string siteTitle, string siteTemplateName)
  2.         {
  3.             return “”;
  4.         }

The parentSiteUrl is the url in which we will be creating the site, the requested siteUrlRequested is the url we will be creating the site in, the siteTitle is the title we will be giving to the site, and the siteTemplateName is the name of the Custom Template we will be using.

Ok, let’s write the code to create our site in our parentsite. In the GetCustomWebTemplates functions we will be getting the custom web template list corresponding the language of the site. In that list we take the template as specified in the parameter of our function (siteTemplateName). As we can’t be sure that the user has checked if a site url already exists we increase a counter till we find a free siteUrl (this is not mandatory, you can also raise an error on the Exists boolean).

Code Snippet
  1. string siteUrlValid = “”;
  2.                 const Int32 localeIdEnglish = 1043;
  3.                 SPSecurity.RunWithElevatedPrivileges(delegate
  4.                                                          {
  5.                     
  6.                     using (SPSite siteCollection = new SPSite(parentSiteUrl))
  7.                     {
  8.                         using (SPWeb parentWeb = siteCollection.OpenWeb())
  9.                         {
  10.                             SPWebTemplateCollection templates = siteCollection.GetCustomWebTemplates(Convert.ToUInt32(localeIdEnglish));
  11.                             SPWebTemplate siteTemplate = templates[siteTemplateName];
  12.                             int counter = 1;
  13.                             siteUrlValid = siteUrlRequested + “_” + counter;
  14.                             while (parentWeb.Webs[siteUrlValid].Exists)
  15.                             {
  16.                                 counter++;
  17.                                 siteUrlValid = siteUrlRequested + “_” + counter;
  18.                             }
  19.                             parentWeb.AllowUnsafeUpdates = true;
  20.                             using (SPWeb myWeb = parentWeb.Webs.Add(
  21.                                 siteUrlValid,
  22.                                 siteTitle,
  23.                                 siteTitle,
  24.                                 Convert.ToUInt32(localeIdEnglish),
  25.                                 siteTemplate,
  26.                                 false, false))
  27.                             {
  28.                                 
  29.                             }
  30.                             parentWeb.AllowUnsafeUpdates = false;
  31.                         }
  32.                     }
  33.                 });
  34.                 return siteUrlValid;

 

With this code our site will be created by making use of the custom template. We are running with Elevated Privileges as the user does not have any permissions to create a subsite. In the using statement of myWeb we will be adding the security changes.

Code Snippet
  1. using (SPWeb myWeb = parentWeb.Webs.Add(
  2.                                 siteUrlValid,
  3.                                 siteTitle,
  4.                                 siteTitle,
  5.                                 Convert.ToUInt32(localeIdEnglish),
  6.                                 siteTemplate,
  7.                                 false, false))
  8.                             {
  9.                                 myWeb.BreakRoleInheritance(true);
  10.                                 SPUser user = myWeb.EnsureUser(SPContext.Current.Web.CurrentUser.LoginName);
  11.                                 SPRoleDefinition def = new SPRoleDefinition(myWeb.RoleDefinitions.GetByType(SPRoleType.Contributor));
  12.                                 SPRoleAssignment assignment = new SPRoleAssignment(user.LoginName, user.Email, user.Name,
  13.                                                                                    user.Notes);
  14.                                 assignment.RoleDefinitionBindings.Add(myWeb.RoleDefinitions[def.Name]);
  15.                                 myWeb.AllowUnsafeUpdates = true;
  16.                                 myWeb.RoleAssignments.Add(assignment);
  17.                                 myWeb.Update();
  18.                                 myWeb.AllowUnsafeUpdates = false;
  19.                                 
  20.                             }

 

With BreakRoleInheritance we break the inheritance of the rules. We do this to be able to add the user to the security of that specific site. We are breaking the security afterwards because we want to make sure that the existing security on the site is copied as well. With the EnsureUser statement we make sure the user exists in that site. The SPRoleDefinition isn’t necessary, but I’m using it to make sure that my code runs on multilingual systems. You could use:

Code Snippet
  1.                                 assignment.RoleDefinitionBindings.Add(myWeb.RoleDefinitions["Contributor"]);

but in a multilingual environment that RoleDefinition isn’t called Contributor. That’s why I will first create a SPRoleDefinition object to make sure that whatever Contributor is called will return the correct name in my SPRoleAssignment. I add the roledefinition to the assignment and then I add the user/role link to the site. Once you have implemented all this your code should look like this:

Code Snippet
  1. public string CreateSite(string parentSiteUrl, string siteUrlRequested, string siteTitle, string siteTemplateName)
  2.         {
  3.             if (siteUrlRequested == null) throw new ArgumentNullException(“siteUrlRequested”);
  4.             try
  5.             {
  6.                 bool returnCondition = false;
  7.                 string siteUrlValid = “”;
  8.                 const Int32 localeIdEnglish = 1043;
  9.                 SPSecurity.RunWithElevatedPrivileges(delegate
  10.                                                          {
  11.                     int counter = 1;
  12.                     using (SPSite siteCollection = new SPSite(parentSiteUrl))
  13.                     {
  14.                         using (SPWeb parentWeb = siteCollection.OpenWeb())
  15.                         {
  16.                             SPWebTemplateCollection templates = siteCollection.GetCustomWebTemplates(Convert.ToUInt32(localeIdEnglish));
  17.                             SPWebTemplate siteTemplate = templates[siteTemplateName];
  18.                             siteUrlValid = siteUrlRequested + “_” + counter;
  19.                             while (parentWeb.Webs[siteUrlValid].Exists)
  20.                             {
  21.                                 counter++;
  22.                                 siteUrlValid = siteUrlRequested + “_” + counter;
  23.                             }
  24.                             parentWeb.AllowUnsafeUpdates = true;
  25.                             using (SPWeb myWeb = parentWeb.Webs.Add(
  26.                                 siteUrlValid,
  27.                                 siteTitle,
  28.                                 siteTitle,
  29.                                 Convert.ToUInt32(localeIdEnglish),
  30.                                 siteTemplate,
  31.                                 false, false))
  32.                             {
  33.                                 myWeb.BreakRoleInheritance(true);
  34.                                 SPUser user = myWeb.EnsureUser(SPContext.Current.Web.CurrentUser.LoginName);
  35.                                 SPRoleDefinition def = new SPRoleDefinition(myWeb.RoleDefinitions.GetByType(SPRoleType.Contributor));
  36.                                 SPRoleAssignment assignment = new SPRoleAssignment(user.LoginName, user.Email, user.Name,
  37.                                                                                    user.Notes);
  38.                                 assignment.RoleDefinitionBindings.Add(myWeb.RoleDefinitions[def.Name]);
  39.                                 myWeb.AllowUnsafeUpdates = true;
  40.                                 myWeb.RoleAssignments.Add(assignment);
  41.                                 myWeb.Update();
  42.                                 myWeb.AllowUnsafeUpdates = false;
  43.                             }
  44.                             returnCondition = true;
  45.                             parentWeb.AllowUnsafeUpdates = false;
  46.                         }
  47.                     }
  48.                 });
  49.                 if (!returnCondition)
  50.                 {
  51.                     siteUrlValid = “”;
  52.                 }
  53.                 return siteUrlValid;
  54.             }
  55.             catch (Exception)
  56.             {
  57.                 return null;
  58.             }
  59.         }

Calling the function can be done like this (Web is the SPContext.Current.Web object).

Code Snippet
  1. siteUrl = CreateSite(Web.Url, siteUrl, siteTitle, “tbtemplate.stp”);

Posted in Development, Moss 2007, SharePoint | Tagged: , , , , | Leave a Comment »

HOWTO : Get the Last ItemID in a list

Posted by koenvosters on August 20, 2009

The following code shows you how to get the last item of an ID in a list. Warning, this code gets you the last item from that list meaning that if you use this code to get the last item you added, it will go wrong if someone adds an item between you adding it and executing this query. In that case I advise you to get a unique identifier that you add to each item and get the item by that id.

Code Snippet
  1. const string siteurl = “http://sitecollection”;
  2.             using (var site = new SPSite(siteurl))
  3.             {
  4.                 using (var web = site.OpenWeb(“myweb”))
  5.                 {
  6.                     var list = web.Lists["mylist"];
  7.                     var query = new SPQuery
  8.                                     {
  9.                                         Query = “   <OrderBy> <FieldRef Name=’ID’ Ascending=’False’ /> </OrderBy>”
  10.                                     };
  11.                     var items = list.GetItems(query);
  12.                     SPListItem item;
  13.                     if (items.Count > 0)
  14.                         item = items[0];
  15.                 }
  16.             \

Posted in Development, Moss 2007, SharePoint | Tagged: , , , | Leave a Comment »

Your client does not support opening this list with Windows Explorer

Posted by koenvosters on August 17, 2009

Your client does not support opening this list with Windows Explorer is an error I see popping up a lot of times. What can you do to fix it?

If you are using IE6:
http://support.microsoft.com/kb/325355/

If you are using IE7 OR IE8
Vista, Windows Server 2003, XP : http://www.microsoft.com/downloads/details.aspx?FamilyId=17C36612-632E-4C04-9382-987622ED1D64&displaylang=en

Posted in Moss 2007, SharePoint | Tagged: , , | Leave a Comment »

HOWTO : Getting the User Properties from Active Directory with People Picker

Posted by koenvosters on August 10, 2009

A while ago I had to get additional properties from Active Directory. It was important that the information was live (I could not consider the information that got imported by the User Profile Import to be 100% up-to-date. To get this done I wrote this little piece of code (don’t forget to reference System.DirectoryServices):

private ResultPropertyCollection GetUserProperties(string userAccount)

    {

        DirectoryEntry entry = new DirectoryEntry();

        entry.Path = "LDAP://CUSTOMER";

        entry.AuthenticationType = AuthenticationTypes.Secure;

        //DirectorySearcher _searcher = new DirectorySearcher(entry);

 

        String account = userAccount.Replace(@"CUSTOMER\", "");

        try

        {

            using(HostingEnvironment.Impersonate())

            {

                        DirectorySearcher search = new DirectorySearcher(entry);

                        search.Filter = "(SAMAccountName=" + account + ")";

                        search.PropertiesToLoad.Add("department");

                        search.PropertiesToLoad.Add("mail");

                         search.PropertiesToLoad.Add("title");

                        search.PropertiesToLoad.Add("company");

                        SearchResult result = search.FindOne();

                       

                        if (result != null)

                        {

                            return result.Properties;

                        }

                        else

                        {

                            return null;

                        }

            }

        }

        catch (Exception ex)

        {

            lblResult.Text = ex.Message;

            return null;

        }

    }

Replace CUSTOMER with your DOMAIN.
I added one more function to easily get a property out of the collection:

private string GetFromUserProperties(ResultPropertyCollection _properties, string _prop)

    {

        try

        {

            if (_properties[_prop].Count > 0)

            {

                return _properties[_prop][0].ToString();

            }

            else

            {

                return "";

            }

        }catch(Exception ex){

            return "";

        }

    }

When you select a user in a People Picker it calls a postback. In the Onload event of your page handle the call of the following function

private void CheckAndFillInfo(SPWeb site)

    {

       

        if (spPELeidinggevende.ResolvedEntities.Count > 0)

        {

            PickerEntity _pe = (PickerEntity)spPELeidinggevende.ResolvedEntities[0];

            SPUser _spuser = site.EnsureUser(_pe.Key);

 

               

                ResultPropertyCollection _results = GetUserProperties(_spuser.LoginName);

                if (_results != null)

                {

                   

                    txtFunction.Text = GetFromUserProperties(_results, "title");

                }

        }

        else

        {

            txtFunction.Text = “”;

        }

    }

That should do the trick.

Posted in Development, Moss 2007, SharePoint | Tagged: , , | Leave a Comment »

Putting workflow code in a separate project (using wspbuilder)

Posted by koenvosters on August 7, 2009

As I am rebuilding one of our projects to make it easier to deploy I had to put the workflow code in one separate project. As I thought this would be a piece of cake I didn’t expect Visual Studio to show me a bunch of errors when doing so. The one that kept appearing was "The service ‘System.Workflow.ComponentModel.Compiler.ITypeProvider’ must be installed for this operation to succeed. Ensure that this service is available". After looking it up I got a bunch of different guids that I could put in my project file, but none of them seemed to do the trick. Until I checked out a WPF workflow post that told me to use some other guids and they worked fine. So, how do we start.

First of all, we will be creating a project that is called MyCustomer.MySuperSolution. We will make it a WSP Project or a class library. We will add a new item, which will be a blank feature (WSPBuilder Item). Secondly, we will be creating another WSP Project or class Library and call it MyCustomer.MySuperSolution.Workflows. We will be adding a sequential workflow feature that project. Let’s call it EmailWorkflow. As this will create it’s own solution (and that is not what we want, we want 1 wsp for the whole project) we will be making some changes. First of all, rename the feature folder that is called EmailWorkflow to MyCustomer.MySuperSolution.EmailWorkflow. That way it will have a decent naming convention in the feature folder. Move that folder to the same location in your MyCustomer.MySuperSolution project. Then delete the complete 12 folder structure from your MyCustomer.MySuperSolution.Workflows project. You can also remove the solutionid.txt file as it is no longer needed. Do not remove the snk as your assembly needs to be strong named.

Two steps remain, which are making sure that when you recompile your workflow solution that it is added to the manifest.xml by wspbuilder when you select build wsp, and to remove the dreadful errors in your workflow project. To make sure the assembly is added, right-click on your project, properties, build, output path. Point the output path to the bin/debug folder of your MyCustomer.MySuperSolution project. It is a good idea to also do that for the release configuration as many times you forget to set that up while building for release (which is then the bin/Release folder). To remove the dreadful ITypeProvider errors you need to open your project with notepad. Change your ProjectTypeGuids to:

<ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

and add the following line near the end of the file (there is already one import statement)

<Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.0\Workflow.Targets" />

If you want to target the WF of .Net Framework 3.5 just change 3.0 to 3.5

Posted in Development, Moss 2007, SharePoint | Tagged: , , , , | Leave a Comment »

HOWTO: Create an Event Handler for SharePoint(MOSS 2007)

Posted by koenvosters on July 31, 2009

As I see this question popping up on many forums, I thought it would be time to write a tutorial about it, even though there are already quite a few of them handling the subject.

Prerequisites:

How-to Create an Event Handler by making use of a feature:

To start with : what exactly is an event handler for SharePoint? It’s a piece of code that is triggered when something (an event!) happens. When that happens, our event handler can replace what is supposed to happen with our own code. How do we build that in Visual Studio (using WSP Builder)?

First of all, we will be creating a WSP Builder Project called MyEventHandler:

image

Once the project is created, we will right-click the project and select add new item. In the left column, select WSPBuilder and select Event Handler in the template list. In the name field I chose to call it DemoEventHandler.

image

You’ll get a new screen where you can define the scope of the feature. You can leave it at Web

image

After this step your project will have three additional files added to it and a few folders:

image

feature.xml: the CAML based declaration of your feature.
elements.xml: the CAML based declaration of the element(s) in your feature, which is your event handler in this case.
DemoEventHandler.cs : the code that will be overriding the existing SharePoint Event Handlers.
Let’s take a look at our feature.xml code:

<?xml version="1.0" encoding="utf-8"?>

<Feature Id="875e92bb-782c-40b4-a5a9-f55423df667e"

   Title="DemoEventHandler"

   Description="Description for DemoEventHandler"

   Version="12.0.0.0"

   Hidden="FALSE"

   Scope="Web"

   DefaultResourceFile="core"

   xmlns="http://schemas.microsoft.com/sharepoint/">

   <ElementManifests>

      <ElementManifest Location="elements.xml"/>

   </ElementManifests>

</Feature>

What this file does is identify the feature for SharePoint (Id), give it a title and description (which will be shown on the feature activation site), define a scope (where Web means site, where Site means Site Collection and then there is Web Application and Farm as possible scopes.
Another important part of the feature is the <ElementManifests> area. That area defines all the items that make part of the feature while the manifests themselves describe that specific part. As it is here the case with the event handler:

<?xml version="1.0" encoding="utf-8" ?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

   <Receivers ListTemplateId="100">

      <Receiver>

         <Name>AddingEventHandler</Name>

         <Type>ItemAdding</Type>

         <SequenceNumber>10000</SequenceNumber>

         <Assembly>MyEventHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ca176e059473d6b1</Assembly>

         <Class>MyEventHandler.DemoEventHandler</Class>

         <Data></Data>

         <Filter></Filter>

      </Receiver>

   </Receivers>

</Elements>

What is important for us? First of all the ListTemplateId. The ListTemplateId defines to which List Types the Event Handler will be targeting. The table here below shows which list types there are available in SharePoint 2007:

ID Name
100 Generic list
101 Document library
102 Survey
103 Links list
104 Announcements list
105 Contacts list
106 Events list
107 Tasks list
108 Discussion board
109 Picture library
110 Data sources
111 Site template gallery
112 User Information list
113 Web Part gallery
114 List template gallery
115 XML Form library
116 Master pages gallery
117 No-Code Workflows
118 Custom Workflow Process
119 Wiki Page library
120 Custom grid for a list
130 Data Connection library
140 Workflow History
150 Gantt Tasks list
200 Meeting Series list
201 Meeting Agenda list
202 Meeting Attendees list
204 Meeting Decisions list
207 Meeting Objectives list
210 Meeting text box
211 Meeting Things To Bring list
212 Meeting Workspace Pages list
300 Portal Sites list
301 Blog Posts list
302 Blog Comments list
303 Blog Categories list
1100 Issue tracking
1200 Administrator tasks list
2002 Personal document library
2003 Private document library

 

Once we have defined which list we are going to target we will define that we are overriding an ItemAdding event. ItemAdding means that the event will be fired right before the item is added to the list. This allows us to modify the item before it is saved to the list. The other parameters aren’t that important at the moment, apart from the Assembly and Class that will be linking to the assembly that contains the code of your event handler.

Possible events that you can override:

ItemAdded
ItemAdding
ItemAttachmentAdded
ItemAttachmentAdding
ItemAttachmentDeleted
ItemAttachmentDeleting
ItemCheckedIn
ItemCheckedOut
ItemCheckingIn
ItemCheckingOut
ItemDeleted
ItemDeleting
ItemFileConverted
ItemFileMoved
ItemFileMoving
ItemUncheckedOut
ItemUncheckingOut
ItemUpdated
ItemUpdating

Ok, so we checked out the feature.xml and the elements.xml, but there is also the DemoEventHandler.cs file. That contains the actual code of our event handler:

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.SharePoint;

 

namespace MyEventHandler

{

    class DemoEventHandler : SPItemEventReceiver

    {

      public override void ItemAdded(SPItemEventProperties properties)

      {

          base.ItemAdded(properties);

      }

 

      public override void ItemAdding(SPItemEventProperties properties)

      {

          base.ItemAdding(properties);

      }

 

      public override void ItemUpdated(SPItemEventProperties properties)

      {

          base.ItemUpdated(properties);

      }

 

      public override void ItemUpdating(SPItemEventProperties properties)

      {

          base.ItemUpdating(properties);

      }

 

    }

}

If you deploy it like this your event handler will run, but it will just call the base class and nothing special will happen. Let’s change the ItemAdding Event (as it is already defined in our CAML to be deployed). We will change the itemadding event so that it will check, when an item is being added, by making sure the CheckValue column does not contain the string “dontadd”. If it does contain dontadd, an error message is displayed and the item is NOT added to the list. To do this, we modify the ItemAdding Event to this:

public override void ItemAdding(SPItemEventProperties properties)

{

    if (properties.AfterProperties["CheckValue"].ToString() == "dontadd")

    {

        properties.ErrorMessage = string.Format("The CheckValue column equals dontadd -> item will not be added.");

        properties.Status = SPEventReceiverStatus.CancelWithError;

        properties.Cancel = true;

    }

}

A little extra explanation. The AfterProperties contain the NEW values of an item. The BeforeProperties contain the OLD values of an item in case of an update. For an ItemAdding event the BeforeProperties are empty. What we do here is check the CheckValue properties value. If it contains “dontadd” we show the error message and by making use of properties.Status = SPEventReceiverStatus.CancelWithError we cancel the base.ItemAdding(properties) call. By adding properties.Cancel = true we cancel the Itemadding event.

Ok, so now we built this, but how do we get this working on our SharePoint site? With WSPBuilder that is quite easy. Rightclick on your project, select WSPBuilder / Build WSP. This will create a solution file to be deployed on your SharePoint farm. Once that is done, select WSPBuilder / Deploy and the solution will be installed and deployed to your farm.

image  

Ok, one thing to note here is that the event handler will be targeting all lists. This means that every list that does not contain the CheckValue column will no longer work. But checking if the column exists is something that you should be able to do yourself. Once it is deployed to your SharePoint farm, create a new Custom List and Add the column CheckValue of type text. Then go to Site Settings, Site Features (NOT Site Collection Features as the scope was Web) and activate our newly deployed feature:

image

Ok, now we can test it by adding a new item with CheckValue equal to dontadd.

image

If you did everything according to plan, this is the information you should be receiving when you click ok:

image

Happy Coding!

In addition I added a few other interesting bits regarding Event Handlers

How-to Register an Event Handler through C# code:

The following code allows you to register an event handler by making use of code. RunWithElevatedPrivileges isn’t always necessary, but I added it to it so that you know that you can’t run the code in an application page as a user who doesn’t have the necessary rights.

SPSecurity.RunWithElevatedPrivileges(delegate()

{

   impersonateweb.AllowUnsafeUpdates = true;

   _spListAanwezige.EventReceivers.Add(SPEventReceiverType.ItemAdded, "Namespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=61942ef99a051977", "Namespace.EventClass");

   _impersonateweb.AllowUnsafeUpdates = false;

});

How-to see if your event handler is deployed properly to the list:

Out of the box SharePoint doesn’t display if your event handler is correctly hooked to a list. I make use of SharePoint Inspector(http://www.codeplex.com/spi) to check out my SharePoint Farm. To see if something is hooked to your list go to the following structure in your SharePoint Inspector to check out which events are registered to your list:

image

Tags van Technorati: ,,

Posted in Development, Moss 2007 | Tagged: , | 9 Comments »

Getting the values of the AfterProperties of an event

Posted by koenvosters on July 30, 2009

As I was having some troubles with a different behavior between Development and Acceptance (AfterProperties["FieldName"] was giving errors in Acceptance but not in Development) I had to figure out a way on how to display the values in the AfterProperties.  In the end, I came up with this, which requires you to add ”using System.Collections;”

foreach (DictionaryEntry de in properties.AfterProperties)
            {
                EventLog.WriteEntry(
“MOSS 2007 Test Properties”“key:” + de.Key + “- value:” + de.Value);
            
}

Posted in Development, Moss 2007 | Tagged: , , | Leave a Comment »

Removing the thousand seperator from a YEAR calculated value

Posted by koenvosters on July 30, 2009

If you wish to remove the annoying thousand seperator from a YEAR calculated column use this formula:

=TEXT(YEAR([YourDateField]);”0″)

Posted in Development, Moss 2007 | Tagged: | Leave a Comment »

Automated builds using VSeWSS 1.3

Posted by koenvosters on July 9, 2009

I stumbled upon this post from John W Powell explaining how to create a nightly build using the Visual Studio Extensions for WSS 3.0. Exteremely interesting and something I’m gonna try out later this week. Let’s hope it’s a bit easier to do so in VS 2010 with MOSS 2010 :)

Posted in Moss 2007, Team System | Tagged: , | Leave a Comment »

tech ed Developers| 2008 I’ll be there – will you?

Posted by koenvosters on October 31, 2008

And it’s time for the alltime necessary post to let you know that I’ll be attending tech ed 2008 for Developers from 10 to 14 November in Barcelona Spain. I’ll probably will be following most of the MOSS 2007 sessions there and take a look at the future as well (what is coming, what is going on). I’ve seen that quite a few partners are there as well, so it’ll be a nice time to catch up. If you are interested to meet and have a beer (in Belgium we only drink beer :) ) let me know at “digitallion connected to an @ and then Microsoft’s email service (hotmail.com). Sorry about the cryptic message but I don’t want to be flooded with spam :) See you there!

 

Koen

Posted in Moss 2007, Personal | Tagged: , | Leave a Comment »

Update Fantastic 40 released

Posted by koenvosters on October 31, 2008

Microsoft released an update to the “Fantastic 40″. The Fantastic 40 is a set of application templates for WSS 3.0. You can find them here. They include (a few examples):

  • IT Team Workspace
  • Call Center
  • Job Requisition and Interview Management
  • Change Request Management
  • Knowledge Base
  • Compliance Process Support Site
  • Lending Library
  • Contacts Management
  • Physical Asset Tracking and Management
  • Document Library and Review
  • Project Tracking Workspace
  • Enjoy!

    Posted in Moss 2007 | Tagged: | Leave a Comment »

    Setting the default Excel version for Export to Spreadsheet of Lists in MOSS 2007

    Posted by koenvosters on October 23, 2008

    Since I’m using two versions of Office at the moment, 2003 and 2007 I sometimes get updates which overwrite several settings, resulting in certain actions being opened in Exel 2003 instead of Excel 2007. One of the annoying things was the Export to Spreadsheet of SharePoint lists opening with Excel 2003 instead of Excel 2007. Smart as I thought I was, it would be the xlsx files opening with Excel 2003 (with compatibility pack) instead of opening them with Excel 2007. And yes, they were set to default opening with 2003. Problem solved. I thought :) The next export to spreadsheet resulted in opening in 2003 instead of 2007. What was the underlying problem. The iqy files (Excel Web Query Files according to my OS, although iqy stands for internet query) were set to default opening with 2003 as well. Changing that to Excel 2007 did solve my problem. Pretty straightforward to fix, but easy to miss. Hope this helps some people out there :p

    Posted in Moss 2007 | Tagged: | Leave a Comment »

    Filter Pack for Search

    Posted by koenvosters on October 22, 2008

    Microsoft released a new filter pack for Search. It will install and register IFilters with the Windows Indexing Service. It includes IFilters for the following formats: .docx, .docm, .pptx, .pptm, .xlsx, .xlsm, .xlsb, .zip, .one, .vdx, .vsd, .vss, .vst, .vdx, .vsx, and .vtx.

    Because Windows Desktop Search (WDS) consumes IFilters from Windows Indexing Service, the IFilters will be automatically registered and available for use by WDS. The following products that include search are supported:

    Posted in Moss 2007 | Tagged: | Leave a Comment »

    Linq4SP – RC1 Available

    Posted by koenvosters on October 10, 2008

    Dotneteers reports that Release Candidate 1 of Linq4SP has been released. What is it? Linq4SP is a readable-writable Linq provider to SharePoint (WSS 3.0 and MOSS 2007), with a lot of interesting and useful features: support the handling of list items, documents, folders, content types, enumerations usable for choice columns, … Basically it allows you to use LINQ on SharePoint objects. I haven’t tried it out yet, probably will this weekend, but it looks promising. Get it here.

    Posted in Development, Moss 2007 | Tagged: , | Leave a Comment »

    SharePoint whitepapers released

    Posted by koenvosters on October 10, 2008

    Microsoft published four whitepapers concerning MOSS 2007

    Office SharePoint Server 2007 Document Management Whitepaper

    Brief Description

    Microsoft delivers an integrated solution that extends document management to all employees. By recognizing that a document’s lifecycle begins the moment it is created and does not end until it is destroyed, organizations can achieve wide adoption and enforcement of enterprise standards, resulting in decreased management costs and reduced corporate risk.

    Overview

    Most large enterprises rely far too heavily on shared drives and e-mail as the primary mechanisms for storing and sharing enterprise documents. While these solutions work somewhat effectively when dealing with moderate volumes of documents, they cannot scale to meet the evolving needs of most companies. In today’s world, document volumes are growing exponentially, resulting in skyrocketing management costs and inability to find relevant information.

    Microsoft has responded to these challenges by delivering an integrated solution that extends document management to all employees. By recognizing that a document’s lifecycle begins the moment it is created and does not end until it is destroyed, organizations can achieve wide adoption and enforcement of enterprise standards, resulting in decreased management costs and reduced corporate risk.

    Office SharePoint Server 2007 Web Content Management Whitepaper

    Brief Description

    Microsoft delivers a WCM solution that combines the rich features of a traditional content management system with a unified, enterprise WCM platform—all delivered with the usability of Microsoft® Office SharePoint® Server 2007.

    Overview

    Over the last few decades, Web technologies have dramatically changed the way that companies conduct business with their customers, partners, and employees. What began as a static store for public information has become a dynamic, evolving environment for managing customer relationships, collaborating with partners, and communicating with employees. Because of the explosive growth of online channels, companies are struggling to manage Web sites and applications, especially in terms of managing content targeted for different audiences in a global environment. As the reliance on Web content has increased, so has the demand for a solution that empowers both business and IT users with the tools they need to efficiently and effectively manage multiple, complex Web sites.

    Microsoft has responded to these changes by delivering a WCM solution that combines the rich features of a traditional content management system with a unified, enterprise WCM platform—all delivered with the usability of Microsoft® Office SharePoint® Server 2007.

    Office SharePoint Server 2007 Workflow Whitepaper

    Brief Description

    Microsoft® Office SharePoint® Server 2007 Workflow solution delivers highly flexible tools like InfoPath Forms Services for data collection and workflow interaction and SharePoint® Designer for easy workflow design and customization including robust out of the box features to enable the rapid deploy solutions across the enterprise.

    Overview

    Over the last decade, business process management solutions have been gaining considerable momentum as organizations are struggling to maintain consistency and efficiency in executing their core business processes. Workflow for automating formal business processes has been built into enterprise solutions and line-of-business applications, and business process management point solutions have emerged for more comprehensive process management capabilities. Despite these advancements in business process management technologies, workflow and business process management solutions are typically used to address only a small percentage of the work that is done within an enterprise. By focusing exclusively on highly structured business processes designed by a small number of employees, organizations have historically neglected to address and enable the less formal and more iterative work that is completed by the vast majority of employees.

    Microsoft has responded to these industry challenges by providing the Microsoft® Office SharePoint® Server 2007 Workflow solution that delivers highly flexible tools like InfoPath Forms Services for data collection and workflow interaction and SharePoint® Designer for easy workflow design and customization including robust out of the box features to enable the rapid deployment and adoption of business process solutions across the enterprise. By supplementing formalized process execution with collaborative human interaction, employees can work more effectively in the context of the larger goals of the enterprise.

    Office SharePoint Server 2007 Records Management Whitepaper

    Brief Description

    Microsoft delivers a records management platform that can be extended to every information worker. By viewing retention and records management as a component of the overall document lifecycle, organizations can reduce risk and improve compliance with increased adoption of records management practices.

    Overview

    Records management is the practice of identifying, classifying, archiving, preserving, and destroying records according to a set of pre-defined standards. The primary driver behind records management solutions is to reduce risk through improved regulatory and corporate compliance.

    Microsoft delivers a records management platform that can be extended to every information worker. By viewing retention and records management as a component of the overall document lifecycle, organizations can reduce risk and improve compliance with increased adoption of records management practices.

    Posted in Moss 2007 | Tagged: | Leave a Comment »

    SharePoint and Silverlight

    Posted by koenvosters on October 10, 2008

    Kirk Allen’s blog has a very nice post regarding the hosting of a silverlight application in a web part. Definetely a must read if you want to add Silverlight to your SharePoint environment. I’ll be adding quite a lot of stuff on how to combine SharePoint and Silverlight soon and where it can actually be of value to a customer :) More on that later.

    Posted in Moss 2007, Silverlight | Tagged: , | Leave a Comment »

    Sexy Moss 2007 WCM Site launched

    Posted by koenvosters on September 26, 2008

    This is a discussion that I’ve had already quite a few times, and there isn’t a real fix answer for it. Is SharePoint the right platform to be used as an internet portal? In my opinion it is, and lately there have been quite a few sites that have proven this point (although I have no idea of the load they get). Latest nice addition to the list of sexy SharePoint sites : http://www.starz.com/ Have a look, it’s worth it.

    Posted in Moss 2007 | Tagged: | Leave a Comment »

    SharePoint Server 2007 SDK: Software Development Kit updated

    Posted by koenvosters on September 1, 2008

    Seems like I’m not the only one working hard during the holidays. Microsoft also released an updated SharePoint Server 2007 SDK: Software Development Kit. I’m not gonna put the full list of all that’s in it over here, just click the link. In short it contains a lot of how-to’s, samples, … to assist you in your SharePoint Development0

    Posted in Moss 2007 | Tagged: , | Leave a Comment »

    Moving the document store in TFS

    Posted by koenvosters on August 8, 2008

    Sorry for the recent lack of any updates, but work is just immense. Normally the holidays are a little calmer but this year it’s just insane! Anyway, on topic, Richard Fennell posted a nice article on how to move your documents from your Team System WSS environment to your MOSS2007 environment. Enjoy the read.

    Posted in Team System | Tagged: , | Leave a Comment »

    SharePoint on an iPhone

    Posted by koenvosters on July 31, 2008

    Loads of work at the office, but I couldn’t let this one slip by. SharePoint magazine has a nice article about using SharePoint on an iPhone. It’s quite an interesting read.

    Posted in Moss 2007 | Tagged: , | Leave a Comment »

    SharePoint 2007 Engineering Practices, Must Read

    Posted by koenvosters on July 28, 2008

    One of my colleagues sent me a link to a VERY NICE article about MOSS 2007 Projects. It lists a lot of lessons learned and things to consider in a SharePoint project. The only small remark I have is that if we are using Team System for our SharePoint projects, we might use the Team System Project Portal (based on WSS 3.0) instead of adding a seperate MOSS 2007 to create a project portal. I’m pretty sure (haven’t tested it though) that you can give people access to your team portal in Team System without them having to be a Licensed User.

    Posted in Moss 2007, Team System | Tagged: , | Leave a Comment »

    Moss 2007 Licensing (rant)

    Posted by koenvosters on July 28, 2008

    CMSWatch has a nice, but short and incomplete, rant about the SharePoint 2007 licensing. And it is indeed rather confusing. As the article specifies, when you have a core CAL you only have access to your MOSS 2007 Standard functionalities. So can’t you put an enterprise version of MOSS 2007 and still use your core CAL to access non Enterprise functionalities? Officially, you can’t, however there is what they call a gentlemen’s agreement where people who use the Enterprise features are using an additional CAL, while those who aren’t accessing those features are using the Core CAL. That way you don’t have to buy 5000 extra CALs if only 10 users are making use of the are using those features.

    Apart from that there is still quite a lot of different possibilities and rules that specify which license you need in which case of infrastructure (staging environment, non staging, …) Between partners we kid a lot that you need a degree to be able to figure out licensing. And in fact, it does feel that way. Therefor it’s always a good idea to check your license proposal with Microsoft to make sure that what you are proposing is correct. Even then you cannot be 100% sure, but at least you got some leverage as Microsoft proposed it themselves. During a BPIO (Bussiness Productivity Infrastructure Optimization) session which included licensing some of the questions we asked could not be answered with 100% certainty. Only after a few hours they returned with the correct licensing model. This makes licensing one point Microsoft needs to work on a lot: provide us with a tool where we can say : we have this farm, we are using these features, which SharePoint and Server licenses do we need? Mr Customer, this is what it is going to cost in licensing.

    Article: http://www.cmswatch.com/Trends/1323-Confusing-enterprise-agreements-and-enterprise-licenses-in-SharePoint?source=RSS

    Posted in Moss 2007 | Tagged: | Leave a Comment »

    Warning: SharePoint can create chaos if not used properly

    Posted by koenvosters on July 23, 2008

    As I am still facing quite a few clients who are still interested in just deploying SharePoint within their organisation without thinking upfront about the why, the what, the who, the where and the when, articles like the one on InfoWorld make my life a little bit easier, as with a bit of luck they end up reading it as well :-) . SharePoint is a great product, it does support an insane amount of features, it is a nice platform to build applications on, but it is not the magical product that will solve all your problems. I like to compare it with a nice room, with a television, lots of drawers to organize your clothes, cd’s, dvd,’s and what not. Having a nice room like that is great, and you can do lots of things in it. But you can also make a complete mess of the room, no matter how nice it was when you first “deployed” it. So define a strategy, define WHY you want to use SharePoint, which problems it will solve and where these solutions fit in the bigger picture. If you are doing a pilot, preferably by starting with one division/audience, make sure you have an idea upfront how it fits in the bigger picture, and scope it. Or your pilot will become production, you will get more and more requests as other divisions hear about what is going on, and you’ll end up with an environment that is unmanageable. Another nice read on this topic are the series : Why do SharePoint Projects fail?

    Posted in Moss 2007 | Tagged: | Leave a Comment »

    Moss 2007 : Parametric Search

    Posted by koenvosters on July 17, 2008

    BA-Insight has published a demo of their parametric search solution called Parametric Search for SharePoint and Search Server. Compared to the normal keyword search and basic parametric search within Moss 2007 it adds a few extra bells and whistles to enrich the user search experience. In the specific example (Northwind Database) it shows the number of hits you will receive when you change a certain metadata property. These metadata types can be linked as well so that selecting one property will change the avaiable choices of another property. Good stuff! The demo can be seen here.

    Posted in Moss 2007 | Tagged: , , | Leave a Comment »

    Publishing your PowerPoint presentation to a slides library

    Posted by koenvosters on July 14, 2008

    As a result of the heavy workload of my colleagues and myself, we decided to make use of the slide library built in Moss 2007 to prepare our team presentation instead of having the Powerpoint somewhere in our Moss 2007 environment as a single document. We created a document workspace, added a slide library to it, opened up PowerPoint 2007 and selected Publish to publish our PowerPoint presentation as a slide library. There was no option available to publish it! I checked to make sure that I had the Professional version of Office 2007 on my laptop. I did. After some reseach, and doublechecking Microsoft’s post about publishing slides I figured I did nothing wrong. When going thorugh Patrick Luca’s Blog I found out that even in the Professional version of PowerPoint 2007 you are unable to do so. Only Microsoft Office Professional Plus, Enterprise and Ultimate support this feature. Keep this in mind when talking to clients about this feature, as it might imply a complete rollout of a new Office version (which you probably did not foresee in your initial scope)

    Posted in Moss 2007 | Tagged: , , | Leave a Comment »