WCF and SharepointOld forum URL: forums.lhotka.net/forums/t/6613.aspx
Craig.Young replied on Wednesday, September 09, 2009I got the service to work actually just a few moments ago. Meaning I got the wsdl to show up in a browser. The trick was to GAC the server version of CSLA.
So far to get to this point I have to GAC:
CSLA Assembly (server version)
WCF Service Assembly (which also contains the code for WCFSupport in Sharepoint).
Business Objects Assembly.
Business ObjectFactory Assembly
However upon invocation, I receive an error that says DataPortal.Fetch<BusinessObject>() failed because the type Business.DataAccess.BusinessObjectFactory, Business.DataAccess cannot be found.
This is odd because I have Business.DataAccess GAC'd as well. My BusinessObjectFactory is tagged with Csla.Server.ObjectFactoryAttributes. Something is crazy with reflection here and loading the named assembly. I even fully qualified the assembly to load with the Version=, Culture=, and the correct PublicKeyToken.
Craig.Young replied on Thursday, September 10, 2009Actually I figured this out as well. WSPBuilder to the rescue!
After a day of toying with my solution I now only need to GAC one assembly and the rest I figured out I needed to place in the 80/bin folder of my Sharepoint Solution project.
The really difficult part for me at least was figuring out how to get Sharepoint Context. But that's solved now thanks to AspNetCompatibilityMode being set to Required on my WCF service.
Copyright (c) Marimer LLC