It may take some time before we can see the first of SharePoint 15 (or some might say SharePoint 2013).

Till that time, Microsoft has released some technical documentation in the form of an API. It’s far from complete, I hope, but it gives us a bit insight in the new features of the new SharePoint.

There are a few interesting features that we can trace from this API. You can find the API here http://www.microsoft.com/download/en/details.aspx?id=28768. But for the one that’s too lazy to disassemble the API himself, beneath is a summary of expected features.

Game changing features

Apps

In the API there’s one feature that has the upper hand, the Apps. It’s also very certain that a marketplace is coming.  There will not only be a general marketplace, but it will also be possible to have a corporate catalog (apps only available within the corporate).

These new SharePoint Apps are not just web parts, or any other kind of SharePoint solution we know from the current versions of SharePoint. An App is a new solution format that comes with SharePoint 15. A few advantages of Apps, we know so far, are:
– It’s very suitable for a traditional application structure, with multiple pages, theming, configuration, an own database, etc.
– developers can add an own deployment (installation, upgrade, uninstall, etc.)
– a database (MSSQL, and other formats) can be attached
– it has its own user permissions
– it has its own licensing

This is a big step for Microsoft, but also very understandable. Nowadays it seems that the entire society is relying on apps and marketplaces from all kinds of vendors. Microsoft already Marketplaced the Windows Phone, Windows 8 is coming, but they would be stupid if they didn’t also do this for SharePoint. With the Windows Phone Marketplace they were relatively late, but with the SharePoint Marketplace they are just on time.  Using Marketplaces for business purposes is very hot at the moment. I can’t wait to get to work with this.

MDS

Minimal Download Strategy is a term that probably doesn’t ring any bells. That’s right, it’s a new framework Microsoft includes in the next SharePoint. It’s mentioned very briefly in the API but I think it’s a big deal.

So, what is it? MDS allows websites to take much less bandwidth than with traditional technologies. It’s a technology that allows websites to only send the changed part of the page, relative to the previous page, to the client. If you assume that a website has a header, footer, menu, right column and some content, and navigating to another page only changes the content part, then MDS will take care that only the content will be transferred from the server to the client. This way, not only the bandwidth is used more efficiently, but the pages will be more responsive.

For more info on MDS read this: http://blog.furuknap.net/minimal-download-strategy-in-sharepoint-2013

Other features

More versioning

We know we can version documents and list items, but in the next SharePoint we are also able to version entire parts of SharePoint. An entire site for instance. Fascinating! But whats the big advantage? Well, here it comes. Let’s assume that we already have a site and we would like to make big changes to it, how will we do that? In the current SharePoint we would have to copy the site (preferable to another environment), implement changes and deploy it back. While in SharePoint 15 we could freeze the active version, then create a new version, implement changes to that new version and when done, set the active version to the new site we changed. My guess is that Microsoft did add this feature mainly for SharePoint Online, because most clients don’t have a separate acceptance environment. Deploying this way fits perfectly in a DTAP roadmap for Cloud solutions.

Themes

As a developer you can now get a themed version of your CSS that uses the theme colors and styles, with a simple line of code.

Client Object Model

The Client Object Model is extended with Search. The functionality corresponds to that of Microsoft.Office.Server.Search we know from the current SharePoint Object Model.

Features nobody gives a sh*t about

I also found several new features that probably won’t interest a living soul. But because I do want to mention it, I will make a short notice of their presence:

– It will be possible to get more info about crawled contents and status of crawls, programatically.
– Users can now edit a file if it’s exclusively locked by someone else and likely merge it later.
– To get files from BLOB, SharePoint now has streams.
– In the current Client Object Model you would have to add a Form Digest control to be able to talk to SharePoint. In the next version that isn’t necessary anymore, it then can be configured on the ClientContext.

Windows 8 Consumer Preview

February 29th, 2012 | Posted by Jeffrey Paarhuis in Good to know - (0 Comments)

Whoohoo, the Windows 8 Consumer Preview (Some kind of beta) is available

Here is the auto-installer (if you want to upgrade your current OS)
http://windows.microsoft.com/en-US/windows-8/download

Here are the ISO’s (if you want a fresh install or install on a VM)
http://windows.microsoft.com/en-US/windows-8/iso

Have fun with it!

My Story

By default, it’s only possible to sort on relevance and modified date in the Core Results Web Part. And it also isn’t possible to give a sorting direction, it’s always descending.

Now a client wanted to show the last created discussions on the homepage of it’s SharePoint, off course sorted by creation date. Out of the box this isn’t possible, but luckily somebody else had the same problem and came with a neat solution: http://www.insidesharepoint.net/post/2011/02/16/Creating-a-sortable-CoreResultsWebPart-in-SharePoint-2010.aspx

I played around a bit with that code, but couldn’t get it to work. The most common error I got was Property doesn’t exist or is used in a manner inconsistent with schema settings.

At this time of writing my expertise in the SharePoint Search maze isn’t that great, but I read something about a Managed Metadata Properties in the blog post. After playing around with custom managed properties for a while I finally got it to work. The trick is to create a custom Managed Property with mappings to, in my case, Basic:15;ows_start_x0020_Date,Office:12;creationdate and do a full crawl. Important! Do not do an incremental crawl! That will definitely not work! I cracked my head on that one already!

And then it works!

You could also forget the story above and follow the instructions beneath

These are the steps I took to work out my case, which is sorting Team Discussions by Creation Date.

First I created a scope named Discussions with a rule contentclass = STS_ListItem_DiscussionBoard.

Then I created a Managed Metadata Property named Created with a few mappings and settings like below.

Next thing to do is to start a full crawl. No incremental, that won’t work!

Now we can create our own Web Part. Create a new Visual Studio 2010 project, call it SortableCoreResultsWebPart. Add a reference to Microsoft.Office.Server.Search and add a new Web Part to the project, no Visual Web Part, just a regular. Name it SortableCoreResultsWebPart.

Open the SortableCoreResults.cs and overwrite the code with the following code.

    public class SortableCoreResultsWebPart : CoreResultsWebPart
    {
        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(true)]
        [WebDescription("Sort by this managed property")]
        [Category("MyProperties")]
        public string OrderByProperty { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(true)]
        [WebDescription("Sort direction")]
        [Category("MyProperties")]
        public Microsoft.Office.Server.Search.Query.SortDirection SortDirection { get; set; }

        /// <summary>
        /// Override. First runs the base code, than collects the CoreResultsDatasource and
        /// sets the SortOrder property.
        /// </summary>
        protected override void ConfigureDataSourceProperties()
        {
            // only do stuff when search results are visible
            if (this.ShowSearchResults)
            {
                // run the base code
                base.ConfigureDataSourceProperties();
                try
                {
                    // if OrderByProperty is not set, use default behaviour
                    if (!string.IsNullOrEmpty(OrderByProperty))
                    {
                        // get the datasource and change the sortorder
                        CoreResultsDatasource dataSource = this.DataSource as CoreResultsDatasource;
                        dataSource.SortOrder.Clear();
                        dataSource.SortOrder.Add(OrderByProperty, SortDirection);
                    }
                }
                catch (Exception)
                {
                    // handle this error! and show a friendly error message
                }
            }
        }
    }

Don’t forget to add an using for Microsoft.Office.Server.Search.WebControls.

Run the thing and add the Web Part to the page. An error will pop up saying SrhdcNoKeywordException was unhandled, skip it by pressing F5 or clicking continue a couple of times.

Edit the Web Part, open the Location Properties and modify the scope to Discussions. Open Result Query Options and modify Fixed Keyword Query to contentclass:STS_ListItem_DiscussionBoard. Finally fill the OrderByProperty with Created and set a SortDirection.

 Save and refresh the page. Watch your web part sort like Dustin Hoffman in Rain Man!

For .NET

Resharper (free-to-try, €131)

Resharper is an extension for, in general, intellisense. It’s very powerfull in different ways. E.g. it checks your code for compiling issues on-the-fly and giving possible options to resolve it automatically.

download:
http://www.jetbrains.com/resharper/download/index.html

BugAid (free-to-try, $49)

BugAid is an extension for the variable watcher in debug-mode. Convince yourself with this video http://youtu.be/0GuAq76-D-s.

download:
http://www.bugaidsoftware.com/

For SharePoint

CKS: Development Tools Edition (free)

This project extends the Visual Studio 2010 SharePoint project system with advanced templates and tools.  Using these extensions you will be able to find relevant information from your SharePoint environments without leaving Visual Studio.

download:
http://cksdev.codeplex.com/

Visual Studio 2010 SharePoint Power Tools (free)

Also extends Visual Studio 2010 with templates and tools, especially focussed on sandboxed solutions.

download:
http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9

People get lazier every day. I guess it’s some kind of evolution. A few thousand years ago we used to make our own tools. We had to go out into the woods to hunt for a meal,  and with a bit of luck we had a piece of meat at night. Nowadays we drive to work, bang on the keyboard for 8 hours, drive back, and at home a not too scanty meal magically appears on the table. Did we hunt for that? Did we make our own car? Did we make our own PC? Did we even make our own OS? We didn’t even sweat! In the history of mankind someone apparently was smart enough to not kill the caught animal, but let it jump on top of a female of the same kind, and then wait for the beef to spawn on his plate. People get smarter, so they can be lazier. Evolution.

Now back to SharePoint. SharePoint is the perfect platform for the current generation of people. We can find all of our documents, tasks and emails in one place. People even expect one overview for content spread across multiple sites. To achieve this kind of content aggregation, SharePoint 2010 has a few tools available.

In the latest SharePoint eMagazine of the DIWUG (Dutch Information Workers User Group) Brett Lonsdale writes about the multiple tools SharePoint has, that can achieve content aggregation over multiple lists, sites, site collections and even farms. I would really recommend reading the article, but for the lazy (or more evolved) readers, here is a summary.

  • Content by Query Web Part – This is part of the Publishing Infrastructure Feature. It allows you to aggregate content from lists of the entire site collection. This can be done by simple clicking and selecting. This also applies to filtering, grouping and sorting. Out of the box there are multiple styles available, but you can also create your own style by copy and modify a XSL in the Style Library.
    The CQWP is a very powerful tool for content in one site collection. It won’t work with multiple site-collections.
  • Relevant Documents Web Part – This is a very simple web part which doesn’t allow much configuring. You can show your last modified documents, or the documents you created, but it doesn’t get more exciting than that. Oh, and you have to keep in mind that it’s only for the current site, not for the site collection.
  • RSS Feed Web Part – The RSS Feed web part can show the RSS feed of a SharePoint List. If you are using Kerberos you can get the RSS feed of a list in the web part. This is useful across site collections.
  • Data View Web Part – This web part can be found in every SharePoint 2010 version, even foundation. The RSS feed can also be used in this web part. Even more, multiple RSS feeds can be merged, talking about content aggregation. In SharePoint designer there is even more available with this web part. Data sources can be web services, databases, xml, etc.
  • Core Search Results Web Part – This web part is useful when you want to aggregate content of multiple site collections. This can be done by configure a search scope with properties and rules in central admin. One big disadvantage is that the content is as up to date as the latest crawl.
  • Calendar Overlays – In a SharePoint calendar you can get an overlay using the Calendar Overlays button on the ribbon. This function is pretty straightforward.
The Content Query Web Part is a very powerful OOTB tool for content aggregation. If you want even more then use the Data View Web Part in combination with SharePoint Designer.

In my previous post on how to design and deploy a custom SharePoint master page I explained how to create an own branded master page and how to deploy that master page to your SharePoint site. Now I first stumbled upon the problem that the master page doesn’t get automatically applied to newly created (sub)sites, and secondly I received a comment from a reader describing the exact same problem. So I decided to write my findings and solution to the open world. Here it is.

The problem is very simple: You create your own master page, you apply your master page to all sites and it does that, nice, but when you create a new site you just get the old v4.master on that site and not your custom master page. Everyone with this problem, if you followed my previous post or not, can follow this solution. It doesn’t even matter what SharePoint version you’re using.

When I Googled for a bit, I found out that there is no out-of-the-box-solution for this and a lot of guys use Visual Studio to solve this. You could program an event receiver that sets your master page to every new site. Or you could program a Feature that holds your master page and apply that feature to a site definition. But I find that a bit heavy and not very flexible solution. So I played around a bit and found a solution myself without the use of Visual Studio or programming at all.

Here we go:

You should have your master page deployed to the main sites master pages gallery. You should see your masterpage when going to http:///_catalogs/masterpage/Forms/AllItems.aspx

(Yes I’m using Chrome)

Now create a new blank Team Site using whatever name you like (you won’t see it in the end).

Now go to Site Settings and click “Save site as template” under Site Actions and go save the site as a template.

On the next screen click on the link to go to the solution gallery. In the solution gallery just click on the name of your just created template to download it. Save it somewhere where you can easily find it.

Did you know that as WSP is in fact just a CAB file? That’s why we need a tool that can extract and recreate our wsp. I used the tool ACDZip, which has a free x-days trial. You can get it here http://acdzip.findmysoft.com/. A reader has also mentioned the tool IZArc, which is free. A great alternative.

Now find your file and rename it from TemplateWithoutMyMasterPage.wsp to TemplateWithoutMyMasterPage.cab, you should see your icon change.

Open the file with ACDZip and extract the ONet.xml file from theWebTemplateONet.xml to a location where you can edit it easily.

 

Now edit the following line of code

masterpage/v4.master" ThemedCssFolderUrl="">

to

<Configuration ID="0" Name="Default" MasterUrl="/_catalogs/masterpage/mymaster.master" ThemedCssFolderUrl="">

Don’t forget the slash before _catalogs. This will ensure that the mymaster.master from the master page gallery on the root of the site gets used.

Save the file and put it back in the archive (drag and drop), it will automatically rebuild the archive. Rename the file back to a wsp file, I also used another file name.

Upload the file into the Solution Gallery by using the Upload Solution button on the ribbon of Solutions.

 

In the next screen you must upgrade the solution.

You can now use the new template to create a site with your masterpage. Go ahead and try. Site Actions, New Site, scroll down and select the template, fill in a title and url and create the site.

You should now have your master page automatically applied.

Ok, another day, another problem!

I did create a few usercontrols which work together quite nicely. And after I wrapped an updatepanel around them, the ajax seems to work just fine.

However, once a validator inside the panel gets triggered the whole page freezes and it looks like javascript isn’t working anymore. I googled (cause bing just sucks) the problem and found very less about this problem, so when I finally found a solution I decided to share it with all of you having the same problem.

This is the problem:

When a validator is loaded on the page it creates a bit of javascript to support the clientside validation. When you place a validator inside an usercontrol that isn´t visible by default, and this usercontrol is in an updatepanel, it does not create that javascript properly.

This is the solution:

Outside the updatepanel, I did above, create a dummy validator with a dummy textbox using a dummy validationgroup like so:

<%--dummy validator to make ajax validation possible--%>
<asp:RequiredFieldValidator runat="server" CssClass="hidden" ControlToValidate="dummyTextBox" ValidationGroup="dummy"></asp:RequiredFieldValidator>
<asp:TextBox runat="server" ID="dummyTextBox" CssClass="hidden"></asp:TextBox>

The CssClass “hidden” corresponds with the following CSS:

<style>
.hidden {
  display: none;
}
</style>

As you already might understand, the dummy validator now creates the proper javascript that the other ‘real’ validators can use.

Hope this also works for you. Also if you found another, maybe neater solution, please inform me…

You ever wanted to show external data in SharePoint? Do Arabs fart in the desert? Does Apple charge 200 dollars extra for a different color macbook?

Of course you want to show external data in SharePoint. But it isn’t as easy as it seems to achieve this. There are a few methods and every methods has it’s pro’s and con’s.

According to Microsoft the best method, and every SharePoint guru will agree, is Business Connectivity Services. This method is great for creating a seamless connection between SharePoint and your external data. It however has the big disadvantage that BCS can only be used in conjuction with the external list, and external lists cannot have additional columns. This means that a calculated column needs to be custom developed in the BCS model, which in turn means that it needs to be compiled, tested, deployed, etc. And this is pretty stupid because SharePoint has calculated columns out of the box with a custom list. Now, I´ve tried to get that BCS data into a custom list, but with no success. So then I started looking for a way without BCS and use SQL Server Integration Services(SSIS) instead. After googling for a while I found exactly what I was looking for.

http://fsugeiger.blogspot.com/2010/01/synchronise-sql-table-with-sharepoint.html

This solution can synchronize a database with a custom list. It however is one-way, so customized data in the list doesn’t get back into the database. But because it’s a custom list we can use calculated and other additional columns.

Prerequisites for this SSIS solution.
You need to have SQL Server Standard or higher with Integration Services enabled and Business Intelligence Studio installed.
Then you need the following plugin for the SharePoint list source and destination.
http://msdn.microsoft.com/en-us/library/dd365137(v=sql.100).aspx

Handy SharePoint Tools

April 7th, 2011 | Posted by Jeffrey Paarhuis in Good to know - (0 Comments)

Auto SharePoint installer

Contains lots of OOTB scripts. Simple XML input file. Create a near-unattended install.

http://autospinstaller.codeplex.com/

Bulk document import

Copy an old-fashioned file share to a SharePoint document library.

http://spbulkdocumentimport.codeplex.com/

Hide the ribbon

Hide all unnecessary menu items, buttons and links for the normal user. Conditions can be set for specific groups.

http://spribbonvisibility.codeplex.com/

Sharepoint and games?

A fully integrated Chess-game.

http://ribbonutils.codeplex.com/

Sharepoint and Social Networking?

Integrate your favorite Social Network sites within SharePoint

http://socialsharepoint.codeplex.com/

I know, Sharepoint 2007 is pretty old. However, this week a client wanted FBA for his WSS 3 environment, so no problemo for the Sharepoint pro. I haven’t done a FBA config for Sharepoint 2007 before, so I did a bit of googling and couldn’t find a very explaining article that covers the whole configuration. There were a few handy sites, including the MSDN, which helped me out getting what I needed.

Further on it will be explained in detail, but here is a summary already:

  • ASP.NET membership database (aspnet_regsql.exe)
  • Extended web application with zone internet
  • Edit web.config of the default web application and the extended web application
  • Install http://fba.codeplex.com/ wsp

Install ASP.NET membership database

Run the tool aspnet_regsql.exe at C:WindowsMicrosoft.NETFrameworkv2.0.50727

Choose the option to configure SQL Server for application services.

Choose the name of the database server in the server field. Choose Windows authentication and type a database name in the Database dropdown field. In this case we creat a database with the name fbadb.

Click next and Finish to complete the creation of the membership database.

Set the right SQL permissions

Because we wan´t to use integrated security with the connection we need to give the application pool identity the appropriate permissions on the membership database. First of all we need to know what the application pool identity is. For that you can go to the IIS Manager and select the Sharepoint site.

Click Advanced Settings… and note the Application Pool

Then click on Application Pools and select the noted application pool

Click Advanced Settings … and note the identity, in our case this is the Network Service

Now, go to SQL management studio and give that user the db_owner permissions on the FBA database we just created.

Extended web application with zone internet

Open Central Administration. Go to Create or extend web application in Application Management and click Extend an existing web application. In web application select the web application you wish to create FBA for.

However we are extending a web application, we need to create a new IIS web site so leave that option on.
I want to  create a subsite for the FBA authentication, so I did set the port back to port 80 and set the host header to extranet.mydomain.com

Allow anonymous authentication and here you can also choose to use SSL or not. I choose not to use SSL. The last thing to do is to set the zone to Internet.

You can go to the url of the extended web application to check if the configuration works.

Last thing to do is to enable FBA on the extended web application. Go back to Central Administration and then click Authentication providers under Application Security. Then click on the Internet zone.

In this screen select the Forms authentication type. Two new fields appear: Membership provider name and Role manager name. This are the names of the membership and role provider we are going to configure in the next step. I’m using FBA for Membership provider name and FBARole for the role manager name.

Click Save and all central admin settings are set.

Edit web.config of the default web application and the extended web application

Next thing to do is to add a few items to the web.config of the web application and the extended web application:

  • Peoplepicker wilcard for FBA
  • Connectionstring for the FBA Database
  • Membership provider for FBA Users
  • Role manager for FBA Roles

Go to the web.config of the web application (not the extended web application) and search for the </sharepoint> closing tag and the <system.web> starting tag; they should be next to eachother.

Just above </SharePoint> you find the following piece of code:

<PeoplePickerWildcards>      
  <clear />      
  <add key="AspNetSqlMembershipProvider" value="%" />      
</PeoplePickerWildcards>
replace this with the next code:
<PeoplePickerWildcards>      
  <clear />      
  <add key="AspNetSqlMembershipProvider" value="%" />      
  <add key="FBA" value="%" />    
</PeoplePickerWildcards>

Now add a new ConnectionString section between the </sharepoint> and <system.web> tags:

<connectionStrings>    
  <add name="fbaSQL" connectionString="server=localhost;database=fbadb;Trusted_Connection=true" />  
</connectionStrings>

Because I run the database and Sharepoint on the same server I’m using localhost. If you are using a different database server you need to replace localhost with the database server name or ip here, pretty obvious.

Last thing to do is to add a membership and role section in the <system.web> tag. Add the following piece of code just below <system.web> and above <securityPolicy>:

<membership defaultProvider="FBA">      
  <providers>        
    <add connectionStringName="fbaSQL" applicationName="/" name="FBA" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"            
      enablePasswordRetrieval="false"            
      enablePasswordReset="true"            
      requiresQuestionAndAnswer="false"            
      requiresUniqueEmail="true"            
      minRequiredPasswordLength="5"            
      minRequiredNonalphanumericCharacters="0"            
      passwordFormat="Hashed" />      
  </providers>    
</membership>    
<roleManager enabled="true" defaultProvider="FBARole">      
  <providers>        
    <add connectionStringName="fbaSQL" applicationName="/" name="FBARole" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>      
  </providers>    
</roleManager>

This web.config is done. Now do the same for the web.config of the extended web application.

Install http://fba.codeplex.com/ wsp

Download FBAManagement.wsp and Deploy.cmd from http://fba.codeplex.com/releases/view/2986 and save both files into the same folder. We need to edit some values in the Deploy.cmd so once downloaded go to the folder and rightclick Deploy.cmd and click edit. Now replace both http://aspnet with http://<yoursharepointsite>. Also remove the bin from “stsadm -o addsolution -filename binFBAManagement.wsp” so it reads only “stsadm -o addsolution -filename FBAManagement.wsp”. The code should look like this:

@echo Deploying FBAManagement solution

@set PATH=C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN;%PATH%

stsadm -o deactivatefeature -name FBAUserRoleManagement -url http://mysharepoint -force
stsadm -o deactivatefeature -name FBAConfigurationManagement -force

stsadm -o retractsolution -name FBAManagement.wsp -immediate
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name FBAManagement.wsp -override
stsadm -o execadmsvcjobs

stsadm -o addsolution -filename FBAManagement.wsp
stsadm -o execadmsvcjobs

stsadm -o deploysolution -name FBAManagement.wsp -immediate -allowgacdeployment
stsadm -o execadmsvcjobs

stsadm -o activatefeature -name FBAConfigurationManagement
stsadm -o activatefeature -name FBAUserRoleManagement -url http://mysharepoint
stsadm -o execadmsvcjobs

Save the file and execute it as administrator. Don’t be scared with the file not found and solution not found messages for the first few lines, because thats entirely normal.

Result

All configuration is done. Go to the site settings of the sitecollection. Under site collection administration you find two new links. With Manage FBA Users you can add and edit users and with Manage FBA Roles you can add and edit roles, which is pretty straightforward.

To test FBA you can add a user and give the user some permissions by adding it to the Team Site Members group. Now, login with the user on the extended web application and see the result.