When upgrading I had a lot of dependent modules that needed to be upgraded, to make the site build. I also changed the target framework to .NET 4.0. Finding the problem after all these changes was therefore quite complex.
- EPiServer assemblies from CMS 5 to CMS 6 R2
- Pagetype builder (PTB) from 188.8.131.52 to 184.108.40.206
- Castle.Core 220.127.116.11 to 18.104.22.168
- Remove the old Castle.DynamicProxy2.dll from \bin. (It was used by the old PTB version.)
The real error was hidden by the settings inside the server.serviceModel section in web.config. The EPiServer RemoteEventServiceEndPoint was set up using a udp protocol. Changing this to use a tcp protocol, I got the real error message:
"Unable to load one or more of the requested types. The following information may be a subset of the Type/LoaderException information present - inspect with debugger for complete view.
Check assemblies [Castle.DynamicProxy2, Version=22.214.171.124, Culture=neutral, PublicKeyToken=407dd0808d44fbdc] and/or types"
And that's how I figured it out.