Friday, February 25, 2011

Configuring the Cross Farm Topology Load Balancing service

We have been configuring a dedicated services farm with SharePoint 2010. To start with we were under the impression that SharePoint 2010 ‘took care of’ load balancing farm services. This was almost true, with the exception of the Topology service which you need to load balance through traditional means.

There are a number of good articles you can Google about setting this up.

Once we had an SSL certificate for the host name we selected, we published a service and tried to connect to it from our other farm. The ULS logs showed an error “The root of the certificate chain is not a trusted root authority”. This article explained the process of importing the certificate chain into SharePoint so it was trusted.

http://godwinsblog.cdtech.in/2010/12/sharepoint-2010-root-of-certificate.html

This resolved the issue and we were then able to connect correctly.

Sunday, February 13, 2011

The joy of BCS

I have spent many hours over the past week trying to work out why my BDC Model that I created in Visual Studio would not render in an External list.

I received the lovely:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
Correlation ID:…..

message in the web part. The only problem was that SharePoint was not actually logging the error to the ULS log which posed an interesting challenge.

I tried a default “Hello world”  BDC Model, and that worked fine.

So I thought there must be something wrong with my model, but wasn’t sure what.

Then I came across this very handy tool from Phill Duffy, of Lightning Tools on codeplex.

http://bcstesterman.codeplex.com/

It allowed me to test the finder and specific finder methods of my BDC model and turned up the first issue. I found out that the ID can’t be of int64 type. (Thanks to the following article)

http://social.msdn.microsoft.com/Forums/en/sharepoint2010setup/thread/6449d01f-171b-49df-bfb6-c1090de3b598

I changed the identifier to int32 and the model worked in the bcstesterman, and I thought that was going to be it.

But, to my disappointment, the web part error persisted. I then tore out what little hair I had left. Trying to work out how I was going to find the problem, I finally decided it was time to lay out some hard earned cash to buy .Net Reflector professional. I disassembled Microsoft.SharePoint and told VS.Net to break on exceptions. After a few minutes, I identified the cause of the problem:

{"There is an error in the TypeDescriptors of Parameters on Method with Name 'ReadList' on Entity (External Content Type) with Name xxxxx in Namespace … The TypeDescriptors incompletely define where the Identifiers of Entity 'xxxxx' are to be read. That Entity expects exactly '1' Identifiers, but only '0' TypeDescriptors were found from which to read them."}

So there was one error in my BDC model where I had not selected the identifier option in the ReadList (finder) method.

So it is now working and I can move on (and get some sleep). Once again .Net Reflector professional has saved the day.

Saturday, February 12, 2011

Publishing Silverlight Applications in SharePoint 2010 - Visual Studio SharePoint Development Blog - Site Home - MSDN Blogs

I just started writing a Silverlight application as a Sandbox solution with Visual Studio 2010 and SharePoint 2010.

I found this post very useful in configuring the projects in Visual Studio 2010. In particular, it hadn’t realised that we could set ‘Project Output References’ to get VS to automatically put the XAP file into the Module project.

In this blog post I’ll walk you through how easy it is to publish Silverlight applications to SharePoint 2010 by using the Visual Studio 2010 tools for SharePoint development.

Publishing Silverlight Applications in SharePoint 2010 - Visual Studio SharePoint Development Blog - Site Home - MSDN Blogs