November Happy Hour will be moved to Thursday December 5th.

Source code for MOSS page provider

Vote:
 

On the EPiServer website I found a set of six video's explaining the functionality of the SharePoint Connector. http://www.episerver.com/en/Products/Integration/Demos-for-EPiServer-SharePoint-Connect/ Now I was wondering if the soucre code for the last video is available somewhere? This is about a Custom PageProvider that pulls pages from SharePoint into EPiServer. I'm not so good with pageproviders, so is the code out there or can anyone help me out on how to do something like this?

 

All help would be appreciated?

#54078
Oct 03, 2011 8:38
Vote:
 
#54079
Oct 03, 2011 9:07
Vote:
 

EPiServer SharePoint Connector is a commercial product so the source code is not available for distribution

#54080
Oct 03, 2011 9:10
Vote:
 

I'm not looking for the source code of the SharePoint Connector itself, I'm looking for the source code of the Custom PageProvider used in the sixth video about the Connector.

#54081
Oct 03, 2011 9:16
Vote:
 

ok, the code was written by Dan Matthews who works for EPiServer South Africa. Below is a quote from him when we asked him about the custom page provider:

 

No, it’s dirty hacky code that I wrote myself... a custom web service on SharePoint consumed by a custom page provider on the EPiServer side. I would not recommend using it as the basis for anything, it was merely proving a concept. It was also SharePoint 2007 and EPiServer 5. There’s much better ways to cook it up I’m sure using more standard functionality in SharePoint I’m sure and, as you know, the custom page provider part is pretty straightforward.

#54083
Oct 03, 2011 9:23
Vote:
 

Mhm, well thing is that I haven't managed creating a Custom Page Provider myself and even then I would have no idea how to make the connection to the SharePoint site (does he use the client object model?) and how to retrieve the pages and their content...

Any help would be appreciated!

#54084
Oct 03, 2011 9:36
Vote:
 

First, make sure you read up all about Custom Page Providers. However you approach this, you'll need to understand them. I suggest that you even try to write one of your own, just reading a database table or an XML file or something. They're not hard to write.

How you then connect to MOSS depends on your setup. The simplest option is to put EPiServer and SharePoint on the same server, and have the Custom Page Provider directly call the SharePoint API. I was trying to prove that EPiServer on server A could access MOSS on a different server B, so I couldn't just use the API. Ideally, you could do this via the MOSS web services but unfortunately the built-in web services are pretty limited in MOSS, so I simply cooked my own. It was a basic MOSS web service that used the MOSS API to generate an XML structure representing the site. The Custom Page Provider then called that web service and used the XML to generate the page tree structure for EPiServer. Creating pages in EPiServer using the page provider called a method via the web service which used the MOSS API to create pages, or edit them, or whatever.

Actually coding the custom MOSS web service and custom page provider was really easy. The hardest part is the SharePoint deployment - the signing, marking safe assemblies and all that stuff. I probably wasn't doing things the easiest or 'approved' way though - I was just proving a concept.

As for the source code, I think it's buried in a backup somewhere and I'm not sure where to start looking. The code isn't worth it though - really was thrown together. Much better that you understand the concept and start again. Try and improve on my original idea too - maybe there is a better way to connect to SharePoint? Maybe use WCF?

#54088
Oct 03, 2011 10:53
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.