Tuesday, December 29, 2009

Peculiarities for handling space-character in field names for query and search: ManagedProperty name vs Field / ColumnName

For better human readability, and thus understanding by the end users, it is often desired to use spaces in the DisplayName of SiteColumns and ContentTypes FieldRefs: "The columnname". But beware, this gives some peculiarities with the different approaches to query and display the SharePoint content...

Enterprise Search

Upon first crawling of the content source, this ends up in a CrawledProperty with the name "The_x0020_ColumnName". This can be mapped to a ManagedProperty. The name of this property may not include any spaces. Here it could be "TheColumnName". With Enterprise Search, one can now query and select on the property 'TheColumnName'. For instance, query via the AdvancedSearchBox webpart, and display the results via the SearchCoreResults webpart. Rather handy to skip in the XML-based query (SQL-CAML), and the rendering of the query result (XSLT), the special handling of the space character.

CAML-based site content query

When query and displaying site data via the ContentQueryWebPart, one must select and display on the actual field / column name. That is, in the CommonViewFields specification, the actual column name must be used. Due to the space in the name, CAML space-mapping must be applied; resulting in 'The_x0020_columnname'. Example:
<property name="CommonViewFields" type="string">
Title,String;The_x0020_columnname,Choice;Editor,User
</property>
This is all pretty well-known SharePoint stuff.
Something that is less known, is that yet another CAML translation must be applied to successfully display the CQWP queryresults via XSLT rendering. The CAML-space character '_x0020_' must itself be translated into '_x005F_x0020_'. So for instance:
<td class="ms-vb" nowrap="">
    <xsl:value-of select="@The_x005F_x0020_columnname"/>
</td>

Thus...

To summarize: when you put a space in the displayname of a field, this may wind up in 4 different 'names' within the query/display pipeline:
  1. The actual displayname itself: "The columnname"
  2. The managed property name for within enterprise search: "TheColumnName"
  3. The query fieldspecification within CQWP: "The_x0020_columnname"
  4. The query result rendering used by CQWP: "The_x005F_x0020_columnname"

Monday, December 28, 2009

Tip: difference in metadata only does not qualify document items as different

In my last post I described the approach to set-up your managed properties collection as part of initializing the enterprise search experience. To test the outcome of this initialization, I next uploaded a couple of documents, and arbitrary filled in some of the metadata fields. Actually, I uploaded the same dummy / test document multiple times, each time renaming it. To my surprise, enterprise search next continuously returned only 1 of the uploaded documents. The cause of this is that the search crawling detected that the renamed documents are actually the same / duplicates. And on default, enterprise search via the SearchCoreResults webpart does not include duplicates. The tip is therefore in order to properly test the enterprise search in your application, make sure to upload different documents (that is, with difference in the document content) within the crawled content source.

Monday, December 21, 2009

Automated approach for initializing Enterprise Search experience

Whenever you want to utilize the Enterprise Search functionalities in your application, you must take into account for correct initialization: set up a content source, administer its crawling scheme, create the searchable managed properties, set up a Search Scope. Although the different steps can be done manually via the SharePoint GUI (combination of Central Admin and your own application), this is less workable within the context of an ALM based project. Your application is then multiple times (re)deployed, and to different environment (development, test, staging, production). Each time the manual installation/initialization steps would need to be repeated. This is cumbersome, and [thus] error prone. A better approach (as always) is to strive for a fully automated initialization of the enterprise search. I’ve applied this several times via the approach outlined here:
  • create a new Feature, with a FeatureReceiver codebehind
  • In the activation method of the feature, do the following steps:

    Create the content source

  1. use the Search Object Model to create the content source
  2. if applicable, administer include and exclude rules
  3. create the crawl schemes; full and incremental
  4. Create managed properties

    Important to realize here is that a managed property can only be made if the mapping crawled property is available.

  5. make sure the crawled content source contains at least one item, by either adding a dummy listitem (for regular Lists), or uploading a dummy document (for document library)
  6. Use the content type(s) definition(s) to determine the fields of the searchable content, and assign per field a non-nil value
  7. Initiate a full crawl, in order to let the crawler make up crawled properties for each of the content type(s) fields
  8. After the full crawl, loop through the collection of determined content type(s) fields, and for each field create a Managed Property of the proper type, and associate it with the automatically created crawled property
  9. Remove the dummy content(s) of step 4
  10. Create the Search Scope

  11. use the Search Object Model API to create a Search Scope
  • In the deactivation method of the feature, do the proper reversible actions of the feature activation event.
What is proper, is situation / application dependent. Normally, you would implement in the feature deactivation a full restore to the status before the feature activation. Here that means removal of the managed properties, crawled properties, search scope and content source. However, when you delete the content source, you typically undo more than strict the feature activation. In a production situation, the content source has been crawled and crawled, building up the index administration. Upon content source deletion, you also loose al this hard work content crawling and indexing. Feature deactivation would then thus not only undo the feature activation itself, but also work done later. Whether this is appropriate, depends on the application and content specifications. Every content can be recrawled. However, for a large and complex set (documents, .pdf’s, TIFF files, LOB via BDC…) this can be time consuming, and during the required full crawl the application search cannot find and return all search requests.

Saturday, December 19, 2009

WS-I members completed Basic Security Profile 1.1

This week, SAP, Microsoft, IBM, Intel and Layer 7 completed the WS-I Basic Security Profile 1.1 by successfully demonstrating the interoperability between their platforms based on the profile implementations of at least 4 WS-I member companies. Check out this SAP Community Network blog for more background information.
Example of interoperability test results

Sunday, December 13, 2009

SAP Influencer Summit '09 exhibits evidence of the Microsoft connection

Above blog reports on the SAP Influencer Summit held last week in Boston. At this summit, the mid-term future directions of SAP as IT and solutions company where presented to the audience of 275 analysts and IT influencers.
Noticable in the context of SAP / Microsoft interoperability are the following observations:
  • Silverlight was formally named as the user interface surface of choice over Adobe’s Flex, and Sharepoint & Office interoperability is clearly seen as the path forward over that horizon. The dev environment is similarly on the .net side of the ocean.
  • Excel and Crystal Reports (and SAP’s Xcelsius) are similarly foundational components to analytics reporting and dashboarding.
Makes me wonder: is SAP finally making a renewed stand on the integration and interoperability of the SAP and Microsoft platforms + products? The fact that noise and attention from SAP on the recently by Microsoft announced DUET Enterprise is yet effectively non-present, is at least confusing with the messages made at the summit. I guess we'll still have to wait and see whether and in which direction(s) the 2 companies will interoperate and partner.

Saturday, December 12, 2009

Tip: use Lookup iso Choice field for (semi)fixed set of defined values

Often, in your SharePoint information architecture there are some fields identified with a set of defined allowed values. A common approach is then to apply the Choice fieldtype herefore. For real fixed set of possible values this is a very sensible approach. For instance, for datatype sex; we'll have 'male', 'female', and well 'unknown' in case of doubts. However, more than often the set is (semi)fixed: departments within a company, the customer base of an IT consultancy, etc. In such situation, usage of Choice is not flexible nor user-friendly towards the functional managers of the application. For each modification, it is required to change the definition of the Choice-based field. And one must then also not forget to propagate this change to the lists on which the field / site column has been applied (direct, or via contenttype). All this is more technically doing, than SharePoint functional management. A better approach is to utilize the Lookup fieldtype, and refer to another list with in it the currently known set of defined values (masterdata values actually). Whenever a modification to this set is in order, functional management can suffice with adjusting this masterdata list. Actually, this is just sane data model normalisation. Like in such context, in addition to defining the set of allowed values, it is also possible to augment them with more details. For instance, department name (allowed value), and in another list column more details of the department.
Something you'll have to take into account when applying this datamodelling, is a peculiarity upon provisioning the SiteColumns. The way Lookup SiteColumn are administered in the SharePoint content database, is with the Guid of the referential SharePoint list. This results in a problem when provisioning the SiteColumns the SharePoint standard way via Feature, with the field specifications in XML. The ID of the referential list is typically unknown at coding/specification time, and will be different per environment provisioning. This is a known issue, and so there is also a known resolution. I'm not going to describe it here, of even try to take the credits for it. Frankly, I've used a blog-entry of Chris O'Brien, Creating Lookup columns as a feature, as start information source for hinting how to solve this sequential provision issue.

Tuesday, December 1, 2009

Cosmetic extension / modification of AdvancedSearchBox UI

A customer required several modifications wrt to the screen-behaviour of the standaard MOSS AdvancedSearchBox control:
  1. Hide the resulttype picker
  2. Initial display 3 property-filter rows, instead of the default 1
  3. Automatic pre-select in these 3 rows a specific property to filter on
  4. For properties with a limited and fixed set of allowed values, let the user select from these via a dropdown control
The changes are all cosmetic, the customer is satisfied with the query construction + evalution of the AdvancedSearchBox.
My first idea was to realize these cosmetic changes by inheriting from AdvancedSearchBox, and overload the rendering of the control. However, this approach is not possible because Microsoft made the class sealed. Effectively this prohibits to address the customer requirements via a server-side resolution. I shortly did consider to re-engineer the AdvancedSearchBox in an own dedicated webpart. However, such is non-advisable: it's no small thing to try delivering the total of the AdvancedSearchBox functionality, and make sure it's tested and robust. And moreover, why should you even build your own control when the SharePoint application platform provides you with this rich control ? Only makes you vulnerable for updates to the SharePoint platform - from service packs and patches, and next year with the upgrade to SharePoint 2010.
So I had to come up with another approach, in which still the AdvancedSearchBox is utilized, but its appearance and UI behaviour is slightly modified. Well, in essence the UI of the control runs within the browser context. Another possible approach is therefore to make the UI modifications on-the-fly clientside, applying JavaScript / JQuery to alter via the Document Object Model. The elegance of such approach is also that it preserves the out-of-the-box SharePoint platform functionality. I'm not allowed to expose the source code. But I can outline the essence:
  • attach an own method to the body.onload event
  • in this method, use client-scripting to hide the resulttype row, and initially display upto 3 property-filter rows. Pre-select in each row a specific property
  • runtime construct via the client DOM a Select object, and position it next to the standard displayed Input element used for entering the filter value
  • runtime overload the onchange callback-function of the property Select element, and extend it with logic to either display the standard property-value Input element, or the Select variant in case of fixed set of values for the active selected property
  • propagate the selection made in the property-value Select element to the standard property-value Input element
Example of the resulting modified UI + behaviour:

Saturday, November 28, 2009

An in-between project: WPF screensaver for communicating our company values + news

A few weeks ago one of the TopForce founders asked me for an idea for communicating company messages to the TopForce employees. He was considering the usage of a screensaver for this. He had several requirements:
  1. It must be easily possible for the TopForce management to push new messages on-the-fly to our employees
  2. The displayed screensaver is attractive and draws on the attention of both the TopForce employee as coincidental passers-by
  3. The screensaver has a professional layout and styling
Being a SharePoint guy and fan, I immediately thought of applying our SharePoint based intranet for the management and distribution of the screensaver messages. Management can be done via a dashboard page containing multiple ListViews for the different categories of messages. Distribution can be done via SharePoint Lists.asmx webservice. So that's for addressing requirement 1. For the second requirement I considered WPF, you can do all kind of screen graphics and (dynamic) behaviour with that - from very simple to most advanced. For the last requirement; well I'm a developer, not a designer. Different roles, and especially different talents. I directly admit that I do not posses enough designer talent. But luckily I've several colleagues that are especially strong on the User eXperience area. Frodo Jansen did a very good job on desinging the screen-layout, addressing the third requirement.
The sketch of the software architecture for this mini application looks like this:
An impression of the end-result:

Friday, November 20, 2009

Business announcement of Duet Enterprise

Today the expected announcement on the next version of Duet is made public.
At the PDC09 Duet Enterprise has been presented to the audience, followed by a press release. In my opinion, the PDC is somewhat of a strange location to announce Duet Enterprise. The PDC participants are mainly IT developers and architects. The (justifiable) first audience of the Duet Enterprise proposition is however business management. This is visible in the information disclosed so far (view the solution brief). It eluminates the (foreseen) business value of Duet Enterprise, to get more value out of your company's investments in both SAP and Microsoft environments.
Details about the product itself are not yet exposed; system architecture nor infrastructure. We'll still have to wait for that. The good news for now is that both SAP and Microsoft have committed themselves, and in a shared uptake, to invest strategic in Duet. That clear commitment had been lacking until now.

Thursday, November 12, 2009

Recovering from Access Denied [The File Exists (Exception from HRESULT: 0x80070050)]

This week I restored a local virtual development environment, which I hadn't used for a couple of months. I wanted to reactivate this virtual image because it has a complete installed MOSS environment tailored for a development task. However, when I tried to access any of the local SharePoint sites within the image, be it Central Admin or a provisioned site; for each I received an Access Denied. The error: The file exists. (Exception from HRESULT: 0x80070050). Really annoying, because I needed to quickly be up-to-speed.
Luckily, I was not the first to run into this particular problem. Especially this blog shed light on the problem cause, and on how to solve it. In the process of reactivating the image, I was required to re-associate the local account within Active Directory. As result, AD issued a new Security ID (SID) for that account. And SharePoint internally checks on this SID, not on username, to determine whether an account is to be granted access. The SID is for that purpose administrated per SharePoint site in its content database.
The solution is thus to replace in the SharePoint content databases the invalid old SID with the new issued SID. In essence, this involves the following repair steps:
  1. Use the dsquery command to determine the AD context information of your account
  2. Use this to query for the AD Object, and derive the Security ID from it (property objectSid)
  3. Convert the binary SID into HEX
  4. Open a SQL Server Query tool, and replace in every SharePoint content database the invalid SID by the determined correct SID

Tuesday, November 3, 2009

Our proposition on SAP + SharePoint integrated HPW

I've written a leaflet on combining the strengths of SAP and SharePoint for a seamless integrated High Performance Workplace. This leaflet is published on our company website. For convenience I also include it here.

Unlock the value of SAP business processes within a SharePoint based HPW

For your enterprise/organization, the SAP environment is part of the company’s most important and valuable assets. However the business processes and functionality within this SAP environment are often not widespread distributed to the employees. This hinders the adoption and application of Self Service processes. By unlocking the structural SAP business processing within the familiar workplace of nowadays information workers, the application and operation of such functionalities appears familiar even for the casual user. More and more, Microsoft Office SharePoint Server 2007 is the platform underlying the enterprise portal.
Since the start of TopForce in 1999, we have come across numerous SAP installments at diverse customers. Mostly large enterprises and government organizations, but also mid-range sized companies. In this period, we have gained a lot of experience and insights on the strengths of the SAP products and environment: SAP ERP, CRM, XI/PI, ESS, MSS, Enterprise Portal, NetWeaver platform. As a portal consultancy organization, we also have knowledge and hands-on experience with the potentials of the Microsoft SharePoint platform. Since the introduction of the 2007 version it has rapidly become the rising star as platform of choice for deploying enterprise portals. The combination of these two puts TopForce in an excellent position to foresee the issues to deal with when unlocking SAP business processing within a SharePoint front-end. In 2007 SAP appointed TopForce as Special Expertise Partner Duet™. In the Netherlands we are the only licensee to implement Duet™ on top of SAP business processing for incorporation within the Microsoft Office end-user environment.

Our vision

Our well-established 5-layer architecture forms the basis for any service oriented architecture in which TopForce is involved. The strength of this architecture is that it completely decouples the presentation aspects
of any application, from the business processing and responsibilities. Exactly what is also needed to deliver a robust and future proof integration between SAP business processes at the back-end within the visual scope of your enterprise portal.
For the specific business situation of unlocking SAP business processing to your enterprise portal, we have expanded the 5-layer architecture into our conceptual integration architecture. Inputs for this integration architecture are the HPW concepts, and guiding principles on both business and IT level to delimitate the solution space.

Our approach

The driving force behind any IT project is the business gains one wants to achieve. For TopForce this is the starting point also on projects to unlock the SAP business functionalities by including them within the enterprise HPW. Which business processes are most viable to unlock via the enterprise portal to the employees? What kind of user interaction and design should best be applied to facilitate the requested User eXperience, even for the casual user? Also part of this initial analysis phase is to examine the current IT landscape, and the active or available integration mechanisms. The next step is to design the outline of the solution, and map this on our defined integration architecture. Hereby keeping a strong eye on the current IT environment and the medium-time IT roadmap of the enterprise. This design is then implemented within the IT landscape, typically involving configuration and development activities at both the SAP side to expose its processes, as within the SharePoint/portal side to incorporate the user interaction. A best practice here is to follow small steps, delivering in quick results and wins.

Our building blocks

The most significant parts here are the TopForce 5-layer architecture for realizing the HPW, and the detailing of this into our referential integration architecture. Also we have ready-to-employ technical building blocks for realizing a loosely-connected integration between the structural SAP business back-end, and the SharePoint based enterprise portal as the information worker’s familiar HPW.
Tags: SAP NetWeaver Microsoft SharePoint integration interoperability HPW

Thursday, October 29, 2009

Expectations on DUET 3.0

With the forthcoming release of SharePoint 2010 in sight, it is clear that this will be the foundation application platform for other Microsoft products. Project Server, Business Intelligence strategy, Dynamics CRM, and so on. In context of SAP / Microsoft interoperability, it is interesting to watch what will happen with the DUETTM offering, a joint SAP and Microsoft product. The DUET versions so far (1.0, 1.5) cannot be considered a success story in real practice. A lot of licenses are out there in the market (1 million licenses at 500 customers in the last 2 years), but almost no concrete applications. There are several reasons for that:
  • The minimal set so far of supported SAP business packages / functionality
  • The lack of development support in the current DUETTM versions; to custom extend the minimal set
  • The extra complexity and costs within the IT infrastructure due to the separate DUET server
SAP nor Microsoft have yet published the future roadmap of DUETTM, nor recommitted themselves recently to continue this. However, several signals indicate that it will be continued, and that it will be re-architectured. For instance, at the SAP TECHED this week within Vienna it was told that DUET 3.0 will be based on SharePoint 2010. Talk of an unexpected surprise J. At the Microsoft SharePoint Conference 2009 last week in Vegas, DUET was not or only marginally mentioned. I expect this to be intentionally, because DUET is a joint SAP + Microsoft happening; and they will use a common podium to present the [near] future roadmap of DUETTM.
Information that is already leaking out:
  • No more dedicated DUET server to handle the communications between SAP NetWeaver and Microsoft Office; but relying on the SharePoint 2010 platform/server to handle this
  • UI aligned with next version of Office; Office 2010
  • SAP potentially shifting away from Java in favor of ABAP (wonder why that could be…)
  • Functionality around reporting and sales management, time management scenario’s
Given the foreseen dependency on a.o. SharePoint 2010 and Office 2010, it will be clear that I do not expect the appearance of DUET 3.0 before around the end of 2010. Also interesting is in what sense DUET 3.0 will be dependent on the SAP NetWeaver (SAP’s Business Process Platform) roadmap: new capabilities, functional and technical. Once again, it is a joint uptaking by SAP and Microsoft; and it therefore requires alignment with the technology and business roadmaps of both companies. No simple action, but since the companies have a common interest here and a common opponent (Oracle), I’ll certainly expect them to come up with something significant. They simple have to.
Some interesting related and recent links:
Tags: SAP NetWeaver Microsoft SharePoint DUET integration interoperability HPW

Monday, October 26, 2009

My take on SPC 2009 and SharePoint 2010

Most substantial impression after attending SharePoint Conference 2009, is that the next version of SharePoint [2010] incorporates lots of modifications, improvements and extensions. SharePoint 2010 really has it in it to become a full-blown application platform. Of the large collection of changes and additions, the following are most significant for me (from a consultant + developer perspective):
  • Sandbox deployment model - enables us to push managed code to hosted SharePoint environments
  • Improvements in the UI - improved usage model and experience, more attractive Web2.0-kinda layouts, integration/embedding of the Office Ribbon, cross-browser support (via XHTML)
  • BDC evolution into BCS - symmetric client and server usage model, bidirectional transfer from+to LOBsystem, largely improved BDC Designer (SPD and VS) for defining the external system connections, part of SharePoint Foundation iso Server license, ...
  • SharePoint Workplace 2010 - Groove evolution provides SharePoint functionality and usage model when offline; and transparently synchronizes upon reconnect
  • InfoPath Forms handling - performance and robustness improvements, new and improved controls (e.g. DateTimePicker, PeoplePicker), improved rules management, modify list/library forms via InfoPath Editor,
  • Modifications to "My Site" - new visual organizational browser, direct status updates (cq LinkedIn, Facebook), knowledge mining, social tagging, ...
  • ALM extensions - new Visual Studio project templates, transparent deployment to SharePoint environment, TFS integration, navigate SharePoint from within VS 2010 context via Server Control, ...
  • VS 2010 development experience - graphically design a webpart, Client-side Javascript Object Model, Developer Dashboard
  • SharePoint Designer 2010 - transitioned into a fully functional tool within the SharePoint solution creation lifecycle, navigation focus around SharePoint artifacts, administrator able to restrict usage, export to solution package (WSP)
  • Seamless combine work of business analyst / functional designer and developer - the outline of a solution can first be prototyped in SPD, and then moved into VS 2010
  • Search extensions - improvements in the User Experience, Social Search enabled, incorporation of FAST Search (in the high-end SharePoint edition)
  • Data management - validation at list- and item-level, cascading Lookup reference deletes, lookup to multiple item-fields, large list support, LINQ to SharePoint
  • SharePoint capabilities OOTB - new and improved functionalities and capabilities; functional + technical
  • WCM improvements - adoption of the Ribbon UI, inline editing, in-place positioning within pagelayout ('igoogle'), limiting the number of full-page refreshes upon content owner actions, Multilingual UI enables runtime language-switch, extended granularity Audience targetting, monitor the usage + size of a site
  • Composites - Silverlight Web Part, REST, Business Connectivity Services, Access Services, custom workflows in SPD, Visio Services (ao workflow visualizations)
Another important aspect for me was the focus on SAP/MS interoperability. The conference gave me the chance to catch up with leading community members Kristian Kalsing and Matt Ordish. We discussed our past experiences, and future directions + expectations. And we strenghtened our mutual bond...
Last but not least; it's good to see the attention and recognition SharePoint receives. Within Microsoft - Steve Ballmer pronounced SharePoint 2010 as his lovebaby; from analysts; and the massive interest by the conference attendees. We all felt a common excitement about the forthcoming version. 7000 SharePointers (developers, architects, consultants, [power] users) can't be wrong, SharePoint is here to stay and prosper.

Tuesday, October 20, 2009

Second day at SPC2009, SAP/MS interop community members unite

The most interesting session of the whole conference for me was this day, being 'Revolutionizing the SAP User Experience...with SharePoint', presented by Matthew Ordish. It is in fact the only presentation on the conference on SAP/MS interop. Matthew was pleasently surprised by the number of attendees, at forehand he expected a number of 3 to 4. But instead the room was pretty filled. In combination with talks I had sofar with other conference members this gives me the impression that SAP/MS interop is certainly on the agenda of more people than you would expect. The talk was very good, Matthew really knows his stuff. He had some excellent architectural and conceptual slides, which I plan to reuse. Afterwards me and Kristian (naturally he also went to this talk) spoke and discussed with Matthew, I explained what I'm doing at the SAP/MS interop area within the Netherlands. We joined for lunch to continue our talk and exchange ideas plus experiences on the subject. Very interesting indeed. I certainly include Matthew within my list to contact when I've questions or want to checkout ideas.
Tags: SAP NetWeaver Microsoft SharePoint integration interoperability community

First Conference Day at SPC 2009

The conference launced with keynotes of Steve Ballmer and Jeff Teber. In his enthiousastic presentation Steve showed us some of the larger new or improved capabilities, and what can be achieved with them in nowadays business collaboration applications. Amongst them extended functionality to set up and use SharePoint sites, including all kinds of social interactions (blogs, wiki's, RSS); communities, search which in the high-end SharePoint Server 2010 Search now incorporates the FAST Search algorithmes and functionality, improved people (thus social) search; business intelligence; composite (mash-up) applications; improvements in both the developers as the IT pros experiences. For developers: Microsoft has made another major step on ALM aspects!! Both Steve's as Jeff's talks were validated via a multitude of fun demo's. Jeff came on stage, and took us back to the ancient times of SharePoint birth. It was both fun as reassuring to see that the original vision for SharePoint still holds, also within the forthcoming 2010 edition. Of course a lot of the support and functionality is improved since Tahoe; but the initiating ideas and vision still applies. This is reassuring because it proves that SharePoint is a well-thought service offering from and for Microsoft. One of the most signaficant statements Steve made is that he sees SharePoint actually has an platform. I totally agree on that idea.
After these 2 keynotes the BreakOut Sessions started. Often a pitty to have to make a selection for only one of the parallel breakouts. Luckily Microsoft has promised to on short notice stream the video recording of every individual session via MySPC. It's too much here to repeat what I've heard and learned in the 3 afternoon sessions. However, to me one of the most visuable changes is the way SharePoint looks and behaves. The SharePoint UI look is cleaned up, and again complies with current (web 2.0/3.0) standards. And in the behavioural aspect the most significants aspects are the ribbon and context-aware UI-controls, and the improved User eXperience by applying Ajax technology to make SharePoint operation more (user) performant.

Monday, October 19, 2009

First evening at SPC 2009; Las Vegas

Had an interesting first evening at SPC 2009. At first I hooked up with a former collegaue who with his wife just happens to be now also in Vegas during their holiday trip. Met at starbucks to drink a cup of coffee, and shake hands. Next went up to the Mandalay Bay Conference Center to register. Crowdy lines, lots of attentions, and also a lot of people from the Netherlands. After registration first went for a brief moment to the Welcome Party, and after a couple of beers went on to the EyeCandy bar for tonight's SharePint. There I've an appointment to meet with the well-known (in SAP/MS area) Kristian Kalsing. Crowdy here also, but after a while Kristian detects me and comes over to meet ourselves in person. After getting acquinted (with curtency of bottle of Dutch Heineken), we talk and discuss a lot about our experiences within the SAP/MS area. After a while, when Kristian is off for a moment, I involve 2 Swedish (allthough one of them later on told me he is actually from Norway) in our get together. Exchanged both SharePoint thoughts, as well as ideas on Las Vegas. Very nice to meet fellow SharePointer's this way, and discuss what's on our minds. O yeah, also shortly met an (english, of course) recruiter who told us that his main reason for attending is to get to known SharePoint professionals, and that he typical as 5 job oppertunities available per SharePoint'er. Yeah man, SharePoint really is hot now; and will explode with the arrival of SharePoint 2010.

Monday, October 12, 2009

I'll be at SharePoint Conference 2009


In less than a week the SharePoint Conference 2009 starts. Main attraction of course the upcoming SharePoint 2010 ('twenty-ten') release. Although final agenda details have not yet been distributed, I'll already have several subjects on my shortlist. Overall I'm particulary interested in the progress made for interoperability of SharePoint ('twenty-ten') with SAP NetWeaver. Thus the sessions with focus on one of: Business Connectivity Service (successor of the BDC), DUET 3.0, Composite Applications, Identity Management and SSO, OBAs. Also I'll try to meet some of the fellow SAP / MS community members; I've hooked up for a SharePint appointment with the well-known and appreciated Kristian Kalsing.

Wednesday, October 7, 2009

Interesting sessions on SAP/MS interop at the SAP TechEd's 2009

In the coming weeks the SAP TechEd 2009 will be held, at various locations worldwide. The series starts in Phoenix (USA), following Vienna (EMEA market), Shanghai (China) and ends in Bangalore (India).
The SAP TechEd is filled with lots of interesting sessions, divided within 7 tracks. From the perspective of SAP / MS platforms interoperability, the tracks SOA Middleware, Security and Identity Management and Custom Development appear the most interesting ones. And within them especially the following sessions
I'm pleasently surprised by the attention SAP gives to the field of platforms-interoperability in general, and that of SAP/Microsoft in particular. Although I self are not able to join this conference (I'm instead scheduled for the soon coming Microsoft SharePoint Conference 2009), a TopForce colleague will attend. So I hope and expect to receive the details via him.
Tags: SAP NetWeaver Microsoft SharePoint integration interoperability SSO

Tuesday, September 29, 2009

Workaround for 401 problem with POST and NTLM authentication

Context: Invoke SharePoint Lists.asmx webservice from a WPF client to retrieve listitems. The SharePoint site is hosted by an external provider, and secured via NTLM authentication. To invoke the Lists webservice a WCF proxy is generated. The client WCF binding is set to basicHttpBinding, with security = NTLM.
Issue: When invoking the service from the WPF client, a 401 is returned. Via Fiddler inspected the http-request. The NTLM authentication protocol handling in 3-steps is visible, but despite that no succesfull authentication. A simple GET via WebClient to the Lists.asmx page, with same NTLM credentials applied does succeed.
And strangely, in case this is done before sending the POST webrequest, the latter does also succeed. That is..., when Fiddler is active. Without Fiddler monitoring the http transfer, the HTTP-GET request still succeeds, however the WCF proxy call then again fails.
Although I love Fiddler, it's no option to oblige application end-users to run it just to allow the WCF proxy call to succeed...
Instead I tried to implement the SOAP behaviour explicity self via WebClient, and abandon the WCF framework in this particular case. And this works!

N.B. The probable cause of the POST malfunctioning with HttpWebRequest / WCF proxy and NTLM authentication is described in the post 401 Error on HttpWebRequest with NTLM Authentication.

Tuesday, September 22, 2009

Embrace the New Way of Work

This morning I had an appointment at the headquarters of Microsoft Netherlands, at a location nearby Amsterdam. According to the route planner it ought to take me about an hour and a quart. However, due to a capital traffic jam it took me almost 3 hours (!!) to finally get there. Even despite my build-in marge I thus arrived late for the meeting, and could only attend the last 45 minutes. What a waste of time... Therefore next time we'll value our precious time, and organise via Microsoft Office Live Meeting a virtual and location-independent meeting. Cheers for that...

Monday, September 21, 2009

Tip - HowTo package multiple project-assemblies in a single WPF executable

It's a good practice to structure your Visual Studio solution according to the application layers. You can do that via a folder structure within a single project. But I prefer to structure each application layer within it's own VS project. This approach allows (the build of) each VS project to depend only on the architectural layer direct beneath it.
A consequence of structuring within multiple VS projects, is that each project will build its own assembly file. Often this is also required for deployment and update flexibility. Sometimes however its handier to package it all within a single assembly for deployment. An example is the build of a WPF .exe. Especially for a smaller application, it's a bit overdone to have to deploy one or more .dll assemblies besides the .exe.
Luckily it's easy possible to also package the other project-assemblies within the main .exe executable. The tool to the rescue here is ILMerge. You can modify the project file to automatically merge the dependant .dll assemblies within your main .exe:
<PropertyGroup>
<PostBuildEvent>ILMerge.exe /internalize /ndebug /out:$(TargetFileName) $(TargetFileName) TopForce.Communication.Application.dll TopForce.Communication.Integration.dll</PostBuildEvent>
</PropertyGroup>

Monday, September 14, 2009

Online interview explaining the business case of OBAs in the field of SAP/MS

At Tech-Ed Australia Kristian Kalsing has a session on the subject of OBAs in the field of SAP/MS. He was also interviewed on this subject. In this interview Kristian at first gives a good explanation of the business case of applying SAP / MS integration within the information worker's workplace, typical a non-casual user of the SAP environment. At the end he also gives some solid best practices to apply when starting with SAP / MS interoperability. You can watch the interview online.
Tags: SAP NetWeaver Microsoft SharePoint integration interoperability OBA

Friday, September 11, 2009

Tip - HowTo Enable Anonymous Access to discussion board listview within a public readonly publishing site

For a public exposed website you'll need to enable anonymous access, to allow arbitrair visitors to see the published content, and search crawlers to index your site. You'll also want the site visitors to only be able to view the site contents, not to modify it.
There are some exceptions to this general permission rule. One is when the website contains 1 or more discussion boards. To enable any arbitrair visitor to participate in a discussion thread, she needs update permission rights within the SharePoint DiscussionBoard. In a former project we learned that it's not trivial to enable update rigths for anonymous users in a further readonly publishing SharePoint site. To spare you the time to discover yourself how to still achieve this, I decided to publish here the steps I needed to perform.
  1. [Central Admin] create new web app
  2. [Central Admin] create a site collection with Publishing Portal as template
  3. [Central Admin] extend the web application for internet; and allow Anonymous.

    Note: in this stadium still WA allowed at the extended site.

  4. [Site itself] open up the extended site; since WA allowed possible to change settings
  5. [Site itself] enable anonymous access for entire site
    (site settings \ advanced settings \ settings \ Anonymous Access \ Entire Website)
  6. [Central Admin] disable Integrated WA for the extended site to make it totally anonymous
  7. [Shell/CMD on SharePoint server] !! toggle the lockdown feature on the extended site; and do either app pool recycle or IIS reset
  8. [Site itself] provision a DiscussionBoard, and set its permission to allow anonymous access.
  9. [Central Admin] re-enable WA on the extended site
  10. [Site itself] allow anonymous access for both viewing and adding items on the discussionboard list
  11. [Central Admin] disable again WA
This sequence of steps, and in this exact order, worked out for us. When deviating from it, we still experienced access denied issues; either upon trying to display the discussionboard ListView, or when trying to add a new thread or reply to existing discussion.

Tuesday, August 18, 2009

Tip - Provision a Functional Management page for application data

One of the faces/capabilities of the SharePoint platform is that of Web/Enterprise Content Management System (WCM, ECM). When we architect and setup a WCM-enabled SharePoint (publishing) site, there are actually 2 different types of users to take into consideration:
  1. The end-users browsing and using the website;
  2. The content managers, who have the responsibity for maintaining the content on the website up-to-date
When designing the website, the primary focus is almost naturally on the end-users. Understandable, after all a site which does not attract and keeps the interest of end-users is in fact useless for the company. However, it certainly is also beneficial to give appropriate attention to the usage model for the content manager role. If they can do their content work in a more user-friendly and efficient manner, the site will most likely benefit from this by being more and more often kept up-to-date. Content management is a task difficult enough on the functional level, without the technical / usage model burden of SharePoint content management.
Content in a publishing website comes in various forms. Most known are of course the publishing / web pages, as the entities to which the end-user navigates. But there are more type of content-entities possible:
  • downloadable documents (administered in document libraries)
  • pictures displayed somewhere in the site (administered in picture libraries)
  • data displayed somewhere in the site. Examples are news items, events calendar, links to related information (administered in SharePoint lists)
When the SharePoint is based on one of the publishing site templates, content management of the individual pages is already to a certain amount enabled for the site contributors. An authorized contributor can start the creation of a new page, or the modification of an existing one directly from the siteactions menu. However, if the contributor needs to change one of the other types of content (document, picture, basic list data), there is no such direct usage model. Instead one has to follow the path of Site Actions --> Site Settings --> List and Libraries --> identify and then select the appropriate list ... This is rather cumbersone, and involves a lot of mouseclicks (irritating) + the retrieval and rendering of multiple application pages before arriving at the final destination (time-costly for the user). Another disadvantage is that the content owner must self identify in the listed overview of all the SharePoint lists and libraries in the current site, the particular list/library which holds the content type.
Wouldn't it be nice to apply a comparable usage model as for page-modification to non-page content items ? I thought so, and have realized it within various SharePoint CMS-projects. The basic usage model is:
  1. A contributor selects the Site Actions menu
  2. The Site Actions menu is extended with a custom action for functional data management
  3. The functional data management menu entry navigates the browser to a functional data management page. On this page the different relevant content types are enumerated in list form, with direct recognizable identifications.
  4. Clicking on one of the content type links navigates the browser to a page on which the data items of the related list are displayed. The contributor can here manage the content of this specific type, for instance news messages.
This usage pattern improves the user experience for the content management role:
  • The usage model for non-page content applies the same pattern as for publishing page content
  • The navigation is direct, and orientated at functional level
  • Lesser mouseclicks and page retrievals
  • Contributor is shielded of from confrontation with the total collection of SharePoint lists and libraries in the site
At SharePoint technical level the following is done to enable this usage pattern:
  1. Entry on Site Actions menu: Provision via a feature a custom action, to add an entry to the Site Actions menu, with it's action set to navigate to functional CMS management page.
  2. Functional CMS Management page: Provision a web page with on it a Content Editor webpart (CWEP), and add htlm to render a list of the different content types. Each item in the list hyperlinks to the same edit page for editing the contents of the selected list. The listname is propagated via the QueryString.
  3. Editable list view: Provision a second web page with on it a ListView webpart. The ListView webpart is used to display the different items in the SharePoint list or library, and to enter new item or edit existent item. This web page is reused to display the contents of the different content lists and libraries. For this it is required to runtime connect the contained ListView to a specific list or library, following the selection the content manager made from the overview. The ListView webpart itself does not exhibit QueryString behaviour. Therefore a hidden technical webpart is added to the page which parses the QueryString to detect the requested list, and next runtime push this setting onto the ListView webpart on same page.
And that's basically it. Your site's content managers will thank you for delivering this CMS functionality. At least, that has been my experience on several occassions/projects...

Tuesday, August 11, 2009

Apply WCF BizTalk Adapter Pack to service-enable SAP BAPI/RFC's

One way to expose native SAP BAPI and RFC function modules is by generating a web service within SAP NetWeaver. In some cases this is less appropriate. For starters, you need to have a SAP Developer Key to be allowed to use the SAP web service wizard, and also have the required SAP authorizations. In other cases it may not be allowed by IT operations to make any modification to the SAP environment, even if it's limited to the full-automatic generation and activation of the BAPI webservice(s). Another reason from a system architecture viewpoint, is that the single BAPI and/or RFC calls may be of too low granularity. You actually want to perform a 'business transaction', consisting of multiple method invocations which must be treated as a Logical Unit of Work (LUW). SAP has introduced the concept of SAP Enterprise Services for this, and has delivered a first set of them. This is by far not complete yet, and SAP will augment it the coming years.
The by SAP delivered Enterprise Services will of course be limited to standard SAP functionality. In case of custom functionality you'll need to provide your own 'Enterprise Service' behaviour. This can be done in the SAP environment as a custom BAPI/RFC function module, and then exposed as BAPI webservice. However, another option is to apply the .NET WCF LOB Adapter SDK and the related BizTalk Adapter Pack. The LUW behaviour is then implemented within a .NET class. For transactional update behaviour, the .NET class must invoke BAPI_TRANSACTION_COMMIT at the end in case no problems are encountered, and otherwise BAPI_TRANSACTION_ROLLBACK to rollback all the earlier performed updates in the LUW.
Basic Steps:
  1. complement your local development environment:
    i) install the WCF LOB Adapter SDK 2.0
    ii) install the BizTalk Adapter Pack 2.0
    iii) install the SAP RFC SDK

  2. Generate in VS2005/2008 an 'Adapter Service Reference'; select the SAPbinding, configure the connection to the SAP system and connect, and next select the BAPI's and RFC's function modules that you're going to invoke in your business functionality. Important: if you need to implement a transactional update, also include the BAPI_TRANSACTION_COMMIT and BAPI_TRANSACTION_ROLLBACK function modules.

  3. Design and implement the client context that applies and invokes the SAP adapter binding.

The whitepaper Windows Communication Foundation (WCF) LOB Adapter SDK and the BizTalk Adapter Pack gives the reader a good and thorough insight on the vision and functionality of both. And excellent read for the ones interested in approaches to integrate arbitrair .NET clients (e.g. MOSS) with external Lines of Business application (e.g. SAP HR).
Tags: SAP NetWeaver Microsoft SharePoint integration interoperability WCF LOB Adapter

Friday, August 7, 2009

Tip - WCF LOB Adapter SDKs 'Add Adapter Service Reference' not present in VS2008

The WCF Lines of Business Adapter SDK contains development and runtime functionality to service-enable external applications. I downloaded and installed the SDK, but to my unpleasant surprise no change was visuable within the VS 2008 IDE. In particular, the promised 'WCF Adapter Service' project template is missing, as well as the 'Add Adapter Service Reference' menu option. As first repair I downloaded and installed the BizTalk Adapter Pack (which I'm going to need anyhow, since I want to service-enable SAP business functionality). However, still no change in VS2008...
After some fruitless searching on the web (bing-ing and googling...), I posted a question on the related forum. And thankfully with a quick and useful answer. When I installed the WCF LOB Adapter SDK I choose without really considering it the 'Typical' installation option. It appears however that the SDK authors do not consider the installation of the SDK 'Tools' to be part of the typical installation. A bit strange to my opinion for a development SDK, but instead handy for deployment of only the runtime parts of the SDK on an OTAP server. After augmenting the SDK installation I now do have both the 'WCF Adapter Service' project template as the 'Add Adapter Service Reference' menu option available.

Tuesday, August 4, 2009

High Performance Workplace - Product Selection Matrix

The mission of TopForce is to design and deliver the concept of the High Performance Workplace within enterprises. The specific portal technology or product to realize this in, is a technical mapping. To arm our consultants with material to make an informed selection and decision for which portal product to utilize, we set up a product selection matrix.
In this matrix we position a total of 17 of what we at TopForce think are the most important portal capabilities, and map these against a total of 15 portal products and technologies. There are more than these 15 available in the market, but we intentionally delimit it to deliver an overseeable selection matrix. Within the weighted portal platforms we have the largest commercial ones (SharePoint, SAP NetWeaver, IBM WebSphere), and several open source products (e.g. Alfresco, Jahia, DotNetNuke, Hippo CMS). Also included is our own TopForce High Performance Portal offering.
The Product Selection Matrix is set up for general applicability. It therefore intentionally does not include the specifics of an enterprise situation. In a concrete selection these must of course also be considered in the decision process. You must think here of their current IT environment plus IT roadmap. However, be aware that one of the most influencing factor is often invisible; namely enterprise politics and personal IT preferences of the decision makers.

Friday, July 31, 2009

The Quest for searching thorough advice on best-practices SAP / SharePoint interoperability

What started out as a rather simple inquiry question on the SDN forum SAP NetWeaver .NET Technologies, is now transforming in a more in-breadth discussion on getting best approaches to apply within SAP / SharePoint interoperability. André Fischer, SAP employee, posted a direction to the whitepaper Interoperability between SAP NetWeaver Portal and Microsoft SharePoint Technologies. Although a good overview document of the possible approaches, that is also its shortcoming: it's an overview, but it does not give the reader solid advice on best approaches to apply in specific situations. Not strange, that is not the purpose of this whitepaper. And also, the answer on such questions is for a major part influenced by the particular enterprise situation, thus difficult to generalize. But when involved in such a concrete enterprise situation, you are in need of such guidelines and advice.

So we try to 'challenge' André to come up with more concrete advice. If you're interested, follow the forum-thread to see whether he accepts and responds to this...
Tags: SAP NetWeaver Microsoft SharePoint integration interoperability architecture guidelines roadmap

Wednesday, July 29, 2009

A reflection on 'Enterprise Portal'

Wikipedia contains the following definition for the concept of an Enterprise portal: An enterprise portal, also known as an enterprise information portal (EIP) or corporate portal, is a framework for integrating information, people and processes across organizational boundaries. It provides a secure unified access point, often in the form of a web-based user interface, and is designed to aggregate and personalize information through application-specific portlets. One hallmark of enterprise portals is the de-centralized content contribution and content management, which keeps the information always updated..

I agree with this definition on the conceptual level. However, I want to supplement it with a fundamental notion on a more architectural level: Enterprise Application Integration. Especially the concept of business process integration is achieved by combining the functionalities of multiple business applications within one single employee workplace. The High Performance Workplace.

Patterns in Enterprise Portals

Industry analysts and portals vendors identify the following set of enterprise portals patterns / types:
  1. Content portals
    Aggregates enterprise content from many sources throughout the enterprise. Typically augmented with search functionality to allow employees to find the requested information quick and easily. Authorization applied at content level to protect sensitive information.
  2. Transaction portals
    Extend content portals by not only displaying documents and textual information (unstructured data), but also provide the employee with the means to access and operate individual application functionality direct from within the portal. The applications are provisioned via individual portlets in the portal, and provide on-the-fly / realtime business data (structured data), and allow users to interact with the application via the portlet.
  3. Collaboration portals
    Support a team in collaborating on a mutual task. This can be a project, an assignment, or the performance of the daily and regular team responsibilities. The collaboration features enable the employee to self-organize the ad-hoc work, and share + work on the same information through a dedicated team workspace.
  4. Process portals
    Compared with the individual and non-connected silos in a transaction portal, the process portal provides the employees with an integrated business process that spans multiple back-end systems. The employee is not aware of single applications, but can rather enlist in the total business process.

Enterprise Portals platforms

An enterprise portal is not a shrinked-wrapped product, but requires configuration, customization and provisioning to be of added value for an individual enterprise situation. Custom development is often required to achieve enterprise specific functionalities and integration. Portals vendors position their enterprise portal product more and more as an Application Integration Platform. A.o. SAP uses the phrase "Applistructure" to point out the combination of out-of-the-box enterprise applications and functionalities, together with application infrastructure. Applistructure capabilities which are expected in an enterprise portal platform offering include the following:
  • Presentation services
  • Content aggregation
  • Data management
  • Enterprise search support
  • Webservices / interoperability support
  • Team collaboration support
  • Document handling
  • Enterprise Content Management
  • Web Content Management
  • Workflow support and integration
  • Business Process Management
  • Business Intelligence functions
  • Personalization
  • Site design and structure
  • Branding
  • Authentication and Identity Management
  • Authorization, roles management
  • Operational management support
  • Multi-channeling
  • Functional management support

Commercial and Open Source

The enterprise portal product space consists currently of numerous parties. Some are the well-known traditional technology-stack vendors, but more and more also (commercial) Open Source platform offerings come up. Here is a list of some of the major current players in this field:
  • IBM - WebSphere Portal
  • Microsoft - SharePoint
  • SAP - NetWeaver / Enterprise Portal
  • Oracle - BEA WebLogic
  • Sun Microsystems - GlassFish Web Space Server
  • Vignette Corporation - Vignette Portal
  • Tibco - PortalBuilder
  • Liferay - Liferay Enterprise Portal
  • Red Hat - JBoss Portal
  • Jahia
  • Alfresco
  • Covisint
  • DotNetNuke

Trends and new capabilities

Incorporate Web 2.0 capabilities (Wiki's, blogs, social computing), Mashups, Rich User Experience, Mobile usage, Cloud Services, incorporation of Self Service applications

Friday, July 24, 2009

Schematic overview of SAP enabling technologies for SSO

I came accross a figure displaying a graphical overview of the diverse paths and approaches for achieving Single Sign-On within SAP. This nicely summarizes at high-level the available approaches as discussed in the SAP/Microsoft Alliance whitepaper on SSO (see posting Studying Single Sign-On approaches for SAP and Microsoft):
Tags: SAP NetWeaver Microsoft SharePoint integration interoperability SSO identity management IDM IAM

Wednesday, July 22, 2009

Silverlight and WCF Faults

The WCF FaultContract behaviour is a nice functionality to report functional faults to the invoking client. The WCF service implements this by throwing a FaultException<T> instance. The proxy side catches this, and extracts the functional error.

Well, that's the general idea. With a standard .NET WCF proxy client this works perfectly. However, in Silverlight you ran into some problems. At first, the generic version of FaultException is not available. So you cannot catch and distinguish at WCF client side a FaultException<T>, but must resort to catching generic FaultException. But the real problem is that Silverlight treats all WCF Fault HttpResponse as general CommunicationException iso SOAP FaultResponse. The underlying cause of this is that the WCF service side default sets the HTTP status code to 500 in case of an unhandled exception, even in case of the SOAP FaultException. At Silverlight side (and also Flash) any non-200 HTTP response is generally treated as a communication error. Thereby ignoring/loosing the functional fault information that is responded by the WCF service:
Several posts suggest to prevent this situation by modifying the WCF service side to not return HTTP 500 errorcode for a WCF Fault. This will work if you yourself also have the control over the WCF service. Still, personally I feel this is the wrong approach. The problem is namely at Silverlight side, so you should correct it there. Additional benefit is that you are so also prepared for SOAP faults of external webservices (WCF or other).
My solution would be to implement a custom channel for Silverlight. I thankfully used the example code on this blog for the initial setup. Next I wanted to hook into the proper place in the custom channel to convert 500 HTTP status codes into 200 codes.
However, I've to admit I failed to correct the problem at the Silverlight client side. The reason is that the HTTP transfer is handled up in the stack via inaccessible Silverlight internal clients (System.Net.BrowserHttpRequest, InternalWebRequest, ...), and that all information of the HTTP Response is lost when reaching the context of the channel. Even Reflection cannot give an helping hand here, since the responsestream is closed already when returning to the channel context.
So for now I have to satisfy with letting the own WCF service also return HTTP status code OK (200) when a functional fault is thrown. The bigger drag is the inconsistency in all of this between Silverlight versus standard .NET CLR; in the latter the SOAP response for s:fault is always given priority above the HTTP status code. I think this is as it should be. Moreover given the ongoing discussion what is the correct and standard HTTP status code in case of SOAP FAULT (SOAP and HTTP status codes (200 vs 500 etc), Issue #12: HTTP Status Codes 500 v 200).

Tuesday, July 21, 2009

Tip - solve DateTimeControl's datepickerframe positioning fault for IE8

The SharePoint DateTimeControl uses clientside javascript to runtime position the datepickerframe nearby the imagebutton. When browsing via IE8, the frame is however positioned incorrect, at a visually unrelated position.

I inspected the SharePoint datepicker.js client library from the 12hive\layouts folder to locate the cause of this. At first I had the impression that it was due to the usage of dynamic properties (pixelTop, pixelLeft, pixelRight). As of IE8, DynamicProperties are namely no longer supported to comply with CSS standards.
The real cause however is the usage of the offsetParent method to calculcate the display position for the popped-up datepickerframe. It appears that IE8 returns another value for this method than earlier IE versions for hidden objects: they all return the document.body object as their offsetParent. This causes the pickerdateframe to be displayed at an unexpected place.

A quick fix is to force the browser in IE7 emulation mode in the HTML header:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

A more elegant fix is correctly position the frame by circumventing the offsetParent malfunctioning. I solved the problem by runtime extending the standard 'clickDatePicker' method, and so make sure that for IE8 the datepickerframe.style.display is unequeal 'none' upon requesting it's offsetParent.

Friday, July 17, 2009

Studying Single Sign-On approaches for SAP and Microsoft

In todays typical heterogenous enterprise IT environment, an end-user works with multiple IT products and applications which have varying authentication mechanisms. In such situations a well-desired functionality is to have Single Sign-On (SSO) enabled. The last days I (re)did some research into this area.
The concept of SSO has a direct and narrow relationship with Identity Management. At the area of IM several interesting new developments are lately either done or announced. Sun (almost Oracle nowadays) has its OpenSSO Enterprise flagship, Microsoft recently gave indepth insight into it's forthcoming "Geneva" initiative. Both technologies/products are representatives of the so-called Claims-Based Identity model. And the beauty is that both IM technologies conform to the Security Assertion Markup Language (SAML) federation standard as a basis for interoperability and ease of collaboration. In a joint co-operation, Sun and Microsoft have produced a whitepaper that discusses the interoperability possibilities between the 2 Identity Federation approaches, and gives answers on typical questions. Microsoft and Sun also have some working showcases to demonstrate the interoperability.
For the specific area of SSO in an heterogenous SAP / Microsoft IT landscape, the SAP-Microsoft alliance has an excellent overview whitepaper available: Unleash the Power of Single Sign-On with Microsoft and SAP. A sidemark is that this document appeared in september 2007. Later developments as the mentioned OpenSSO and "Geneva" are therefore not included. Still, to my opinion the whitepaper is not outdated, but simple no longer complete. The description and positioning of the included SSO approaches is still valid and useful. And you can easily complement yourself the 2007-temporal overview of SSO alternatives with the new technologies and products.
Tags: SAP NetWeaver Microsoft SharePoint integration interoperability SSO Identity Management IDM IAM SPNego OpenSSO

Thursday, July 16, 2009

Tip - Silverlight's AsyncCallbackException on invoking WCF service

A Silverlight application deployed to the testserver gave a browser error upon invoking a WCF service. This WCF service is running on the same testserver. The error message is:
Error: Unhandled exception in Silverlight2 application [AsyncCallbackException]
According to the callstack, the error occurred somewhere in the completion of the asynchronous WCF call. This makes the bug analysis somewhat trickier, since you cannot simple use System.Windows.Browser.HtmlPage.Window.Alert then. The call completion namely does not run at the UI thread. However, searching around gave me an idea of the problem cause: I forgot to deploy a clientaccesspolicy.xml file within the folder of the deployed WCF service. Copied it there, and the call from the Silverlight client executes successfully.

Tip - jQuery setExpression and IE8

I ran today into a jQuery exception when testing a WebPart on a system with IE8 installed. In the custom WebPart I apply jQuery a.o. to round buttons and grid-headers. I'm utilizing jquery.corner.js for this. It appears that of IE8, Internet Explorer no longer supports dynamic properties. To prevent the Javascript exception, I made a small modification into 'jquery.corner.js' to check on the IE-version:


if (($.browser.msie) && ($.browser.version < 8.0))
    ds.setExpression('width', 'this.parentNode.offsetWidth');

Wednesday, July 15, 2009

Silverlight app errors when WCF Contract Has Sync Operations

For a WCF service, it does not matter what type of client is invoking it. .NET, Java, PHP or whatever based, as long has the consumer conforms to the W3* standards. For a WCF proxy however, it does matter what type of .NET client is using it to invoke WCF operations. Although a regular CLR-based client supports both synchronous and asynchronous invocations of the WCF service, a Silverlight client only allows asynchronous operations. In a Proof-of-Concept setup in which I have both a regular WebPart (server side operation) and a Silverlight application (client side operation) hosted in a SharePoint portal, I dealt with this by letting the Silverlight strictly use the asynchronous methods. This worked perfectly in my development environment. However, running at the remote test-server, I get an error indication in the browser when trying to invoke from the Silverligth client an asynchronous method on the WCF proxy. Even although the Silverlight code only uses the asynchronous methods, the Silverlight runtime checks at forehand whether the proxy contract also supports synchronous operations, and if so errors out:
Error: Unhandled Error in Silverlight2 Application [ContractHasSyncOperations]
Arguments:IExpensesHandlingAsync
The quick fix in the PoC is to exclude the synchronous methods when compiling the interface/contract for Silverlight client usage, and included in the .xap package. This can be done through a check on the conditional symbol SILVERLIGHT. This way, it is still possible to code-reuse and share a single interface sourcefile, both for non-Silverlight and Silverlight clients.

Tip - Generic robust approach for disposing both normal object as WCF proxy

Situation: a consumer object invokes a provider object to access functionality. The consumer operates against an interface to decouple it at compile-time from the actual implementation(s) of the provider side. The provider is runtime injected via Dependency Injection. After usage, the provider instance may have to be disposed, typical to release native resources (e.g. network or database connections). However, not all provider types need to have the IDisposable interface implemented. To prevent the consumer class from being cluttered with checks on IDisposable being implemented, I delegate this to an utility class in our framework. An example of the consumer usage is now:

In the implementation of the DisposableDecorator class the check is done whether the decorated/encapsulated object implements the IDisposable interface, and if so the Dispose method is propagated on to the encapsulated object. Simple, and it keeps the consumer code clean and focussed. However, when the encapsulated object is actually a WCF proxy, something special needs to be accounted for. The standard application of the using block may then result in an undesired effect. This occurs when an exception is thrown on the channel, putting the proxy in the Faulted state. When next trying to dispose the proxy, the closing of the proxy results in throwing a new CommunicationObjectFaultedException. The latter exception hides the original exception, which has put the proxy in the Faulted state. The solution is to first check whether the encapsulated object is a WCF proxy, and if so if it's communication state is Faulted. If that's the case, then invoke the Abort method on the proxy. Otherwise just maintain the Dispose propagation.