Monday, August 27, 2007

IT Talks event - Installing, administering and working with SharePoint 2007

Some guys I know are doing an IT Talks event about SharePoint 2007 - for more info check out the IT Talks web site. If you have never seen SharePoint, don't miss it - it's a great intro ...

Technorati tags: , , ,

Georeplication in WSS 3.0 or Microsoft Office SharePoint Server 2007

Geographic Replication is not an out of the box feature feature in neither MOSS 2007 or WSS 3.0. It is however possible to develop your own geographic replication solution using the WSS object model.   Basically, you will need to start looking at the content migration APIs  (previously called "Prime" during the beta phase). It is doable to create a "syncing" solution of two or more servers by exporting and importing changes. Implemting conflict resolution for import or export would already provide you with some work. If you want to built a serious solution, take a look at the SPExport and SPImport objects in the SharePoint.Deployment namespace. There is a small code snippet available in the WSS SDK  about content import/export.

If you want to learn more about it - definitely take a look at Jackie Bodine's post about SharePoint Content Migration Object Model and Content Migration Packages. Joel Oleson has a pretty nice post about some Replication and High Availability (Joel Oleson) in which he also talks about third paryt products which do georeplication. Not surprisingly these products don't come cheap - so I'm still waiting for a basic solution framework or code samples on Codeplex ...

 

Wednesday, August 22, 2007

What about correlation tokens and SharePoint workflow?

Correlation tokens are something very important in SharePoint

A correlation token is a means of uniquely identifying each instance of a workflow, modification or task.  When SharePoint initiates a workflow, it does not spawn a unique set of objects. Instead, if one instance of the workflow is already running when the second initiates, the second will reuse objects from the first. Correlation token properties ensure that the single activity object is operating on the correct workflow instance and accessing the correct details about the workflow.

One of the things to watch out for is when to use a different correlation token - a great starter about this is the blogpost of Eilene Hao about the importance of correlationtokens.

 

For more information about correlation tokens take a look at :

PS Shameless plug - if you want to learn more about workflow development in SharePoint, definitely buy Real World SharePoint 2007: Indispensable experiences from 16 MOSS and WSS MVPs . Robert Bogue wrote a chapter about WSS workflow development and I did one about SharePoint Server workflow development...

Monday, August 20, 2007

Defining SharePoint v3 webparts (ASP.NET 2.0 webparts) in the Modules section of ONET.XML

As you probably know there are 2 different base classes that you can use when developing web parts for WSS 3.0 or MOSS 2007. You can either inherit from System.Web.UI.WebControls.WebParts.WebPart which are your ASP.NET 2.0 webparts or you can still use Microsoft.SharePoint.WebPartPages.WebPart (It is considered best practice to build your webparts using the ASP.NET 2.0 way - the other ones are only in there for backwards compatibility). For a thorough discussion about the different ways to build webparts check out Jan's article on MSDN Belux - Web Part Platforms and Development Techniques.

 

When a site in SharePoint is created it is based on site definition. I'm not going to elaborate about how you can create your custom site definition but I'm going to talk about the Modules section in ONET.XML. In this Modules section, you can specify which files need to be provisioned at site creation - take a look at Using Modules to add files to site definition on MSDN (SPS 2003 documentation - not available for SharePoint 2007 yet) . This article also describes how you use the Modules element to specify which web parts are used on the home page of the default.aspx file in every site.

<Modules>
   <Module Name="Default" Url="" Path="">
      <File Url="default.aspx" NavBarHome="True">
         <View List="104" BaseViewID="0" WebPartZoneID="Left"/>
         <View List="106" BaseViewID="0" WebPartZoneID="Left" WebPartOrder="2"/>
         <AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1">
            <![CDATA[<WebPart xmlns="
http://schemas.microsoft.com/WebPart/v2"
               xmlns:iwp="http://schemas.microsoft.com/WebPart/v2/Image">
               <Assembly>Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
               PublicKeyToken=71e9bce111e9429c</Assembly>
               <TypeName>Microsoft.SharePoint.WebPartPages.ImageWebPart</TypeName>
               <FrameType>None</FrameType>
               <iwp:ImageLink>_layouts/images/homepage.gif</iwp:ImageLink>
               </WebPart>]]>
         </AllUsersWebPart>
         <View List="103" BaseViewID="0" WebPartZoneID="Right" WebPartOrder="2"/>
         <NavBarPage Name="Home" ID="1002" Position="Start"></NavBarPage>
         <NavBarPage Name="Home" ID="0" Position="Start"></NavBarPage>
       </File>
    </Module>
</Modules>

Unfortunately, the code listed above only works if you are using V2 webparts - being webparts which inherit from Microsoft.SharePoint.WebPartPages.WebPart. But what if you need to add an ASP.NET 2.0 webpart?  I first thought that I just needed tot change the xmns from http://schemas.microsoft.com/WebPart/v2 to http://schemas.microsoft.com/WebPart/v3 - but that did not work ( ... would probably have been to easy). So what is the correct syntax?

The correct syntax is actually the one which is used for the .webpart files - if these were generated for you (you might have just added a webpart using the approach as described by Mart - Create a SharePoint 2007 webpart step by step ) you can still get at the XML file which you will need to use.

Go to the Web Part Gallery of the site collection which contains your web parts - select Edit document properties for the webpart that you want to include in your site definition. Next click - View XML - this will show you the syntax you will need ...remember that you will need to include the <webParts> ...</webParts> start and end tags. (This is also case sensitive). Beneath is an example of one of the webparts I had created:

  <Modules>
    <Module Name="Default" Url="" Path="">
      <File Url="default.aspx" NavBarHome="True">
        <NavBarPage Name="$Resources:core,nav_Home;" ID="1002" Position="Start" />
        <NavBarPage Name="$Resources:core,nav_Home;" ID="0" Position="Start" />
    <AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1">
    <![CDATA[
    <webParts>
    <webPart xmlns="
http://schemas.microsoft.com/WebPart/v3">
    <metaData>
    <type name="DolmenWebParts.WebPropViewer, DolmenWebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
    </metaData>
    <data>
        <properties>
        <property name="Title" type="string">WebPropViewer</property>
        </properties>
    </data>
    </webPart>
    </webParts>
      ]]>
    </AllUsersWebPart>     
    </File>     
   </Module>
 </Modules>

Happy SharePointing ...

Starting with game development for XBOX360

First start off with downloading Visual C# 2005 Express Edition, afterwards you will need to apply SP1 for Visual Studio Express Edition (Rather strange that you can't use Visual Studio 2005 Professional - fortunately you can just install the different versions side by side. ) Once you have installed VS2005, you will need to download XNA Game Studio Express 1.0 Refresh. Update:  I just learned that version 2.0 of XNA will be available end 2007 - that version will support all versions ov Visual Studio - For more info see Announcing XNA Game Studio

 

All tools are free of charge but when you want to debug and/or play games on your XBox 360 you will need a XNA creators club subscription . Steps you will need to go through to get the thing running:

Happy XNA-ing ...

Technorati tags: , , ,

Article series - A (Microsoft) code name a day

A while ago Mary Jo Foley started with the article series - A (Microsoft) code name a day - here are some of them which are a little less know (but definitely not less interesting):

  • Harmonica - Best guess on what it is: A P2P data synchronization service that could be key to Microsoft’s cloud-computing vision.
  • Greenland -  Best guess on what it is:  WS-Management Protocol 1.1
  • Jasper  or Dynamic ADO.Net - definitely take a look at this one -  download the  Jasper CTP or at least read about it on the ADO.Net blog
  • Astoria -  Best guess on what it is : A set of technologies allowing applications to expose data as a data service that can be consumed by Web clients within a corporate network and across the Internet. Astoria is one component of Microsoft’s “data-in-the-cloud” strategy. Also take a look at Introducing Project Codename Astoria

Check out the  complete overview of Microsoft Codenames on ZDNet

Tuesday, August 14, 2007

Syntax for SPLongOperation.End(string sRedirectUrl)

A while ago I wrote about Compiling SharePoint 2007 audiences using the SharePoint object model (C# code sample) which was used in a custom SharePoint application page.  Since the code in this custom application page might take a while to run I used the SPLongOperation class to show the nice SharePoint 2007 "Operation in progress" user interface while the code is running.

When your code is finished you can redirect to a specific web page by using SPLongOperation.End() method and passing in a url - the code below redirects to the previous page which called into the SharePoint application page.

operation.End(Request.ServerVariables["http_referer"].ToString());

Now, something which I forget was that the URL string that you pass in should not be URLEncoded so the syntax should be

operation.End(SPEncode.UrlDecodeAsUrl(Request.ServerVariables["http_referer"].ToString())); 

 


Troubleshooting SharePoint crawler keeps on crawling

This is something I noticed a couple of times - your Microsoft Office SharePoint Server 2007 crawl just seems to be running forever without any reason. If you are using Microsoft SQL Server 2005 as a back end database you might want to take a look at the SQL Server Maintenance plans. To resolve the issue, take a look at the procedure detailed in KB930887 - You experience issues with portal alerts in SharePoint Portal Server 2003 or with search performance in SharePoint Server 2007 after you create SQL Server 2005 maintenance plans or just apply Service Pack 2 for SQL Server 2005.

Wednesday, August 08, 2007

Solving SharePoint site not assigned to an indexer

This is something I came accross a couple of months ago when I was trying to access SharePoint search through code  - it gave the error "Your search cannot be completed because this site is not assigned to an indexer. Contact your administrator for more information." Apparently, there was something wrong in the configuration, to solve this - do the following:

  • Go to SharePoint Central Administration > Application Management > Content Databases (Underneath SharePoint Web Application Management).
  • Select the correct SharePoint web application – click on the name of the Content databases  - this will open the  “Manage Content Database Settings” page. 
  • Make sure that the Search Server is set on the “Manage Content Database Settings” page.
Technorati tags: , , ,

Tuesday, August 07, 2007

Cool interview with William Gibson

I must confess that I'm an avid reader - but William Gibson definitely is one of my favorites - there is a very interesting interview with William Gibson at Silicon.Com. My favourite books (watch out -  these books are part of a genre called cyberpunk which you either hate or love ...)

PS The movie Johnny Mnemonic with Keanu Reeves is also based on one of his short novels - but trust me the books are a lot better then this movie ...

Technorati tags: , ,

Back from holidays

I'm back from my holidays to the Picos de Europa in Spain - if you like trekking and climbing definitely worthwhile. Since the Picos are a National Parque they even have free guided tours. If you want to do the walks on your own better get a good book or some decent cards since the walking roads aren't always clearly indicated ...

 

Technorati tags: , , ,

Wednesday, July 11, 2007

Why bother with SharePoint?

Solving Internet Explorer crash when editing documents in SharePoint Server 2007

A while ago, a customer experienced some issues whenever he tried to edit a document or create a new document from withing SharePoint Server 2007. Apparently this was caused by using Office 2003, installing and removing beta versions of Office 2007 and afterwards performing a new install of Office 2007 RTM. This article - Internet Explorer crashing when launching documents Office documents from SharePoint Server and WSS suggested performing a reinstall of the "Windows SharePoint Services support" in Office 2007 but fortunately one of our SharePoint gurus found a quicker workaround:

1. Delete C:\Program Files\Microsoft Office\Office 12\OWSSUPP.DLL

2. Run the Microsoft Office Diagnostics tool (Start > All Programs > MS Office > MS Office Tools)

3. Reboot

This seemed to solve the issue.

ROTFLOL - Agrarische implementatie van MOSS

Interesting quote from a Dutch page about Microsoft Office SharePoint Server - translation on the edge - http://office.microsoft.com/nl-nl/sharepointserver/HA101945391043.aspx?pid=CL100626951043.

Voor agrarische implementaties is een verbindingssnelheid van 100 Mbps (megabits per seconde) vereist, voor de verbindingen tussen clients en servers is een verbindingssnelheid van 56 Kbps (kilobits per seconde) vereist. Voor meldingen per e-mail is met Internet Simple Mail Transfer Protocol/Post Office Protocol 3 (SMTP/POP3), Internet Message Access Protocol 4 (IMAP4) of MAPI compatibele software voor e-mailcommunicatie vereist.

 

Sorry, only funny for dutch speaking people ...

Technorati tags: , ,

SharePoint Server 2007 VHD download

Personal reminder:  Microsoft Office SharePoint Server 2007 VHD download

Tuesday, July 10, 2007

InfoPath Processing Instructions - what are they good for ...

Did you ever wonder how InfoPath knows which template to use when you open an XML file in a form library?

Here's the answer:


If you download one of the filled-in InfoPath forms (these are just plain XML files) to your desktop and you open it with Notepad, you will notice that the file contains a number of specific statements at the beginning of your XML file. These statements, are called processing instructions, and will contain some lines with a similar syntax to the lines listed below:

<?mso-infoPathSolution solutionVersion="1.0.0.19" productVersion="12.0.0" PIVersion="1.0.0.0" href="http://moss/SiteDirectory/infopath/Expense%20Reports/Forms/template.xsn" name="urn:schemas-microsoft-com:office:infopath:Expense-Reports:-myXSD-2007-02-12T12-04-43" ?><?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.2"?><?mso-infoPath-file-attachment-present?><my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-02-12T12:04:43" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-us">


The processing instructions are used to tell the calling application how to handle the data contained within the XML file. These processing instructions can be placed anywhere in a XML file outside of other mark-up. The processing instructions contain a href and name attributes that reference the form template that is used to load and edit the XML file. These processing instructions also allow forms that are based on a specific form template to be updated after you change the associated form template.

This means that you can actually create InfoPath forms using the System.XML namespace and by adding processing instructions you can link these automatically generated XML files to specific InfoPath form templates.

 

References:

Wednesday, July 04, 2007

More about OBA's and RAPs

Not sure what OBA is all about - read the intro on  the Office Business Appplication Developer Portal  -

The 2007 Microsoft Office system provides a comprehensive set of servers, clients, and tools to make it easier for enterprises, software vendors and developers to build and deploy a new class of business applications called Office Business Applications (OBAs).

OBAs connect Line of Business (LOB) systems with the people that use them through the familiar user interface of Microsoft Office. OBAs enable businesses to extend the Microsoft Office clients and servers into business processes running in LOB applications such as Enterprise Resource Planning (ERP), Customer Relationship Management (CRM), and Supply Chain Management (SCM). This enables enterprises to create new value from existing IT investments by combining them in innovative ways.

 

Still not satisfied with the available information - definitely take a look at the OBA Solution Framework Index - OBA Blogathon. To get you started there are also some sample solution packs available - and recently some new Reference Application Packs (RAP) were recently released:

  • OBA RAP (Reference Application Pack) for Plant Floor Manufacturing Analytics - http://msdn2.microsoft.com/en-us/architecture/bb643797.aspx - This RAP contains a reference solution architecture and application that demonstrate materializing a BI centric OBA that integrates tightly with the Microsoft BI platform (Office and SQL Server) to realize the Analytics value chain of enabling operational monitoring, tactical analysis & decision making, and tactical analysis & decision making, and strategic insight.
  • OBA RAP for E-Forms Processing in the Public Sector - http://msdn2.microsoft.com/en-us/architecture/bb643796.aspx - This RAP contains a reference solution architecture and solution that illustrate how an OBA (Office Business Application) can be built to automate and optimize forms processing in a Public Sector organization. The reference solution framework show cased in the RAP is generic and can be adapted to enable end-to-end processing of a number of forms in the public sector

 

Related postings:

Tuesday, July 03, 2007

Belgian community day slide decks available

Some of the slide decks of the Belgian community day are available online - here's a direct link to SharePoint Community Tools - some other presentations are available as well - take a look here - CommunityDay slidedecks.

 

Monday, July 02, 2007

One fine day

... but quite busy. I had a lot of fun on Thursday  - I started the day with doing Exam 70-630: Configuring Microsoft Office SharePoint Server 2007 and passed it with a nice score. This exam seems to be a lot easier then the Application Development on MOSS exam, which I took earlier.

In the afternoon, the very first Belgian CommunityDay - where the different user groups BIWUG , Pro-Exchange, VISUG, SQLUG and IT-Talks. The thing we kind of missed was that the location was quite near Rock Werchter - so some people arrived a little bit late.

There were some quite sessions however and a nice informal "ambiance" ... - I also did a session about SharePoint Community Tools - in which I selected some of the tools listed in the SharePoint Tools Collection V2. Some things I unfortunately skipped but which are definitely way cool:

  • LINQ To SharePoint - there is a new release availabe on Codeplex (v 0.2) which targets Orcas Beta1 - you might want to use the Orcas VPC since it's still beta soft. How cool is to make a CAML query on a  SharePoint custom list like this
var src = new SharePointDataSource<Customers>(new Uri“<http://mywss3.local>”));
var res = from c in src
orderby c.LastName, c.Age descending
where c.FirstName == “Bart” && c.Age >= 24 && c.FavoriteFood == FavoriteFood.Pizza
select new { Name = c.FirstName + “ “ + p.LastName, c.Age };

foreach (var c in res)
Console.WriteLine(c);

More details about it on Bart's blog



 


After the sessions - great food and drinks and some time to meet with peers ... I guess that we will try to repeat this one next year and I hope to meet more of you guys at  Belgian CommunityDay 2008.


PS See what Katrien has to say about CommunityDay ...