Tuesday, April 29, 2008

MOSS Search feature: definition extraction

Recently I discovered an interesting new feature within MOSS Search (Apparently this guy had the same experience - What people are saying - definition extraction) Take a look at the last search result in the next screenshot ...



 

So how does this work - I only found a couple of online references. But the most complete one was listed in the MSDN forums - Discovered definitions/What people are saying about ...

The Definition Extraction feature finds definitions for candidate terms and identifies acronyms and their expansions by examining the grammatical structure of sentences that have been indexed (for example, NASA, radar, modem, and so on). It is only available for English. Definition extraction feature in MOSS 2007 is a feature that extracts mening of definition from indexed text. User enters a search query “X”, search  returns from the document index a ranked list of sentences containing definitions of “X”, such as “X is Y” with links to the documents in which the definitions were found. In MOSS, implementation definitions are extracted from free text rather than from glossaries.

Definition Extraction feature is integrated with Search Feature at Crawl/Indexing and Query times. During the crawl, tokens with alternate definitions are added to search database . At query time passed search token is compared with existing entry in definitions database. If a match is found the definitions link is populated at the bottom of the search results page. Collapsing the link shows number of definitions.

It’s a default setting and cannot be customized. You can turn off Definition Extraction by Editing the Search Centre results page in question, Modifying the Search Core Results web part, and turning off ‘Display Discovered Definition’.

Unfortunately, the white paper about Plan for building multilingual solutions seems to confirm the fact that definition extraction only seems to work for English.


Monday, April 28, 2008

Realdolmen blog ...

First time that I see this http://realdolmen.wordpress.com/ ... this is actually the new company I will be working for after www.dolmen.be and www.realsoftware.be are merged ...

Tags van Technorati: ,,,

Thursday, April 24, 2008

What is net stop sens all about?

I blogged about this before - if you have issues with some Office client-MOSS integration  within a VPC you should try net stop sens. But what does it do behind the scenes?

Apparently it stops the System Event Notification service which is tracks system events such as Windows logon, network, and power events.  It will also notify COM+ Event System subscribers of these events (such as a lot of client apps) in a real world distributed environment. Off course when you are not on a network it is kind of useless and more of hassle as you may have noticed.

Sunday, April 20, 2008

Interesting reads and resources about SharePoint, intranets, portal steering committees, etc ...

Tuesday, April 15, 2008

Arrived at MVP Summit and MOSS Analytics Extensions featured on The System Spotlight episode 5

After an unforeseen stay in Amsterdam (the flight was overbooked), I finally arrived in Seattle for the MVP Summit...unfortunately one day later then expected.

On another note - Michael Ganotti talks about my previous blogpost - Extending Usage Analysis Reporting in MOSS 2007 in his The System Spotlight Episode 5 (Thanks, Michael). Don't forget to check out the code at http://www.codeplex.com/sharepointextensions

Sunday, April 13, 2008

Extending Usage Analysis Reporting in MOSS 2007

You probably have seen the nicely looking Usage Analysis pages in MOSS which display different types of info using Reporting Services reports.

If you want to explore how these are implemented you might want to take a look at these two PDFs of ASP.NET Pro articles which were written by Matt Ranlett and Brendon Schwartz (For more info  about them check out their blogs at Atlanta .NET Regular Guys):

  • Part I: explains about the fundamentals about the Search Usage Analysis reporting (see p. 6 to 14)
  • Part II: shows how to implement a custom control to display top search terms. (see p. 38 to 43)

I started with the info in these articles and took it a little bit further.

There are a number of application pages (pages which you find in the _layouts directory) which show usage analysis data - for this example I will only focus on the one you find in the SSP about search queries, SPUsageSspSearchQueries.aspx .

You will probably notice that these pages implement classes which are found in the Microsoft.SharePoint.Portal.Analytics.UI namespace (The SDK states that the classes in the Microsoft.SharePoint.Portal.Analytics namespace are intended for internal use only, ... nothing found about the UI subnamespace though).

Let's take a look at the server controls on the Search Queries page (at SSP level):

  • QueriesByDayReportControl: queries over previous 30 days
  • QueriesByMonthReportControl: queries over previous 12 months
  • TopSiteCollectionsReportControl: top query origin site collections over previous 30 days
  • QueriesByScopeReportControl: queries per scope over previous 30 days
  • SspTopQueriesReportControl: top queries over previous 30 days

When you take a look at the code for the SspTopQueriesReportControl in the Microsoft.SharePoint.Portal.dll with Reflector, you will notice that it inherits from TopQueriesReportControl which in itself inherits from QueryTopLargeListReportControl. The QueryTopLargeListReportControl uses an RDLC file (compact Reporting Services report definition file - take a look at converting RDL and RDLC files) and the data is retrieved using a stored procedure, proc_MSS_QLog_TopQueries.

It is possible to build a component which derives from QueryTopLargeListReportControl and use this component to expose the data which is retrieved from the database - you will need to follow these steps to do this:

  • Create a new custom class which inherits from QueryTopLargeListReportControl
namespace SharePoint.Extensions.MOSSAnalytics
{
public class GetTopQueries : QueryTopLargeListReportControl
{


...
}
}




  • You need to implement the two properties RdlFileName (you can leave this blank) and StoredProcedureName.



protected override string RdlFileName
{
get { throw new NotImplementedException(); }
}

protected override string StoredProcedureName
{
get { return "proc_MSS_QLog_TopQueries"; }
}




  • Add 2 additional properties which are used by the control TitleText and StoredProcedureParameters. You can override some of the parameters in your own class such as the TopResultsCount which is default set to 300.



protected override string TitleText
{
get {return "GetTopQueriesControl";}
}

protected override Collection<SqlParameter> StoredProcedureParameters
{
get
{
Collection<SqlParameter> storedProcedureParameters = new Collection<SqlParameter>();
Guid guid = SPControl.GetContextSite(this.Context).ID;
storedProcedureParameters.Add(new SqlParameter("@siteGuid", guid));
storedProcedureParameters.Add(new SqlParameter("@isSspLevel", this.IsSspLevel));
storedProcedureParameters.Add(new SqlParameter("@topResultsCount", this.TopResultsCount));
return storedProcedureParameters;
}
}




  • Create a new method GetData which calls into the inherited method LoadReportData which returns a Datatable.



Now your custom component is created and ready to be used in your own webparts. The full source code is available on Codeplex in my newly created SharePoint Extensions project - http://www.codeplex.com/sharepointextensions . The project is created using Visual Studio 2008 and the structure is structured in such a fashion so that you can use WSPBuilder to build a SharePoint Solution file.



Wednesday, April 09, 2008

SharePoint Workflow History Cleanup jobs ...

When I first saw this post - Huge MOSS workflow issue ... What is Microsoft thinking!!! - I was shocked. But fortunately the soup is not eaten as hot as it's cooked ...

There is indeed a timer job  (Check SharePoint Central Admin > Operations > Timer Job Definitions) which removes the link between the item on which a workflow has run and the entries in the workflow history list. This means that the info in a workflow history list will not be complete anymore after a certain period of time (default 60 days).

Luckily Robert Bogue gave some more background information in SPWorkflowAssociation.AutoCleanupdays as well as some workarounds:

  • Purging of this list is done using a SharePoint timer job - if you build your own custom workflows you can change the setting by modifying workflow.xml in the features folder like this

    <Elements>

        <Workflow>

          <MetaData>

              <AutoCleanupDays>99999</AutoCleanupDays>

          </MetaData>

       </Workflow>

    </Elements>

  • You can modify this setting using the SharePoint object model - as Robert's postings suggest take a look at the SPWorkflowAssociation.AutoCleanupdays property. Take a look at the next code sample
  • using (SPSite sitecollection = new SPSite("http://moss:99"))
    {
    using(SPWeb site = sitecollection.OpenWeb("/demo")){
    SPWorkflowAssociation _assoc = null;
    SPList list = site.Lists["Shared documents"];
    foreach (SPWorkflowAssociation assoc in list.WorkflowAssociations)
    {
    if (assoc.Name == "WFDemo")
    {
    _assoc = assoc;
    _assoc.AutoCleanupDays = 2;
    }
    }
    list.UpdateWorkflowAssociation(_assoc);
    list.Update();
    }
    }



 



Monday, April 07, 2008

Integrate SharePoint Search into Office clients using the Research task pane

This is something which I used to demo a lot when doing SharePoint Portal Server 2003 search demos (with Office 2003) and it still works with SharePoint 2007.

Starting from Office 2003 you have a research task pane in Office which allows you to search for information in a number of references (See How to Research Office training section) such as an English thesaurues, Encarta, etc ...

You can however easily integrate SharePoint search into this same research task pane. Just click Research Options > Add Services and next add a the URL to the search webservice of your SharePoint Server ... this will look something like this http://[servername]/_vti_bin/search.asmx.

The only thing which is a little different in Office 2007 is how you can access the research task pane:

  • Word 2007, Excel 2007 and Powerpoint 2007:  take a look at the Review tab - here you will see the Research option
  • Outlook 2007: when composing a mail message - right click and select Look up - this will also open the Research Task Pane

Saturday, April 05, 2008

Changing the default maximum size of SharePoint WSP files

If you are not using the SharePoint WSP builder tool and you are building your WSP's using makecab.exe then this is something usefull to know. By default the size of the wsp will be limited to 360 KB (which is the max. size of 5.25'' floppies from the good old days). You can however change this by adding the following to your .ddf file:

.Set MaxCabinetSize=0

.Set FolderSizeThreshold=0
.Set CabinetFileCountThreshold=0
.Set FolderFileCountThreshold=0

Friday, April 04, 2008

[OT] Mountainbike video from les 2 Alpes

This is something you need to see - a recording from a downhill mountainbike on the famous track Venosc in les 2 alpes ....

 

http://www.world-vtt.com/video-mondial-vtt-descente-venosc-camera-embarquee-a218

Thursday, March 20, 2008

SharePoint as development platform - complaints/issues/rants ...and answers

There is a lot of discussion about whether SharePoint should be used as a platform to built applications upon. Some in favour - other strongly disagree - see flames/rants such as SharePoint is not a good development platform (do take a look at the comments which provide a broader view on this blogpost) - I did a discussion session at BIWUG today where we talked about some topics of which some are  genuine pain points and others more likely rants. (Remark this are my personal remarks and not necessarily those of my employer ...) So here they come:

 

  • The learning curve is quite steep. It is true that SharePoint requires quite a large set of development skills - .NET, ASP.NET, CSS, HTML, Javascript, SharePoint Object Model, Workflow Foundation, InfoPath, C#, Visual Studio,... But this is true for any web platform - web development hasn't reached the same level of maturity for developers as simple windows development.
  • SharePoint is not documented or the documentation is not sufficient It is true that there are still some gaps in the SDK but Microsoft is working on this. V3 is actually better from a documentation standpoint then v2. Even in beta phases some documentation is already available. You have to take into account that the capability of the platform has enormously expanded. There is also a lot of information out there in newsgroups, blogs, etc ... make use of these. There is a vibrant SharePoint community out there with a lot of people which are really passionate about the technology. You might also take a look at SharePointPedia - which provides an aggregation of all SharePoint-related content on MSDN, blogs, forums, newsgroups, etc ...
  • Why SharePoint if I can built it from scratch without SharePoint - Apparently there are not enough examples out there which show you how you can built something faster using the SharePoint collaboration framework. The samples in the SDK seems to focus on specific technical stuff in the Object Model. There is however not a lot of documentation about how you can do a translation of a business case to a SharePoint solution. The Fantastic 40  are however an excellent example of how this can be done - for an overview of the functionality implemented take a look at the
  • Application Template datasheets.
  • SharePoint is not for developers, it is an end-user tool  - It is true that SharePoint provides a lot of value to your end users so that they can click their solutions together. But there is only so much that you can put in a framework and this is also the case for SharePoint. So even though there is a lot of out of the box functionality there is also a lot of room for extension.
  • SharePoint has too much constraints - SharePoint is a product/framework with a number of standard functionality. The way that this is implemeted indeed poses some constraints for developers but it also gives you a lot of things that you can use in your projects such as out of the box security framework, navigation UI, personalization framework, etc ... I know that development in SharePoint v2  did not go that well due to the way that it was implemented. Since SharePoint V3 is implemented from the ground up with ASP.NET 2.0 - there are however a lot more possibilities. But I guess that SharePoint probably still suffers from the bad rep that it got with v2...
  • You need to develop on Windows 2003/2008 - I don't see this as an issue (but maybe I'm spoiled) - virtualization is vastly improving and doing development in a virtual environment is doable. There are actually some interesting whitepapers about doing Team based SharePoint development in a virtual environment. A developer edition of WSS would be nice however ... also see
  • SharePoint Server Developer Edition and Do SharePoint developers want a  developer version of SharePoint? Apparently most of the BIWUG audience did not see this as much of an issue.
  • Hard to debug, weird error messages and logging all over the place -The error messages are indeed quite cryptic but the logging is actually quite good. Next to the things which you find the eventlogs there also the SharePoint ULS logs. A lot is logged in the SharePoint ULS logs - and you have quite a lot of control on what is logged. The ULS logs are however quite hard to read - fortunately there is quite a nice tool out there which is called the ULS Log Viewer which you can download from the Codeplex Features project. Debugging is possible for code-based solutions such as webparts, workflows and event handlers. I would however love to see debugging support for features, content types and site definitions (or at least some more validation in Visual Studio). Sure you have WSS.XSD but it does not seem to be complete - but it provides basic intellisense in Visual Studio
  • CAML :-) ... Yes, I know CAML (Collaborative Application Markup Language) is still out there just as Mike predicted. I don't think that we will see it disappear in SharePoint Vnext (this is a guess though). To make life easier - there a some tools out there to build CAML statements - my favourites U2U CAML Builder and Stramit's CAML builder. I would however love to have CAML designer support built into Visual Studio.
  • Complex to build solutions - Yes you need to build SharePoint Solution files if you want to deploy your own customizations and normally you will need to use makecab.exe and create manifest.xml and a ddf file. Again the community comes to aid - the SharePoint WSP Builder is a must for every SharePoint developer. If you want to take it one step further you might take a look at the SharePoint Solution  Installer which will convert your WSP file into an MSI.
  • HTML Output is terrible - yes it is true, the standard SharePoint html output is not XHTML compliant. There are other issues as well with SharePoint with regards to accessibility such as the use of absolute font sizes in CSS files, etc ... So when this is a requirement, you will need to built your own master pages, css files (and for publishing sites your own page layouts). There is guidance available for building an accessible website in the form of the Accessibility Kit for SharePoint (AKS). The AKS contains sample master pages, css files and control adapters which you can take as an example.
  • SharePoint does not support large lists and relational data - Again true, but SharePoint is not a database system (or not yet - see ...). So when this is an issue maybe SharePoint is not the right tool for solving your problem. Take a look at What not to store in SharePoint
  • Lack of developer tools  - Definitely take a look at VSeWSS (Visual Studio Extensions for WSS) - it has vastly improved in the 1.1 version. There are also a lot of community tools out there - I will post a list of must have SharePoint developer tools in the coming weeks.
  • Poor data validation - SharePoint is a generic platform so all the validation is generically built. If you need specific data validation - you will probably need to write your own custom fields. Here you can add all the validation that you need.

So to summarize - for every issue/problem there is probably a workaround available out there. If I missed something, do not hesitate to add a comment. And if you attended the BIWUG session and you miss a link to a tool that I talked about - leave a comment as well :-) ...

Happy SharePointing

SharePoint [Fun stuff]

This may seem offensive but I still think it is funny -

SharePoint on Youtube

and while you're still laughing also take a look at this SharePointology

Tags van Technorati: ,,,

Thursday, March 13, 2008

Folders within a SharePoint pages library are not supported ...

This is  something  that I tripped upon recently ... Folders are not supported in the Pages library in a Publishing site.

Allthough you can turn them on my manually and do some configuration to get them to work (more or less ...), this is not supported by Microsoft. This is also the reason why that when you create a page, it is always placed in the root of the Page Library. You can move it after it was created, but some random stuff won’t work.

There actually is a support article about this - New pages that are created in a subfolder of a Pages library of SharePoint Server 2007 are saved in the root of the Pages library (KB948614)

Monday, March 03, 2008

BIWUG session on march 20th

We will organize another BIWUG meeting on March 20th:

18:30 - 19:00 Registration and welcome

19:00 - 19:30 Infonic SharePoint Geo-Replicator (formerly known as iOra) by Patrick Fear & David Henderson, Infonic

Infonic’s Geo-Replicator solution provides Server to Server and Offline Replication of Microsoft SharePoint 2003 & MOSS 2007. We will share our experiences of Replicating Global MOSS deployments and the challenges facing customers with varied understandings of the scope and capabilities of the MOSS platform. We will also discuss the marketplace perceptions of those customers who approach MOSS from a Network centric  vs Content & Applications perspective and the impact this has in architecting global solutions. Finally, we will discuss some of the demand drivers from both Business & IT stakeholders in our global engagements and share why they are now viewing Replication as a key element for Business Continuity.

19:30 - 20:00 SharePoint as an application platform? Moderated by Joris Poelmans

This will be an open discussion about how you can use SharePoint as an application platform. How easy is it to extend SharePoint? What are the pitfalls? What are you still missing in SharePoint from a developer’s perspective? And what makes it hard to work with SharePoint to develop applications compared to plain vanilla ASP.NET development?

20:00 - 20:15 Break

20:15 - 21:30 Overview of Search in the Microsoft Platform and introduction to Search Server 2008 by Bart Vandenheede, Dolmen

In the first part of this session we will focus on the search capabilities in Microsoft Office SharePoint Server 2007. What’s in there out of the box and how can you extend the search functionality. The second part will focus on the soon to be released Search Server 2008.

Event location: Microsoft Offices Brussels, Culliganlaan 1, B-1831 Diegem (Brussels)

Register on www.biwug.be

Tags van Technorati: ,,,

Saturday, March 01, 2008

Integrating MOSS 2007 and Dynamics AX Part II - installing and configuring Dynamics AX Enterprise Portal

We start off with an environment which already has MOSS 2007 installed and Dynamics AX installed - for a step by step guide take a look at the previous posting - Installing MOSS 2007 and Microsoft Dynamics AX Part I - setting up your development environment.

Now we will take a look at how you can use the Dynamics AX Enterprise Portal functionality to provide access to Dynamics AX functionality from within SharePoint. There is a good white paper available on this topic, Installing and configuring Microsoft Dynamics AX Enterprise Portal (Partnersource: login required) . I used this as a reference but added some extra information which might be useful.

Follow these steps to get a Dynamics AX Enterprise Portal up and running:

  1. Modify the web.config of MOSS 2007 or WSS 3.0 - usually found at  c:\inetpub\wwwroot\wss\virtualdirectories\80.
    1. Change the trust level to WSS_Medium: <trust level="WSS_Medium" originUrl="" /> (For background info about the reason why take a look at  Microsoft Windows SharePoint Services and Code Access Security)
    2. Replace <httpRuntime maxRequestLength="51200" /> with <httpRuntime executionTimeout="6000" maxRequestLenght="51200" />
    3. Modify the <safecontrols> section in the web.config. SharePoint will only load Web Parts and ASP.NET controls that have been explicitly configured as "safe controls".

      <SafeControl Assembly="Microsoft.Dynamics.WebParts, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="Microsoft.Dynamics.WebParts" TypeName="*" Safe="True" />

      <SafeControl Assembly="Microsoft.Dynamics.ClrBridge, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="ClrInterop" TypeName="*" Safe="True" />

  2. Install Enterprise Portal by running the setup - select Custom installation type > click next. Select the computer role page and select EP Server.
  3. Start the Enterprise Portal Configuration. Open the Microsoft Dynamics AX client and select Administration > Setup > Internet > Enterprise Portal > Configuration Wizard . Most steps are self explaining... After you complete the EP Configuration, you can start the EP Deployment Wizard. Here you need to check the "enabled" check box for the SharePoint web application where you want to deploy the EP or use the EP web parts.
  4. The Enterprise Portal is actually a custom site definition - if you want to take a look at how it is build check out the  Templates\Sitetemplates\AXSiteDef folder underneath the "12 hive"  ([installdrive]:\program files\common files\microsoft shared\web server extensions\12). Important to note is that the EP site templates can only be top level sites so you will need to create them in a separate site collection.  If you want to learn more about site definitions take a look at SharePoint Site definitions: why you need them and how to use them.
  5. Create an Enterprise Portal site - this can be initiated from the Microsoft Dynamics AX Client. Open the Microsoft Dynamics AX Client and select Administration > Setup > Internet > Enterprise Portal > Websites. Click the Create site button - this will open the Create site collection page. On this page you can select one of 2 types of templates (on the custom tab) for Axapta sites - Microsoft Dynamics Enterprise Portal and Microsoft Dynamics Public.
  6. After the site is created,  the Register Site page will open ( the /_layouts/ep/axepsetup.aspx  page which is defined in the ExecuteURL section within the ONET.XML of the AXSiteDef sitedefinition ). On this page you will select the company with which you want to associate the site. If a SharePoint site is not registered in Dynamics AX, you will not be able to use the Axapta webparts on the site.

Now you have you Enterprise Portal site up and running. It is possible to install Dynamics AX EP both on WSS 3.0 and MOSS 2007. If you want to learn more about Enterprise Portal  Development in Microsoft Dynamics AX 4.0 - there are two courses available - course 8647 (Partnersource: login required) and course 8636A (Partnersource: login required). Although both seem to be written for SPS2003/WSS 2.0 some things might still be relevant.

In a next posting we will explore how to integrate the Axapta web parts in other SharePoint site templates such as team sites or even the My Site of users.

Sunday, February 24, 2008

External storage option for Binary Large Objects (BLOBS) in Windows SharePoint Services and Microsoft Office SharePoint Server 2007

Recently some documentation (finally) came available about how you can store huge files external to your SharePoint SQL database while using the rich feature set of SharePoint as an enhanced information store. To actually get this working you will need to implement a COM interface (ISPExternalBinaryProvider), which will keep your external storage and the SQL Content database(which will contain a pointer to the data as well as metadata about the object) in sync.

Available information:

Technorati tags: , , ,