WCFDataPortal - Child Fetching problems

WCFDataPortal - Child Fetching problems

Old forum URL: forums.lhotka.net/forums/t/7960.aspx


Dr. Funkenstein posted on Friday, November 06, 2009

I am primarily a mainframe programmer, but I have to do some mid-tier to mainframe integration.  I have used the old VB6 Business Objects model successfully and I am trying to "upgrade" my knowledge to the .NET CSLA framework.

I am trying to shakedown the ProjectTracker using the 3.7.1 downloads.  I am using the WCFDataPortal as a remote portal (like what we would have to do in production) and it is configured to connect to a SQLServer2005 database that I created by running the scripts included in the download.  I have virtual webs in IIS for PTWeb, PTWcfService and PTWebService

I am using PTWin to make things more straightforward.  It's using the same port in app.config that WcfHost is running on.  I am able to add Projects and ProjectResources without issue.  However, when I try to edit a displayed project (or a resource), I get the error:

 "CSLA.DataPortalException:  ChildDataPortal.Fetch failed on the server -à CSLA.Reflection.CallMethodException:  Child_Fetch method call failed à System.NullReferenceException:  Object reference not set to an instance of an object.  At ProjectTracker.Library.ProjectResources.Child_Fetch(Assignment[] data)

I can see by setting breakpoints that in CSLA.DataPortalClient.Wcfproxy that the correct criteria (i.e. the proper Guid that corresponds to the Project that I am trying to edit) is being sent to DataPortalResult Fetch. Things seem to go poorly from there.  In CSLA.Server.Hosts.WcfChannel.NetDataContractOperationBehavior, the namespace it seems to be using is http://ws.lhotka.net/WcfDataPortal which seems somewhat odd but I could see no customization instructions in the download related to this.  Then it goes directly into CSLA.Reflection.CallMethodException

Same sort of thing happens if I try to edit an assignment.  Any ideas as to what is awry would be greatly appreciated !

shawndewet replied on Thursday, November 26, 2009

Do you get the same problem when using the LocalDataPortal?

RockfordLhotka replied on Thursday, November 26, 2009

There is a bug in ProjectTracker where it can't load a project with no assigned resources (or a resource with no assigned projects?). It is a relatively simple bug in the DataPortal_Fetch() method, I just haven't gotten around to fixing it...

Copyright (c) Marimer LLC